Skip to content

Commit f169b9a

Browse files
authored
feat(azure): Add azure_compute_skus (#5629)
Closing #5521
1 parent 98b796a commit f169b9a

7 files changed

Lines changed: 212 additions & 0 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package recipes
2+
3+
import (
4+
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
5+
"github.com/cloudquery/plugin-sdk/codegen"
6+
"github.com/cloudquery/plugin-sdk/schema"
7+
)
8+
9+
func init() {
10+
tables := []Table{
11+
{
12+
Service: "armcompute",
13+
Name: "skus",
14+
Struct: &armcompute.ResourceSKU{},
15+
ResponseStruct: &armcompute.ResourceSKUsClientListResponse{},
16+
Client: &armcompute.ResourceSKUsClient{},
17+
ListFunc: (&armcompute.ResourceSKUsClient{}).NewListPager,
18+
NewFunc: armcompute.NewResourceSKUsClient,
19+
URL: "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/skus",
20+
Multiplex: `client.SubscriptionMultiplexRegisteredNamespace(client.NamespaceMicrosoft_Compute)`,
21+
ExtraColumns: []codegen.ColumnDefinition{
22+
{
23+
Name: "id",
24+
Type: schema.TypeString,
25+
Resolver: `schema.PathResolver("Name")`,
26+
},
27+
},
28+
},
29+
}
30+
Tables = append(Tables, tables...)
31+
}

plugins/source/azure/docs/tables/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
- [azure_compute_snapshots](azure_compute_snapshots.md)
5353
- [azure_compute_virtual_machine_scale_sets](azure_compute_virtual_machine_scale_sets.md)
5454
- [azure_compute_virtual_machines](azure_compute_virtual_machines.md)
55+
- [azure_compute_skus](azure_compute_skus.md)
5556
- [azure_confluent_marketplace_agreements](azure_confluent_marketplace_agreements.md)
5657
- [azure_connectedvmware_clusters](azure_connectedvmware_clusters.md)
5758
- [azure_connectedvmware_datastores](azure_connectedvmware_datastores.md)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Table: azure_compute_skus
2+
3+
4+
5+
The primary key for this table is **id**.
6+
7+
8+
9+
## Columns
10+
| Name | Type |
11+
| ------------- | ------------- |
12+
|_cq_source_name|String|
13+
|_cq_sync_time|Timestamp|
14+
|_cq_id|UUID|
15+
|_cq_parent_id|UUID|
16+
|id (PK)|String|
17+
|api_versions|StringArray|
18+
|capabilities|JSON|
19+
|capacity|JSON|
20+
|costs|JSON|
21+
|family|String|
22+
|kind|String|
23+
|location_info|JSON|
24+
|locations|StringArray|
25+
|name|String|
26+
|resource_type|String|
27+
|restrictions|JSON|
28+
|size|String|
29+
|tier|String|

plugins/source/azure/resources/plugin/tables.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/source/azure/resources/services/compute/skus.go

Lines changed: 109 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/source/azure/resources/services/compute/skus_mock_test.go

Lines changed: 40 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

website/pages/docs/plugins/sources/azure/tables.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
- [azure_compute_snapshots](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_compute_snapshots.md)
5353
- [azure_compute_virtual_machine_scale_sets](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_compute_virtual_machine_scale_sets.md)
5454
- [azure_compute_virtual_machines](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_compute_virtual_machines.md)
55+
- [azure_compute_skus](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_compute_skus.md)
5556
- [azure_confluent_marketplace_agreements](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_confluent_marketplace_agreements.md)
5657
- [azure_connectedvmware_clusters](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_connectedvmware_clusters.md)
5758
- [azure_connectedvmware_datastores](https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/docs/tables/azure_connectedvmware_datastores.md)

0 commit comments

Comments
 (0)