Skip to content

Commit 54d8a60

Browse files
author
hc-github-team-tf-azure
committed
Updating based on e58ba4126
1 parent ff63a78 commit 54d8a60

File tree

516 files changed

+35711
-1948
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

516 files changed

+35711
-1948
lines changed

resource-manager/costmanagement/2023-11-01/pricesheets/model_mcapricesheetproperties.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ type MCAPriceSheetProperties struct {
2121
EffectiveStartDate *string `json:"effectiveStartDate,omitempty"`
2222
MarketPrice *string `json:"marketPrice,omitempty"`
2323
MeterCategory *string `json:"meterCategory,omitempty"`
24+
MeterId *string `json:"meterId,omitempty"`
2425
MeterName *string `json:"meterName,omitempty"`
2526
MeterRegion *string `json:"meterRegion,omitempty"`
2627
MeterSubCategory *string `json:"meterSubCategory,omitempty"`

resource-manager/costmanagement/2024-08-01/pricesheets/model_mcapricesheetproperties.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ type MCAPriceSheetProperties struct {
2121
EffectiveStartDate *string `json:"effectiveStartDate,omitempty"`
2222
MarketPrice *string `json:"marketPrice,omitempty"`
2323
MeterCategory *string `json:"meterCategory,omitempty"`
24+
MeterId *string `json:"meterId,omitempty"`
2425
MeterName *string `json:"meterName,omitempty"`
2526
MeterRegion *string `json:"meterRegion,omitempty"`
2627
MeterSubCategory *string `json:"meterSubCategory,omitempty"`
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
package v2025_01_21
2+
3+
// Copyright (c) Microsoft Corporation. All rights reserved.
4+
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.
5+
6+
import (
7+
"fmt"
8+
9+
"github.com/hashicorp/go-azure-sdk/resource-manager/devopsinfrastructure/2025-01-21/imageversions"
10+
"github.com/hashicorp/go-azure-sdk/resource-manager/devopsinfrastructure/2025-01-21/pools"
11+
"github.com/hashicorp/go-azure-sdk/resource-manager/devopsinfrastructure/2025-01-21/resourcedetails"
12+
"github.com/hashicorp/go-azure-sdk/resource-manager/devopsinfrastructure/2025-01-21/sku"
13+
"github.com/hashicorp/go-azure-sdk/resource-manager/devopsinfrastructure/2025-01-21/subscriptionusages"
14+
"github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager"
15+
sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments"
16+
)
17+
18+
type Client struct {
19+
ImageVersions *imageversions.ImageVersionsClient
20+
Pools *pools.PoolsClient
21+
ResourceDetails *resourcedetails.ResourceDetailsClient
22+
Sku *sku.SkuClient
23+
SubscriptionUsages *subscriptionusages.SubscriptionUsagesClient
24+
}
25+
26+
func NewClientWithBaseURI(sdkApi sdkEnv.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) {
27+
imageVersionsClient, err := imageversions.NewImageVersionsClientWithBaseURI(sdkApi)
28+
if err != nil {
29+
return nil, fmt.Errorf("building ImageVersions client: %+v", err)
30+
}
31+
configureFunc(imageVersionsClient.Client)
32+
33+
poolsClient, err := pools.NewPoolsClientWithBaseURI(sdkApi)
34+
if err != nil {
35+
return nil, fmt.Errorf("building Pools client: %+v", err)
36+
}
37+
configureFunc(poolsClient.Client)
38+
39+
resourceDetailsClient, err := resourcedetails.NewResourceDetailsClientWithBaseURI(sdkApi)
40+
if err != nil {
41+
return nil, fmt.Errorf("building ResourceDetails client: %+v", err)
42+
}
43+
configureFunc(resourceDetailsClient.Client)
44+
45+
skuClient, err := sku.NewSkuClientWithBaseURI(sdkApi)
46+
if err != nil {
47+
return nil, fmt.Errorf("building Sku client: %+v", err)
48+
}
49+
configureFunc(skuClient.Client)
50+
51+
subscriptionUsagesClient, err := subscriptionusages.NewSubscriptionUsagesClientWithBaseURI(sdkApi)
52+
if err != nil {
53+
return nil, fmt.Errorf("building SubscriptionUsages client: %+v", err)
54+
}
55+
configureFunc(subscriptionUsagesClient.Client)
56+
57+
return &Client{
58+
ImageVersions: imageVersionsClient,
59+
Pools: poolsClient,
60+
ResourceDetails: resourceDetailsClient,
61+
Sku: skuClient,
62+
SubscriptionUsages: subscriptionUsagesClient,
63+
}, nil
64+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
2+
## `github.com/hashicorp/go-azure-sdk/resource-manager/devopsinfrastructure/2025-01-21/imageversions` Documentation
3+
4+
The `imageversions` SDK allows for interaction with Azure Resource Manager `devopsinfrastructure` (API Version `2025-01-21`).
5+
6+
This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs).
7+
8+
### Import Path
9+
10+
```go
11+
import "github.com/hashicorp/go-azure-sdk/resource-manager/devopsinfrastructure/2025-01-21/imageversions"
12+
```
13+
14+
15+
### Client Initialization
16+
17+
```go
18+
client := imageversions.NewImageVersionsClientWithBaseURI("https://management.azure.com")
19+
client.Client.Authorizer = authorizer
20+
```
21+
22+
23+
### Example Usage: `ImageVersionsClient.ListByImage`
24+
25+
```go
26+
ctx := context.TODO()
27+
id := imageversions.NewImageID("12345678-1234-9876-4563-123456789012", "example-resource-group", "imageName")
28+
29+
// alternatively `client.ListByImage(ctx, id)` can be used to do batched pagination
30+
items, err := client.ListByImageComplete(ctx, id)
31+
if err != nil {
32+
// handle the error
33+
}
34+
for _, item := range items {
35+
// do something
36+
}
37+
```

resource-manager/networkanalytics/2023-11-15/dataproductscatalogs/client.go renamed to resource-manager/devopsinfrastructure/2025-01-21/imageversions/client.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package dataproductscatalogs
1+
package imageversions
22

33
import (
44
"fmt"
@@ -10,17 +10,17 @@ import (
1010
// Copyright (c) Microsoft Corporation. All rights reserved.
1111
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.
1212

13-
type DataProductsCatalogsClient struct {
13+
type ImageVersionsClient struct {
1414
Client *resourcemanager.Client
1515
}
1616

17-
func NewDataProductsCatalogsClientWithBaseURI(sdkApi sdkEnv.Api) (*DataProductsCatalogsClient, error) {
18-
client, err := resourcemanager.NewClient(sdkApi, "dataproductscatalogs", defaultApiVersion)
17+
func NewImageVersionsClientWithBaseURI(sdkApi sdkEnv.Api) (*ImageVersionsClient, error) {
18+
client, err := resourcemanager.NewClient(sdkApi, "imageversions", defaultApiVersion)
1919
if err != nil {
20-
return nil, fmt.Errorf("instantiating DataProductsCatalogsClient: %+v", err)
20+
return nil, fmt.Errorf("instantiating ImageVersionsClient: %+v", err)
2121
}
2222

23-
return &DataProductsCatalogsClient{
23+
return &ImageVersionsClient{
2424
Client: client,
2525
}, nil
2626
}

resource-manager/networkanalytics/2023-11-15/datatypes/id_dataproduct.go renamed to resource-manager/devopsinfrastructure/2025-01-21/imageversions/id_image.go

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package datatypes
1+
package imageversions
22

33
import (
44
"fmt"
@@ -12,61 +12,61 @@ import (
1212
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.
1313

1414
func init() {
15-
recaser.RegisterResourceId(&DataProductId{})
15+
recaser.RegisterResourceId(&ImageId{})
1616
}
1717

18-
var _ resourceids.ResourceId = &DataProductId{}
18+
var _ resourceids.ResourceId = &ImageId{}
1919

20-
// DataProductId is a struct representing the Resource ID for a Data Product
21-
type DataProductId struct {
20+
// ImageId is a struct representing the Resource ID for a Image
21+
type ImageId struct {
2222
SubscriptionId string
2323
ResourceGroupName string
24-
DataProductName string
24+
ImageName string
2525
}
2626

27-
// NewDataProductID returns a new DataProductId struct
28-
func NewDataProductID(subscriptionId string, resourceGroupName string, dataProductName string) DataProductId {
29-
return DataProductId{
27+
// NewImageID returns a new ImageId struct
28+
func NewImageID(subscriptionId string, resourceGroupName string, imageName string) ImageId {
29+
return ImageId{
3030
SubscriptionId: subscriptionId,
3131
ResourceGroupName: resourceGroupName,
32-
DataProductName: dataProductName,
32+
ImageName: imageName,
3333
}
3434
}
3535

36-
// ParseDataProductID parses 'input' into a DataProductId
37-
func ParseDataProductID(input string) (*DataProductId, error) {
38-
parser := resourceids.NewParserFromResourceIdType(&DataProductId{})
36+
// ParseImageID parses 'input' into a ImageId
37+
func ParseImageID(input string) (*ImageId, error) {
38+
parser := resourceids.NewParserFromResourceIdType(&ImageId{})
3939
parsed, err := parser.Parse(input, false)
4040
if err != nil {
4141
return nil, fmt.Errorf("parsing %q: %+v", input, err)
4242
}
4343

44-
id := DataProductId{}
44+
id := ImageId{}
4545
if err = id.FromParseResult(*parsed); err != nil {
4646
return nil, err
4747
}
4848

4949
return &id, nil
5050
}
5151

52-
// ParseDataProductIDInsensitively parses 'input' case-insensitively into a DataProductId
52+
// ParseImageIDInsensitively parses 'input' case-insensitively into a ImageId
5353
// note: this method should only be used for API response data and not user input
54-
func ParseDataProductIDInsensitively(input string) (*DataProductId, error) {
55-
parser := resourceids.NewParserFromResourceIdType(&DataProductId{})
54+
func ParseImageIDInsensitively(input string) (*ImageId, error) {
55+
parser := resourceids.NewParserFromResourceIdType(&ImageId{})
5656
parsed, err := parser.Parse(input, true)
5757
if err != nil {
5858
return nil, fmt.Errorf("parsing %q: %+v", input, err)
5959
}
6060

61-
id := DataProductId{}
61+
id := ImageId{}
6262
if err = id.FromParseResult(*parsed); err != nil {
6363
return nil, err
6464
}
6565

6666
return &id, nil
6767
}
6868

69-
func (id *DataProductId) FromParseResult(input resourceids.ParseResult) error {
69+
func (id *ImageId) FromParseResult(input resourceids.ParseResult) error {
7070
var ok bool
7171

7272
if id.SubscriptionId, ok = input.Parsed["subscriptionId"]; !ok {
@@ -77,54 +77,54 @@ func (id *DataProductId) FromParseResult(input resourceids.ParseResult) error {
7777
return resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", input)
7878
}
7979

80-
if id.DataProductName, ok = input.Parsed["dataProductName"]; !ok {
81-
return resourceids.NewSegmentNotSpecifiedError(id, "dataProductName", input)
80+
if id.ImageName, ok = input.Parsed["imageName"]; !ok {
81+
return resourceids.NewSegmentNotSpecifiedError(id, "imageName", input)
8282
}
8383

8484
return nil
8585
}
8686

87-
// ValidateDataProductID checks that 'input' can be parsed as a Data Product ID
88-
func ValidateDataProductID(input interface{}, key string) (warnings []string, errors []error) {
87+
// ValidateImageID checks that 'input' can be parsed as a Image ID
88+
func ValidateImageID(input interface{}, key string) (warnings []string, errors []error) {
8989
v, ok := input.(string)
9090
if !ok {
9191
errors = append(errors, fmt.Errorf("expected %q to be a string", key))
9292
return
9393
}
9494

95-
if _, err := ParseDataProductID(v); err != nil {
95+
if _, err := ParseImageID(v); err != nil {
9696
errors = append(errors, err)
9797
}
9898

9999
return
100100
}
101101

102-
// ID returns the formatted Data Product ID
103-
func (id DataProductId) ID() string {
104-
fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.NetworkAnalytics/dataProducts/%s"
105-
return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.DataProductName)
102+
// ID returns the formatted Image ID
103+
func (id ImageId) ID() string {
104+
fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DevOpsInfrastructure/images/%s"
105+
return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ImageName)
106106
}
107107

108-
// Segments returns a slice of Resource ID Segments which comprise this Data Product ID
109-
func (id DataProductId) Segments() []resourceids.Segment {
108+
// Segments returns a slice of Resource ID Segments which comprise this Image ID
109+
func (id ImageId) Segments() []resourceids.Segment {
110110
return []resourceids.Segment{
111111
resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"),
112112
resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"),
113113
resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"),
114114
resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"),
115115
resourceids.StaticSegment("staticProviders", "providers", "providers"),
116-
resourceids.ResourceProviderSegment("staticMicrosoftNetworkAnalytics", "Microsoft.NetworkAnalytics", "Microsoft.NetworkAnalytics"),
117-
resourceids.StaticSegment("staticDataProducts", "dataProducts", "dataProducts"),
118-
resourceids.UserSpecifiedSegment("dataProductName", "dataProductName"),
116+
resourceids.ResourceProviderSegment("staticMicrosoftDevOpsInfrastructure", "Microsoft.DevOpsInfrastructure", "Microsoft.DevOpsInfrastructure"),
117+
resourceids.StaticSegment("staticImages", "images", "images"),
118+
resourceids.UserSpecifiedSegment("imageName", "imageName"),
119119
}
120120
}
121121

122-
// String returns a human-readable description of this Data Product ID
123-
func (id DataProductId) String() string {
122+
// String returns a human-readable description of this Image ID
123+
func (id ImageId) String() string {
124124
components := []string{
125125
fmt.Sprintf("Subscription: %q", id.SubscriptionId),
126126
fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName),
127-
fmt.Sprintf("Data Product Name: %q", id.DataProductName),
127+
fmt.Sprintf("Image Name: %q", id.ImageName),
128128
}
129-
return fmt.Sprintf("Data Product (%s)", strings.Join(components, "\n"))
129+
return fmt.Sprintf("Image (%s)", strings.Join(components, "\n"))
130130
}

0 commit comments

Comments
 (0)