diff --git a/sdk/resourcemanager/network/armnetwork/CHANGELOG.md b/sdk/resourcemanager/network/armnetwork/CHANGELOG.md index 61792cfa0f79..01d0c0e085c7 100644 --- a/sdk/resourcemanager/network/armnetwork/CHANGELOG.md +++ b/sdk/resourcemanager/network/armnetwork/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History +## 2.1.1 (2023-02-22) +### Other Changes + + ## 2.1.0 (2022-12-23) ### Features Added diff --git a/sdk/resourcemanager/network/armnetwork/adminrulecollections_client.go b/sdk/resourcemanager/network/armnetwork/adminrulecollections_client.go index 7540f68dd199..bbdb3006f261 100644 --- a/sdk/resourcemanager/network/armnetwork/adminrulecollections_client.go +++ b/sdk/resourcemanager/network/armnetwork/adminrulecollections_client.go @@ -33,10 +33,10 @@ type AdminRuleCollectionsClient struct { } // NewAdminRuleCollectionsClient creates a new instance of AdminRuleCollectionsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewAdminRuleCollectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AdminRuleCollectionsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -59,14 +59,15 @@ func NewAdminRuleCollectionsClient(subscriptionID string, credential azcore.Toke // CreateOrUpdate - Creates or updates an admin rule collection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// configurationName - The name of the network manager Security Configuration. -// ruleCollectionName - The name of the network manager security Configuration rule collection. -// ruleCollection - The Rule Collection to create or update -// options - AdminRuleCollectionsClientCreateOrUpdateOptions contains the optional parameters for the AdminRuleCollectionsClient.CreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - ruleCollectionName - The name of the network manager security Configuration rule collection. +// - ruleCollection - The Rule Collection to create or update +// - options - AdminRuleCollectionsClientCreateOrUpdateOptions contains the optional parameters for the AdminRuleCollectionsClient.CreateOrUpdate +// method. func (client *AdminRuleCollectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleCollection AdminRuleCollection, options *AdminRuleCollectionsClientCreateOrUpdateOptions) (AdminRuleCollectionsClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, ruleCollection, options) if err != nil { @@ -127,13 +128,14 @@ func (client *AdminRuleCollectionsClient) createOrUpdateHandleResponse(resp *htt // BeginDelete - Deletes an admin rule collection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// configurationName - The name of the network manager Security Configuration. -// ruleCollectionName - The name of the network manager security Configuration rule collection. -// options - AdminRuleCollectionsClientBeginDeleteOptions contains the optional parameters for the AdminRuleCollectionsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - ruleCollectionName - The name of the network manager security Configuration rule collection. +// - options - AdminRuleCollectionsClientBeginDeleteOptions contains the optional parameters for the AdminRuleCollectionsClient.BeginDelete +// method. func (client *AdminRuleCollectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, options *AdminRuleCollectionsClientBeginDeleteOptions) (*runtime.Poller[AdminRuleCollectionsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, options) @@ -150,6 +152,7 @@ func (client *AdminRuleCollectionsClient) BeginDelete(ctx context.Context, resou // Delete - Deletes an admin rule collection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *AdminRuleCollectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, options *AdminRuleCollectionsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, options) @@ -205,13 +208,14 @@ func (client *AdminRuleCollectionsClient) deleteCreateRequest(ctx context.Contex // Get - Gets a network manager security admin configuration rule collection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// configurationName - The name of the network manager Security Configuration. -// ruleCollectionName - The name of the network manager security Configuration rule collection. -// options - AdminRuleCollectionsClientGetOptions contains the optional parameters for the AdminRuleCollectionsClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - ruleCollectionName - The name of the network manager security Configuration rule collection. +// - options - AdminRuleCollectionsClientGetOptions contains the optional parameters for the AdminRuleCollectionsClient.Get +// method. func (client *AdminRuleCollectionsClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, options *AdminRuleCollectionsClientGetOptions) (AdminRuleCollectionsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, options) if err != nil { @@ -271,12 +275,13 @@ func (client *AdminRuleCollectionsClient) getHandleResponse(resp *http.Response) } // NewListPager - Lists all the rule collections in a security admin configuration, in a paginated format. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// configurationName - The name of the network manager Security Configuration. -// options - AdminRuleCollectionsClientListOptions contains the optional parameters for the AdminRuleCollectionsClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - options - AdminRuleCollectionsClientListOptions contains the optional parameters for the AdminRuleCollectionsClient.NewListPager +// method. func (client *AdminRuleCollectionsClient) NewListPager(resourceGroupName string, networkManagerName string, configurationName string, options *AdminRuleCollectionsClientListOptions) *runtime.Pager[AdminRuleCollectionsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[AdminRuleCollectionsClientListResponse]{ More: func(page AdminRuleCollectionsClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/adminrulecollections_client_example_test.go b/sdk/resourcemanager/network/armnetwork/adminrulecollections_client_example_test.go deleted file mode 100644 index af83a4340d07..000000000000 --- a/sdk/resourcemanager/network/armnetwork/adminrulecollections_client_example_test.go +++ /dev/null @@ -1,111 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerAdminRuleCollectionList.json -func ExampleAdminRuleCollectionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAdminRuleCollectionsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", "testNetworkManager", "myTestSecurityConfig", &armnetwork.AdminRuleCollectionsClientListOptions{Top: nil, - SkipToken: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerAdminRuleCollectionGet.json -func ExampleAdminRuleCollectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAdminRuleCollectionsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "testNetworkManager", "myTestSecurityConfig", "testRuleCollection", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerAdminRuleCollectionPut.json -func ExampleAdminRuleCollectionsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAdminRuleCollectionsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, "rg1", "testNetworkManager", "myTestSecurityConfig", "testRuleCollection", armnetwork.AdminRuleCollection{ - Properties: &armnetwork.AdminRuleCollectionPropertiesFormat{ - Description: to.Ptr("A sample policy"), - AppliesToGroups: []*armnetwork.ManagerSecurityGroupItem{ - { - NetworkGroupID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/testGroup"), - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerAdminRuleCollectionDelete.json -func ExampleAdminRuleCollectionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAdminRuleCollectionsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "testNetworkManager", "myTestSecurityConfig", "testRuleCollection", &armnetwork.AdminRuleCollectionsClientBeginDeleteOptions{Force: to.Ptr(false)}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/network/armnetwork/adminrules_client.go b/sdk/resourcemanager/network/armnetwork/adminrules_client.go index dc9d10f5b780..1fdd5176869b 100644 --- a/sdk/resourcemanager/network/armnetwork/adminrules_client.go +++ b/sdk/resourcemanager/network/armnetwork/adminrules_client.go @@ -33,10 +33,10 @@ type AdminRulesClient struct { } // NewAdminRulesClient creates a new instance of AdminRulesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewAdminRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AdminRulesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -59,15 +59,16 @@ func NewAdminRulesClient(subscriptionID string, credential azcore.TokenCredentia // CreateOrUpdate - Creates or updates an admin rule. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// configurationName - The name of the network manager Security Configuration. -// ruleCollectionName - The name of the network manager security Configuration rule collection. -// ruleName - The name of the rule. -// adminRule - The admin rule to create or update -// options - AdminRulesClientCreateOrUpdateOptions contains the optional parameters for the AdminRulesClient.CreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - ruleCollectionName - The name of the network manager security Configuration rule collection. +// - ruleName - The name of the rule. +// - adminRule - The admin rule to create or update +// - options - AdminRulesClientCreateOrUpdateOptions contains the optional parameters for the AdminRulesClient.CreateOrUpdate +// method. func (client *AdminRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleName string, adminRule BaseAdminRuleClassification, options *AdminRulesClientCreateOrUpdateOptions) (AdminRulesClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, ruleName, adminRule, options) if err != nil { @@ -132,13 +133,14 @@ func (client *AdminRulesClient) createOrUpdateHandleResponse(resp *http.Response // BeginDelete - Deletes an admin rule. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// configurationName - The name of the network manager Security Configuration. -// ruleCollectionName - The name of the network manager security Configuration rule collection. -// ruleName - The name of the rule. -// options - AdminRulesClientBeginDeleteOptions contains the optional parameters for the AdminRulesClient.BeginDelete method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - ruleCollectionName - The name of the network manager security Configuration rule collection. +// - ruleName - The name of the rule. +// - options - AdminRulesClientBeginDeleteOptions contains the optional parameters for the AdminRulesClient.BeginDelete method. func (client *AdminRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleName string, options *AdminRulesClientBeginDeleteOptions) (*runtime.Poller[AdminRulesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, ruleName, options) @@ -155,6 +157,7 @@ func (client *AdminRulesClient) BeginDelete(ctx context.Context, resourceGroupNa // Delete - Deletes an admin rule. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *AdminRulesClient) deleteOperation(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleName string, options *AdminRulesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, ruleName, options) @@ -214,13 +217,14 @@ func (client *AdminRulesClient) deleteCreateRequest(ctx context.Context, resourc // Get - Gets a network manager security configuration admin rule. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// configurationName - The name of the network manager Security Configuration. -// ruleCollectionName - The name of the network manager security Configuration rule collection. -// ruleName - The name of the rule. -// options - AdminRulesClientGetOptions contains the optional parameters for the AdminRulesClient.Get method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - ruleCollectionName - The name of the network manager security Configuration rule collection. +// - ruleName - The name of the rule. +// - options - AdminRulesClientGetOptions contains the optional parameters for the AdminRulesClient.Get method. func (client *AdminRulesClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, ruleName string, options *AdminRulesClientGetOptions) (AdminRulesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, ruleCollectionName, ruleName, options) if err != nil { @@ -284,12 +288,13 @@ func (client *AdminRulesClient) getHandleResponse(resp *http.Response) (AdminRul } // NewListPager - List all network manager security configuration admin rules. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// configurationName - The name of the network manager Security Configuration. -// ruleCollectionName - The name of the network manager security Configuration rule collection. -// options - AdminRulesClientListOptions contains the optional parameters for the AdminRulesClient.List method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - ruleCollectionName - The name of the network manager security Configuration rule collection. +// - options - AdminRulesClientListOptions contains the optional parameters for the AdminRulesClient.NewListPager method. func (client *AdminRulesClient) NewListPager(resourceGroupName string, networkManagerName string, configurationName string, ruleCollectionName string, options *AdminRulesClientListOptions) *runtime.Pager[AdminRulesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[AdminRulesClientListResponse]{ More: func(page AdminRulesClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/adminrules_client_example_test.go b/sdk/resourcemanager/network/armnetwork/adminrules_client_example_test.go deleted file mode 100644 index a1330bc6005b..000000000000 --- a/sdk/resourcemanager/network/armnetwork/adminrules_client_example_test.go +++ /dev/null @@ -1,169 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerAdminRuleList.json -func ExampleAdminRulesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAdminRulesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", "testNetworkManager", "myTestSecurityConfig", "testRuleCollection", &armnetwork.AdminRulesClientListOptions{Top: nil, - SkipToken: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerAdminRuleGet.json -func ExampleAdminRulesClient_Get_getsSecurityAdminRule() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAdminRulesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "testNetworkManager", "myTestSecurityConfig", "testRuleCollection", "SampleAdminRule", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerDefaultAdminRuleGet.json -func ExampleAdminRulesClient_Get_getsSecurityDefaultAdminRule() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAdminRulesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "testNetworkManager", "myTestSecurityConfig", "testRuleCollection", "SampleDefaultAdminRule", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerDefaultAdminRulePut.json -func ExampleAdminRulesClient_CreateOrUpdate_createADefaultAdminRule() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAdminRulesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, "rg1", "testNetworkManager", "myTestSecurityConfig", "testRuleCollection", "SampleDefaultAdminRule", &armnetwork.DefaultAdminRule{ - Kind: to.Ptr(armnetwork.AdminRuleKindDefault), - Properties: &armnetwork.DefaultAdminPropertiesFormat{ - Flag: to.Ptr("AllowVnetInbound"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerAdminRulePut.json -func ExampleAdminRulesClient_CreateOrUpdate_createAnAdminRule() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAdminRulesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, "rg1", "testNetworkManager", "myTestSecurityConfig", "testRuleCollection", "SampleAdminRule", &armnetwork.AdminRule{ - Kind: to.Ptr(armnetwork.AdminRuleKindCustom), - Properties: &armnetwork.AdminPropertiesFormat{ - Description: to.Ptr("This is Sample Admin Rule"), - Access: to.Ptr(armnetwork.SecurityConfigurationRuleAccessDeny), - DestinationPortRanges: []*string{ - to.Ptr("22")}, - Destinations: []*armnetwork.AddressPrefixItem{ - { - AddressPrefix: to.Ptr("*"), - AddressPrefixType: to.Ptr(armnetwork.AddressPrefixTypeIPPrefix), - }}, - Direction: to.Ptr(armnetwork.SecurityConfigurationRuleDirectionInbound), - Priority: to.Ptr[int32](1), - SourcePortRanges: []*string{ - to.Ptr("0-65535")}, - Sources: []*armnetwork.AddressPrefixItem{ - { - AddressPrefix: to.Ptr("Internet"), - AddressPrefixType: to.Ptr(armnetwork.AddressPrefixTypeServiceTag), - }}, - Protocol: to.Ptr(armnetwork.SecurityConfigurationRuleProtocolTCP), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerAdminRuleDelete.json -func ExampleAdminRulesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAdminRulesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "testNetworkManager", "myTestSecurityConfig", "testRuleCollection", "SampleAdminRule", &armnetwork.AdminRulesClientBeginDeleteOptions{Force: to.Ptr(false)}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/network/armnetwork/applicationgatewayprivateendpointconnections_client.go b/sdk/resourcemanager/network/armnetwork/applicationgatewayprivateendpointconnections_client.go index 7d08392675be..ed4edd37679b 100644 --- a/sdk/resourcemanager/network/armnetwork/applicationgatewayprivateendpointconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/applicationgatewayprivateendpointconnections_client.go @@ -32,10 +32,10 @@ type ApplicationGatewayPrivateEndpointConnectionsClient struct { } // NewApplicationGatewayPrivateEndpointConnectionsClient creates a new instance of ApplicationGatewayPrivateEndpointConnectionsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewApplicationGatewayPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationGatewayPrivateEndpointConnectionsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewApplicationGatewayPrivateEndpointConnectionsClient(subscriptionID string // BeginDelete - Deletes the specified private endpoint connection on application gateway. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// applicationGatewayName - The name of the application gateway. -// connectionName - The name of the application gateway private endpoint connection. -// options - ApplicationGatewayPrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the -// ApplicationGatewayPrivateEndpointConnectionsClient.BeginDelete method. +// - resourceGroupName - The name of the resource group. +// - applicationGatewayName - The name of the application gateway. +// - connectionName - The name of the application gateway private endpoint connection. +// - options - ApplicationGatewayPrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the +// ApplicationGatewayPrivateEndpointConnectionsClient.BeginDelete method. func (client *ApplicationGatewayPrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string, options *ApplicationGatewayPrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, applicationGatewayName, connectionName, options) @@ -80,6 +81,7 @@ func (client *ApplicationGatewayPrivateEndpointConnectionsClient) BeginDelete(ct // Delete - Deletes the specified private endpoint connection on application gateway. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ApplicationGatewayPrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string, options *ApplicationGatewayPrivateEndpointConnectionsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, applicationGatewayName, connectionName, options) @@ -128,12 +130,13 @@ func (client *ApplicationGatewayPrivateEndpointConnectionsClient) deleteCreateRe // Get - Gets the specified private endpoint connection on application gateway. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// applicationGatewayName - The name of the application gateway. -// connectionName - The name of the application gateway private endpoint connection. -// options - ApplicationGatewayPrivateEndpointConnectionsClientGetOptions contains the optional parameters for the ApplicationGatewayPrivateEndpointConnectionsClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - applicationGatewayName - The name of the application gateway. +// - connectionName - The name of the application gateway private endpoint connection. +// - options - ApplicationGatewayPrivateEndpointConnectionsClientGetOptions contains the optional parameters for the ApplicationGatewayPrivateEndpointConnectionsClient.Get +// method. func (client *ApplicationGatewayPrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string, options *ApplicationGatewayPrivateEndpointConnectionsClientGetOptions) (ApplicationGatewayPrivateEndpointConnectionsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, applicationGatewayName, connectionName, options) if err != nil { @@ -189,11 +192,12 @@ func (client *ApplicationGatewayPrivateEndpointConnectionsClient) getHandleRespo } // NewListPager - Lists all private endpoint connections on an application gateway. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// applicationGatewayName - The name of the application gateway. -// options - ApplicationGatewayPrivateEndpointConnectionsClientListOptions contains the optional parameters for the ApplicationGatewayPrivateEndpointConnectionsClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - applicationGatewayName - The name of the application gateway. +// - options - ApplicationGatewayPrivateEndpointConnectionsClientListOptions contains the optional parameters for the ApplicationGatewayPrivateEndpointConnectionsClient.NewListPager +// method. func (client *ApplicationGatewayPrivateEndpointConnectionsClient) NewListPager(resourceGroupName string, applicationGatewayName string, options *ApplicationGatewayPrivateEndpointConnectionsClientListOptions) *runtime.Pager[ApplicationGatewayPrivateEndpointConnectionsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ApplicationGatewayPrivateEndpointConnectionsClientListResponse]{ More: func(page ApplicationGatewayPrivateEndpointConnectionsClientListResponse) bool { @@ -259,13 +263,14 @@ func (client *ApplicationGatewayPrivateEndpointConnectionsClient) listHandleResp // BeginUpdate - Updates the specified private endpoint connection on application gateway. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// applicationGatewayName - The name of the application gateway. -// connectionName - The name of the application gateway private endpoint connection. -// parameters - Parameters supplied to update application gateway private endpoint connection operation. -// options - ApplicationGatewayPrivateEndpointConnectionsClientBeginUpdateOptions contains the optional parameters for the -// ApplicationGatewayPrivateEndpointConnectionsClient.BeginUpdate method. +// - resourceGroupName - The name of the resource group. +// - applicationGatewayName - The name of the application gateway. +// - connectionName - The name of the application gateway private endpoint connection. +// - parameters - Parameters supplied to update application gateway private endpoint connection operation. +// - options - ApplicationGatewayPrivateEndpointConnectionsClientBeginUpdateOptions contains the optional parameters for the +// ApplicationGatewayPrivateEndpointConnectionsClient.BeginUpdate method. func (client *ApplicationGatewayPrivateEndpointConnectionsClient) BeginUpdate(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string, parameters ApplicationGatewayPrivateEndpointConnection, options *ApplicationGatewayPrivateEndpointConnectionsClientBeginUpdateOptions) (*runtime.Poller[ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.update(ctx, resourceGroupName, applicationGatewayName, connectionName, parameters, options) @@ -282,6 +287,7 @@ func (client *ApplicationGatewayPrivateEndpointConnectionsClient) BeginUpdate(ct // Update - Updates the specified private endpoint connection on application gateway. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ApplicationGatewayPrivateEndpointConnectionsClient) update(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string, parameters ApplicationGatewayPrivateEndpointConnection, options *ApplicationGatewayPrivateEndpointConnectionsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, applicationGatewayName, connectionName, parameters, options) diff --git a/sdk/resourcemanager/network/armnetwork/applicationgatewayprivateendpointconnections_client_example_test.go b/sdk/resourcemanager/network/armnetwork/applicationgatewayprivateendpointconnections_client_example_test.go deleted file mode 100644 index bed602edcaf8..000000000000 --- a/sdk/resourcemanager/network/armnetwork/applicationgatewayprivateendpointconnections_client_example_test.go +++ /dev/null @@ -1,116 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ApplicationGatewayPrivateEndpointConnectionDelete.json -func ExampleApplicationGatewayPrivateEndpointConnectionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewApplicationGatewayPrivateEndpointConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "appgw", "connection1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json -func ExampleApplicationGatewayPrivateEndpointConnectionsClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewApplicationGatewayPrivateEndpointConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdate(ctx, "rg1", "appgw", "connection1", armnetwork.ApplicationGatewayPrivateEndpointConnection{ - Name: to.Ptr("connection1"), - Properties: &armnetwork.ApplicationGatewayPrivateEndpointConnectionProperties{ - PrivateEndpoint: &armnetwork.PrivateEndpoint{ - ID: to.Ptr("/subscriptions/subId2/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/testPe"), - }, - PrivateLinkServiceConnectionState: &armnetwork.PrivateLinkServiceConnectionState{ - Description: to.Ptr("approved it for some reason."), - Status: to.Ptr("Approved"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json -func ExampleApplicationGatewayPrivateEndpointConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewApplicationGatewayPrivateEndpointConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "appgw", "connection1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ApplicationGatewayPrivateEndpointConnectionList.json -func ExampleApplicationGatewayPrivateEndpointConnectionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewApplicationGatewayPrivateEndpointConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", "appgw", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/applicationgatewayprivatelinkresources_client.go b/sdk/resourcemanager/network/armnetwork/applicationgatewayprivatelinkresources_client.go index 34a98595f470..8ca2958ca21e 100644 --- a/sdk/resourcemanager/network/armnetwork/applicationgatewayprivatelinkresources_client.go +++ b/sdk/resourcemanager/network/armnetwork/applicationgatewayprivatelinkresources_client.go @@ -32,10 +32,10 @@ type ApplicationGatewayPrivateLinkResourcesClient struct { } // NewApplicationGatewayPrivateLinkResourcesClient creates a new instance of ApplicationGatewayPrivateLinkResourcesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewApplicationGatewayPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationGatewayPrivateLinkResourcesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,11 +57,12 @@ func NewApplicationGatewayPrivateLinkResourcesClient(subscriptionID string, cred } // NewListPager - Lists all private link resources on an application gateway. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// applicationGatewayName - The name of the application gateway. -// options - ApplicationGatewayPrivateLinkResourcesClientListOptions contains the optional parameters for the ApplicationGatewayPrivateLinkResourcesClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - applicationGatewayName - The name of the application gateway. +// - options - ApplicationGatewayPrivateLinkResourcesClientListOptions contains the optional parameters for the ApplicationGatewayPrivateLinkResourcesClient.NewListPager +// method. func (client *ApplicationGatewayPrivateLinkResourcesClient) NewListPager(resourceGroupName string, applicationGatewayName string, options *ApplicationGatewayPrivateLinkResourcesClientListOptions) *runtime.Pager[ApplicationGatewayPrivateLinkResourcesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ApplicationGatewayPrivateLinkResourcesClientListResponse]{ More: func(page ApplicationGatewayPrivateLinkResourcesClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/applicationgatewayprivatelinkresources_client_example_test.go b/sdk/resourcemanager/network/armnetwork/applicationgatewayprivatelinkresources_client_example_test.go deleted file mode 100644 index 83a653b03e39..000000000000 --- a/sdk/resourcemanager/network/armnetwork/applicationgatewayprivatelinkresources_client_example_test.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ApplicationGatewayPrivateLinkResourceList.json -func ExampleApplicationGatewayPrivateLinkResourcesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewApplicationGatewayPrivateLinkResourcesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", "appgw", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/applicationgateways_client.go b/sdk/resourcemanager/network/armnetwork/applicationgateways_client.go index fbc0b0539fb0..3af21230191e 100644 --- a/sdk/resourcemanager/network/armnetwork/applicationgateways_client.go +++ b/sdk/resourcemanager/network/armnetwork/applicationgateways_client.go @@ -32,10 +32,10 @@ type ApplicationGatewaysClient struct { } // NewApplicationGatewaysClient creates a new instance of ApplicationGatewaysClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewApplicationGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationGatewaysClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,11 +58,12 @@ func NewApplicationGatewaysClient(subscriptionID string, credential azcore.Token // BeginBackendHealth - Gets the backend health of the specified application gateway in a resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// applicationGatewayName - The name of the application gateway. -// options - ApplicationGatewaysClientBeginBackendHealthOptions contains the optional parameters for the ApplicationGatewaysClient.BeginBackendHealth -// method. +// - resourceGroupName - The name of the resource group. +// - applicationGatewayName - The name of the application gateway. +// - options - ApplicationGatewaysClientBeginBackendHealthOptions contains the optional parameters for the ApplicationGatewaysClient.BeginBackendHealth +// method. func (client *ApplicationGatewaysClient) BeginBackendHealth(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginBackendHealthOptions) (*runtime.Poller[ApplicationGatewaysClientBackendHealthResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.backendHealth(ctx, resourceGroupName, applicationGatewayName, options) @@ -79,6 +80,7 @@ func (client *ApplicationGatewaysClient) BeginBackendHealth(ctx context.Context, // BackendHealth - Gets the backend health of the specified application gateway in a resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ApplicationGatewaysClient) backendHealth(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginBackendHealthOptions) (*http.Response, error) { req, err := client.backendHealthCreateRequest(ctx, resourceGroupName, applicationGatewayName, options) @@ -127,12 +129,13 @@ func (client *ApplicationGatewaysClient) backendHealthCreateRequest(ctx context. // BeginBackendHealthOnDemand - Gets the backend health for given combination of backend pool and http setting of the specified // application gateway in a resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// applicationGatewayName - The name of the application gateway. -// probeRequest - Request body for on-demand test probe operation. -// options - ApplicationGatewaysClientBeginBackendHealthOnDemandOptions contains the optional parameters for the ApplicationGatewaysClient.BeginBackendHealthOnDemand -// method. +// - resourceGroupName - The name of the resource group. +// - applicationGatewayName - The name of the application gateway. +// - probeRequest - Request body for on-demand test probe operation. +// - options - ApplicationGatewaysClientBeginBackendHealthOnDemandOptions contains the optional parameters for the ApplicationGatewaysClient.BeginBackendHealthOnDemand +// method. func (client *ApplicationGatewaysClient) BeginBackendHealthOnDemand(ctx context.Context, resourceGroupName string, applicationGatewayName string, probeRequest ApplicationGatewayOnDemandProbe, options *ApplicationGatewaysClientBeginBackendHealthOnDemandOptions) (*runtime.Poller[ApplicationGatewaysClientBackendHealthOnDemandResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.backendHealthOnDemand(ctx, resourceGroupName, applicationGatewayName, probeRequest, options) @@ -150,6 +153,7 @@ func (client *ApplicationGatewaysClient) BeginBackendHealthOnDemand(ctx context. // BackendHealthOnDemand - Gets the backend health for given combination of backend pool and http setting of the specified // application gateway in a resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ApplicationGatewaysClient) backendHealthOnDemand(ctx context.Context, resourceGroupName string, applicationGatewayName string, probeRequest ApplicationGatewayOnDemandProbe, options *ApplicationGatewaysClientBeginBackendHealthOnDemandOptions) (*http.Response, error) { req, err := client.backendHealthOnDemandCreateRequest(ctx, resourceGroupName, applicationGatewayName, probeRequest, options) @@ -197,12 +201,13 @@ func (client *ApplicationGatewaysClient) backendHealthOnDemandCreateRequest(ctx // BeginCreateOrUpdate - Creates or updates the specified application gateway. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// applicationGatewayName - The name of the application gateway. -// parameters - Parameters supplied to the create or update application gateway operation. -// options - ApplicationGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationGatewaysClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - applicationGatewayName - The name of the application gateway. +// - parameters - Parameters supplied to the create or update application gateway operation. +// - options - ApplicationGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationGatewaysClient.BeginCreateOrUpdate +// method. func (client *ApplicationGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, applicationGatewayName string, parameters ApplicationGateway, options *ApplicationGatewaysClientBeginCreateOrUpdateOptions) (*runtime.Poller[ApplicationGatewaysClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, applicationGatewayName, parameters, options) @@ -219,6 +224,7 @@ func (client *ApplicationGatewaysClient) BeginCreateOrUpdate(ctx context.Context // CreateOrUpdate - Creates or updates the specified application gateway. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ApplicationGatewaysClient) createOrUpdate(ctx context.Context, resourceGroupName string, applicationGatewayName string, parameters ApplicationGateway, options *ApplicationGatewaysClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, applicationGatewayName, parameters, options) @@ -263,11 +269,12 @@ func (client *ApplicationGatewaysClient) createOrUpdateCreateRequest(ctx context // BeginDelete - Deletes the specified application gateway. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// applicationGatewayName - The name of the application gateway. -// options - ApplicationGatewaysClientBeginDeleteOptions contains the optional parameters for the ApplicationGatewaysClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - applicationGatewayName - The name of the application gateway. +// - options - ApplicationGatewaysClientBeginDeleteOptions contains the optional parameters for the ApplicationGatewaysClient.BeginDelete +// method. func (client *ApplicationGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginDeleteOptions) (*runtime.Poller[ApplicationGatewaysClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, applicationGatewayName, options) @@ -284,6 +291,7 @@ func (client *ApplicationGatewaysClient) BeginDelete(ctx context.Context, resour // Delete - Deletes the specified application gateway. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ApplicationGatewaysClient) deleteOperation(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, applicationGatewayName, options) @@ -328,10 +336,11 @@ func (client *ApplicationGatewaysClient) deleteCreateRequest(ctx context.Context // Get - Gets the specified application gateway. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// applicationGatewayName - The name of the application gateway. -// options - ApplicationGatewaysClientGetOptions contains the optional parameters for the ApplicationGatewaysClient.Get method. +// - resourceGroupName - The name of the resource group. +// - applicationGatewayName - The name of the application gateway. +// - options - ApplicationGatewaysClientGetOptions contains the optional parameters for the ApplicationGatewaysClient.Get method. func (client *ApplicationGatewaysClient) Get(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientGetOptions) (ApplicationGatewaysClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, applicationGatewayName, options) if err != nil { @@ -384,10 +393,11 @@ func (client *ApplicationGatewaysClient) getHandleResponse(resp *http.Response) // GetSSLPredefinedPolicy - Gets Ssl predefined policy with the specified policy name. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// predefinedPolicyName - Name of Ssl predefined policy. -// options - ApplicationGatewaysClientGetSSLPredefinedPolicyOptions contains the optional parameters for the ApplicationGatewaysClient.GetSSLPredefinedPolicy -// method. +// - predefinedPolicyName - Name of Ssl predefined policy. +// - options - ApplicationGatewaysClientGetSSLPredefinedPolicyOptions contains the optional parameters for the ApplicationGatewaysClient.GetSSLPredefinedPolicy +// method. func (client *ApplicationGatewaysClient) GetSSLPredefinedPolicy(ctx context.Context, predefinedPolicyName string, options *ApplicationGatewaysClientGetSSLPredefinedPolicyOptions) (ApplicationGatewaysClientGetSSLPredefinedPolicyResponse, error) { req, err := client.getSSLPredefinedPolicyCreateRequest(ctx, predefinedPolicyName, options) if err != nil { @@ -435,10 +445,11 @@ func (client *ApplicationGatewaysClient) getSSLPredefinedPolicyHandleResponse(re } // NewListPager - Lists all application gateways in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - ApplicationGatewaysClientListOptions contains the optional parameters for the ApplicationGatewaysClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - options - ApplicationGatewaysClientListOptions contains the optional parameters for the ApplicationGatewaysClient.NewListPager +// method. func (client *ApplicationGatewaysClient) NewListPager(resourceGroupName string, options *ApplicationGatewaysClientListOptions) *runtime.Pager[ApplicationGatewaysClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ApplicationGatewaysClientListResponse]{ More: func(page ApplicationGatewaysClientListResponse) bool { @@ -499,9 +510,10 @@ func (client *ApplicationGatewaysClient) listHandleResponse(resp *http.Response) } // NewListAllPager - Gets all the application gateways in a subscription. +// // Generated from API version 2022-07-01 -// options - ApplicationGatewaysClientListAllOptions contains the optional parameters for the ApplicationGatewaysClient.ListAll -// method. +// - options - ApplicationGatewaysClientListAllOptions contains the optional parameters for the ApplicationGatewaysClient.NewListAllPager +// method. func (client *ApplicationGatewaysClient) NewListAllPager(options *ApplicationGatewaysClientListAllOptions) *runtime.Pager[ApplicationGatewaysClientListAllResponse] { return runtime.NewPager(runtime.PagingHandler[ApplicationGatewaysClientListAllResponse]{ More: func(page ApplicationGatewaysClientListAllResponse) bool { @@ -559,9 +571,10 @@ func (client *ApplicationGatewaysClient) listAllHandleResponse(resp *http.Respon // ListAvailableRequestHeaders - Lists all available request headers. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// options - ApplicationGatewaysClientListAvailableRequestHeadersOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableRequestHeaders -// method. +// - options - ApplicationGatewaysClientListAvailableRequestHeadersOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableRequestHeaders +// method. func (client *ApplicationGatewaysClient) ListAvailableRequestHeaders(ctx context.Context, options *ApplicationGatewaysClientListAvailableRequestHeadersOptions) (ApplicationGatewaysClientListAvailableRequestHeadersResponse, error) { req, err := client.listAvailableRequestHeadersCreateRequest(ctx, options) if err != nil { @@ -606,9 +619,10 @@ func (client *ApplicationGatewaysClient) listAvailableRequestHeadersHandleRespon // ListAvailableResponseHeaders - Lists all available response headers. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// options - ApplicationGatewaysClientListAvailableResponseHeadersOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableResponseHeaders -// method. +// - options - ApplicationGatewaysClientListAvailableResponseHeadersOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableResponseHeaders +// method. func (client *ApplicationGatewaysClient) ListAvailableResponseHeaders(ctx context.Context, options *ApplicationGatewaysClientListAvailableResponseHeadersOptions) (ApplicationGatewaysClientListAvailableResponseHeadersResponse, error) { req, err := client.listAvailableResponseHeadersCreateRequest(ctx, options) if err != nil { @@ -653,9 +667,10 @@ func (client *ApplicationGatewaysClient) listAvailableResponseHeadersHandleRespo // ListAvailableSSLOptions - Lists available Ssl options for configuring Ssl policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// options - ApplicationGatewaysClientListAvailableSSLOptionsOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableSSLOptions -// method. +// - options - ApplicationGatewaysClientListAvailableSSLOptionsOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableSSLOptions +// method. func (client *ApplicationGatewaysClient) ListAvailableSSLOptions(ctx context.Context, options *ApplicationGatewaysClientListAvailableSSLOptionsOptions) (ApplicationGatewaysClientListAvailableSSLOptionsResponse, error) { req, err := client.listAvailableSSLOptionsCreateRequest(ctx, options) if err != nil { @@ -699,9 +714,10 @@ func (client *ApplicationGatewaysClient) listAvailableSSLOptionsHandleResponse(r } // NewListAvailableSSLPredefinedPoliciesPager - Lists all SSL predefined policies for configuring Ssl policy. +// // Generated from API version 2022-07-01 -// options - ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableSSLPredefinedPolicies -// method. +// - options - ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesOptions contains the optional parameters for the ApplicationGatewaysClient.NewListAvailableSSLPredefinedPoliciesPager +// method. func (client *ApplicationGatewaysClient) NewListAvailableSSLPredefinedPoliciesPager(options *ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesOptions) *runtime.Pager[ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse] { return runtime.NewPager(runtime.PagingHandler[ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse]{ More: func(page ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse) bool { @@ -759,9 +775,10 @@ func (client *ApplicationGatewaysClient) listAvailableSSLPredefinedPoliciesHandl // ListAvailableServerVariables - Lists all available server variables. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// options - ApplicationGatewaysClientListAvailableServerVariablesOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableServerVariables -// method. +// - options - ApplicationGatewaysClientListAvailableServerVariablesOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableServerVariables +// method. func (client *ApplicationGatewaysClient) ListAvailableServerVariables(ctx context.Context, options *ApplicationGatewaysClientListAvailableServerVariablesOptions) (ApplicationGatewaysClientListAvailableServerVariablesResponse, error) { req, err := client.listAvailableServerVariablesCreateRequest(ctx, options) if err != nil { @@ -806,9 +823,10 @@ func (client *ApplicationGatewaysClient) listAvailableServerVariablesHandleRespo // ListAvailableWafRuleSets - Lists all available web application firewall rule sets. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// options - ApplicationGatewaysClientListAvailableWafRuleSetsOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableWafRuleSets -// method. +// - options - ApplicationGatewaysClientListAvailableWafRuleSetsOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableWafRuleSets +// method. func (client *ApplicationGatewaysClient) ListAvailableWafRuleSets(ctx context.Context, options *ApplicationGatewaysClientListAvailableWafRuleSetsOptions) (ApplicationGatewaysClientListAvailableWafRuleSetsResponse, error) { req, err := client.listAvailableWafRuleSetsCreateRequest(ctx, options) if err != nil { @@ -853,11 +871,12 @@ func (client *ApplicationGatewaysClient) listAvailableWafRuleSetsHandleResponse( // BeginStart - Starts the specified application gateway. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// applicationGatewayName - The name of the application gateway. -// options - ApplicationGatewaysClientBeginStartOptions contains the optional parameters for the ApplicationGatewaysClient.BeginStart -// method. +// - resourceGroupName - The name of the resource group. +// - applicationGatewayName - The name of the application gateway. +// - options - ApplicationGatewaysClientBeginStartOptions contains the optional parameters for the ApplicationGatewaysClient.BeginStart +// method. func (client *ApplicationGatewaysClient) BeginStart(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginStartOptions) (*runtime.Poller[ApplicationGatewaysClientStartResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.start(ctx, resourceGroupName, applicationGatewayName, options) @@ -874,6 +893,7 @@ func (client *ApplicationGatewaysClient) BeginStart(ctx context.Context, resourc // Start - Starts the specified application gateway. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ApplicationGatewaysClient) start(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginStartOptions) (*http.Response, error) { req, err := client.startCreateRequest(ctx, resourceGroupName, applicationGatewayName, options) @@ -918,11 +938,12 @@ func (client *ApplicationGatewaysClient) startCreateRequest(ctx context.Context, // BeginStop - Stops the specified application gateway in a resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// applicationGatewayName - The name of the application gateway. -// options - ApplicationGatewaysClientBeginStopOptions contains the optional parameters for the ApplicationGatewaysClient.BeginStop -// method. +// - resourceGroupName - The name of the resource group. +// - applicationGatewayName - The name of the application gateway. +// - options - ApplicationGatewaysClientBeginStopOptions contains the optional parameters for the ApplicationGatewaysClient.BeginStop +// method. func (client *ApplicationGatewaysClient) BeginStop(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginStopOptions) (*runtime.Poller[ApplicationGatewaysClientStopResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.stop(ctx, resourceGroupName, applicationGatewayName, options) @@ -939,6 +960,7 @@ func (client *ApplicationGatewaysClient) BeginStop(ctx context.Context, resource // Stop - Stops the specified application gateway in a resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ApplicationGatewaysClient) stop(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginStopOptions) (*http.Response, error) { req, err := client.stopCreateRequest(ctx, resourceGroupName, applicationGatewayName, options) @@ -983,12 +1005,13 @@ func (client *ApplicationGatewaysClient) stopCreateRequest(ctx context.Context, // UpdateTags - Updates the specified application gateway tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// applicationGatewayName - The name of the application gateway. -// parameters - Parameters supplied to update application gateway tags. -// options - ApplicationGatewaysClientUpdateTagsOptions contains the optional parameters for the ApplicationGatewaysClient.UpdateTags -// method. +// - resourceGroupName - The name of the resource group. +// - applicationGatewayName - The name of the application gateway. +// - parameters - Parameters supplied to update application gateway tags. +// - options - ApplicationGatewaysClientUpdateTagsOptions contains the optional parameters for the ApplicationGatewaysClient.UpdateTags +// method. func (client *ApplicationGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, applicationGatewayName string, parameters TagsObject, options *ApplicationGatewaysClientUpdateTagsOptions) (ApplicationGatewaysClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, applicationGatewayName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/applicationgateways_client_example_test.go b/sdk/resourcemanager/network/armnetwork/applicationgateways_client_example_test.go deleted file mode 100644 index 558e28284492..000000000000 --- a/sdk/resourcemanager/network/armnetwork/applicationgateways_client_example_test.go +++ /dev/null @@ -1,691 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ApplicationGatewayDelete.json -func ExampleApplicationGatewaysClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewApplicationGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "appgw", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ApplicationGatewayGet.json -func ExampleApplicationGatewaysClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewApplicationGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "appgw", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ApplicationGatewayCreate.json -func ExampleApplicationGatewaysClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewApplicationGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "appgw", armnetwork.ApplicationGateway{ - Location: to.Ptr("eastus"), - Identity: &armnetwork.ManagedServiceIdentity{ - Type: to.Ptr(armnetwork.ResourceIdentityTypeUserAssigned), - UserAssignedIdentities: map[string]*armnetwork.Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties{ - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {}, - }, - }, - Properties: &armnetwork.ApplicationGatewayPropertiesFormat{ - BackendAddressPools: []*armnetwork.ApplicationGatewayBackendAddressPool{ - { - Name: to.Ptr("appgwpool"), - Properties: &armnetwork.ApplicationGatewayBackendAddressPoolPropertiesFormat{ - BackendAddresses: []*armnetwork.ApplicationGatewayBackendAddress{ - { - IPAddress: to.Ptr("10.0.1.1"), - }, - { - IPAddress: to.Ptr("10.0.1.2"), - }}, - }, - }, - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendAddressPools/appgwpool1"), - Name: to.Ptr("appgwpool1"), - Properties: &armnetwork.ApplicationGatewayBackendAddressPoolPropertiesFormat{ - BackendAddresses: []*armnetwork.ApplicationGatewayBackendAddress{ - {}, - {}}, - }, - }}, - BackendHTTPSettingsCollection: []*armnetwork.ApplicationGatewayBackendHTTPSettings{ - { - Name: to.Ptr("appgwbhs"), - Properties: &armnetwork.ApplicationGatewayBackendHTTPSettingsPropertiesFormat{ - CookieBasedAffinity: to.Ptr(armnetwork.ApplicationGatewayCookieBasedAffinityDisabled), - Port: to.Ptr[int32](80), - RequestTimeout: to.Ptr[int32](30), - Protocol: to.Ptr(armnetwork.ApplicationGatewayProtocolHTTP), - }, - }}, - FrontendIPConfigurations: []*armnetwork.ApplicationGatewayFrontendIPConfiguration{ - { - Name: to.Ptr("appgwfip"), - Properties: &armnetwork.ApplicationGatewayFrontendIPConfigurationPropertiesFormat{ - PublicIPAddress: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/appgwpip"), - }, - }, - }}, - FrontendPorts: []*armnetwork.ApplicationGatewayFrontendPort{ - { - Name: to.Ptr("appgwfp"), - Properties: &armnetwork.ApplicationGatewayFrontendPortPropertiesFormat{ - Port: to.Ptr[int32](443), - }, - }, - { - Name: to.Ptr("appgwfp80"), - Properties: &armnetwork.ApplicationGatewayFrontendPortPropertiesFormat{ - Port: to.Ptr[int32](80), - }, - }}, - GatewayIPConfigurations: []*armnetwork.ApplicationGatewayIPConfiguration{ - { - Name: to.Ptr("appgwipc"), - Properties: &armnetwork.ApplicationGatewayIPConfigurationPropertiesFormat{ - Subnet: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet/subnets/appgwsubnet"), - }, - }, - }}, - GlobalConfiguration: &armnetwork.ApplicationGatewayGlobalConfiguration{ - EnableRequestBuffering: to.Ptr(true), - EnableResponseBuffering: to.Ptr(true), - }, - HTTPListeners: []*armnetwork.ApplicationGatewayHTTPListener{ - { - Name: to.Ptr("appgwhl"), - Properties: &armnetwork.ApplicationGatewayHTTPListenerPropertiesFormat{ - FrontendIPConfiguration: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendIPConfigurations/appgwfip"), - }, - FrontendPort: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendPorts/appgwfp"), - }, - RequireServerNameIndication: to.Ptr(false), - SSLCertificate: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/sslCertificates/sslcert"), - }, - SSLProfile: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/sslProfiles/sslProfile1"), - }, - Protocol: to.Ptr(armnetwork.ApplicationGatewayProtocolHTTPS), - }, - }, - { - Name: to.Ptr("appgwhttplistener"), - Properties: &armnetwork.ApplicationGatewayHTTPListenerPropertiesFormat{ - FrontendIPConfiguration: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendIPConfigurations/appgwfip"), - }, - FrontendPort: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/frontendPorts/appgwfp80"), - }, - Protocol: to.Ptr(armnetwork.ApplicationGatewayProtocolHTTP), - }, - }}, - LoadDistributionPolicies: []*armnetwork.ApplicationGatewayLoadDistributionPolicy{ - { - Name: to.Ptr("ldp1"), - Properties: &armnetwork.ApplicationGatewayLoadDistributionPolicyPropertiesFormat{ - LoadDistributionAlgorithm: to.Ptr(armnetwork.ApplicationGatewayLoadDistributionAlgorithmRoundRobin), - LoadDistributionTargets: []*armnetwork.ApplicationGatewayLoadDistributionTarget{ - { - Name: to.Ptr("ld11"), - Properties: &armnetwork.ApplicationGatewayLoadDistributionTargetPropertiesFormat{ - BackendAddressPool: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendAddressPools/appgwpool"), - }, - WeightPerServer: to.Ptr[int32](40), - }, - }, - { - Name: to.Ptr("ld11"), - Properties: &armnetwork.ApplicationGatewayLoadDistributionTargetPropertiesFormat{ - BackendAddressPool: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendAddressPools/appgwpool1"), - }, - WeightPerServer: to.Ptr[int32](60), - }, - }}, - }, - }}, - RequestRoutingRules: []*armnetwork.ApplicationGatewayRequestRoutingRule{ - { - Name: to.Ptr("appgwrule"), - Properties: &armnetwork.ApplicationGatewayRequestRoutingRulePropertiesFormat{ - BackendAddressPool: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendAddressPools/appgwpool"), - }, - BackendHTTPSettings: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendHttpSettingsCollection/appgwbhs"), - }, - HTTPListener: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/httpListeners/appgwhl"), - }, - LoadDistributionPolicy: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/loadDistributionPolicies/ldp1"), - }, - Priority: to.Ptr[int32](10), - RewriteRuleSet: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/rewriteRuleSets/rewriteRuleSet1"), - }, - RuleType: to.Ptr(armnetwork.ApplicationGatewayRequestRoutingRuleTypeBasic), - }, - }, - { - Name: to.Ptr("appgwPathBasedRule"), - Properties: &armnetwork.ApplicationGatewayRequestRoutingRulePropertiesFormat{ - HTTPListener: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/httpListeners/appgwhttplistener"), - }, - Priority: to.Ptr[int32](20), - RuleType: to.Ptr(armnetwork.ApplicationGatewayRequestRoutingRuleTypePathBasedRouting), - URLPathMap: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/urlPathMaps/pathMap1"), - }, - }, - }}, - RewriteRuleSets: []*armnetwork.ApplicationGatewayRewriteRuleSet{ - { - Name: to.Ptr("rewriteRuleSet1"), - Properties: &armnetwork.ApplicationGatewayRewriteRuleSetPropertiesFormat{ - RewriteRules: []*armnetwork.ApplicationGatewayRewriteRule{ - { - Name: to.Ptr("Set X-Forwarded-For"), - ActionSet: &armnetwork.ApplicationGatewayRewriteRuleActionSet{ - RequestHeaderConfigurations: []*armnetwork.ApplicationGatewayHeaderConfiguration{ - { - HeaderName: to.Ptr("X-Forwarded-For"), - HeaderValue: to.Ptr("{var_add_x_forwarded_for_proxy}"), - }}, - ResponseHeaderConfigurations: []*armnetwork.ApplicationGatewayHeaderConfiguration{ - { - HeaderName: to.Ptr("Strict-Transport-Security"), - HeaderValue: to.Ptr("max-age=31536000"), - }}, - URLConfiguration: &armnetwork.ApplicationGatewayURLConfiguration{ - ModifiedPath: to.Ptr("/abc"), - }, - }, - Conditions: []*armnetwork.ApplicationGatewayRewriteRuleCondition{ - { - IgnoreCase: to.Ptr(true), - Negate: to.Ptr(false), - Pattern: to.Ptr("^Bearer"), - Variable: to.Ptr("http_req_Authorization"), - }}, - RuleSequence: to.Ptr[int32](102), - }}, - }, - }}, - SKU: &armnetwork.ApplicationGatewaySKU{ - Name: to.Ptr(armnetwork.ApplicationGatewaySKUNameStandardV2), - Capacity: to.Ptr[int32](3), - Tier: to.Ptr(armnetwork.ApplicationGatewayTierStandardV2), - }, - SSLCertificates: []*armnetwork.ApplicationGatewaySSLCertificate{ - { - Name: to.Ptr("sslcert"), - Properties: &armnetwork.ApplicationGatewaySSLCertificatePropertiesFormat{ - Data: to.Ptr("****"), - Password: to.Ptr("****"), - }, - }, - { - Name: to.Ptr("sslcert2"), - Properties: &armnetwork.ApplicationGatewaySSLCertificatePropertiesFormat{ - KeyVaultSecretID: to.Ptr("https://kv/secret"), - }, - }}, - SSLProfiles: []*armnetwork.ApplicationGatewaySSLProfile{ - { - Name: to.Ptr("sslProfile1"), - Properties: &armnetwork.ApplicationGatewaySSLProfilePropertiesFormat{ - ClientAuthConfiguration: &armnetwork.ApplicationGatewayClientAuthConfiguration{ - VerifyClientCertIssuerDN: to.Ptr(true), - }, - SSLPolicy: &armnetwork.ApplicationGatewaySSLPolicy{ - CipherSuites: []*armnetwork.ApplicationGatewaySSLCipherSuite{ - to.Ptr(armnetwork.ApplicationGatewaySSLCipherSuiteTLSECDHERSAWITHAES128CBCSHA256)}, - MinProtocolVersion: to.Ptr(armnetwork.ApplicationGatewaySSLProtocolTLSv11), - PolicyType: to.Ptr(armnetwork.ApplicationGatewaySSLPolicyTypeCustom), - }, - TrustedClientCertificates: []*armnetwork.SubResource{ - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/trustedClientCertificates/clientcert"), - }}, - }, - }}, - TrustedClientCertificates: []*armnetwork.ApplicationGatewayTrustedClientCertificate{ - { - Name: to.Ptr("clientcert"), - Properties: &armnetwork.ApplicationGatewayTrustedClientCertificatePropertiesFormat{ - Data: to.Ptr("****"), - }, - }}, - TrustedRootCertificates: []*armnetwork.ApplicationGatewayTrustedRootCertificate{ - { - Name: to.Ptr("rootcert"), - Properties: &armnetwork.ApplicationGatewayTrustedRootCertificatePropertiesFormat{ - Data: to.Ptr("****"), - }, - }, - { - Name: to.Ptr("rootcert1"), - Properties: &armnetwork.ApplicationGatewayTrustedRootCertificatePropertiesFormat{ - KeyVaultSecretID: to.Ptr("https://kv/secret"), - }, - }}, - URLPathMaps: []*armnetwork.ApplicationGatewayURLPathMap{ - { - Name: to.Ptr("pathMap1"), - Properties: &armnetwork.ApplicationGatewayURLPathMapPropertiesFormat{ - DefaultBackendAddressPool: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendAddressPools/appgwpool"), - }, - DefaultBackendHTTPSettings: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendHttpSettingsCollection/appgwbhs"), - }, - DefaultLoadDistributionPolicy: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/loadDistributionPolicies/ldp1"), - }, - DefaultRewriteRuleSet: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/rewriteRuleSets/rewriteRuleSet1"), - }, - PathRules: []*armnetwork.ApplicationGatewayPathRule{ - { - Name: to.Ptr("apiPaths"), - Properties: &armnetwork.ApplicationGatewayPathRulePropertiesFormat{ - BackendAddressPool: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendAddressPools/appgwpool"), - }, - BackendHTTPSettings: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendHttpSettingsCollection/appgwbhs"), - }, - LoadDistributionPolicy: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/loadDistributionPolicies/ldp1"), - }, - Paths: []*string{ - to.Ptr("/api"), - to.Ptr("/v1/api")}, - RewriteRuleSet: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/rewriteRuleSets/rewriteRuleSet1"), - }, - }, - }}, - }, - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ApplicationGatewayUpdateTags.json -func ExampleApplicationGatewaysClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewApplicationGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, "rg1", "AppGw", armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ApplicationGatewayList.json -func ExampleApplicationGatewaysClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewApplicationGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ApplicationGatewayListAll.json -func ExampleApplicationGatewaysClient_NewListAllPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewApplicationGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListAllPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ApplicationGatewayStart.json -func ExampleApplicationGatewaysClient_BeginStart() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewApplicationGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStart(ctx, "rg1", "appgw", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ApplicationGatewayStop.json -func ExampleApplicationGatewaysClient_BeginStop() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewApplicationGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStop(ctx, "rg1", "appgw", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ApplicationGatewayBackendHealthGet.json -func ExampleApplicationGatewaysClient_BeginBackendHealth() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewApplicationGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginBackendHealth(ctx, "appgw", "appgw", &armnetwork.ApplicationGatewaysClientBeginBackendHealthOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ApplicationGatewayBackendHealthTest.json -func ExampleApplicationGatewaysClient_BeginBackendHealthOnDemand() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewApplicationGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginBackendHealthOnDemand(ctx, "rg1", "appgw", armnetwork.ApplicationGatewayOnDemandProbe{ - Path: to.Ptr("/"), - BackendAddressPool: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendaddressPools/MFAnalyticsPool"), - }, - BackendHTTPSettings: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/applicationGateways/appgw/backendHttpSettingsCollection/MFPoolSettings"), - }, - PickHostNameFromBackendHTTPSettings: to.Ptr(true), - Timeout: to.Ptr[int32](30), - Protocol: to.Ptr(armnetwork.ApplicationGatewayProtocolHTTP), - }, &armnetwork.ApplicationGatewaysClientBeginBackendHealthOnDemandOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ApplicationGatewayAvailableServerVariablesGet.json -func ExampleApplicationGatewaysClient_ListAvailableServerVariables() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewApplicationGatewaysClient("72f988bf-86f1-41af-91ab-2d7cd0dddd4", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListAvailableServerVariables(ctx, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ApplicationGatewayAvailableRequestHeadersGet.json -func ExampleApplicationGatewaysClient_ListAvailableRequestHeaders() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewApplicationGatewaysClient("72f988bf-86f1-41af-91ab-2d7cd0dddd4", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListAvailableRequestHeaders(ctx, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ApplicationGatewayAvailableResponseHeadersGet.json -func ExampleApplicationGatewaysClient_ListAvailableResponseHeaders() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewApplicationGatewaysClient("72f988bf-86f1-41af-91ab-2d7cd0dddd4", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListAvailableResponseHeaders(ctx, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ApplicationGatewayAvailableWafRuleSetsGet.json -func ExampleApplicationGatewaysClient_ListAvailableWafRuleSets() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewApplicationGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListAvailableWafRuleSets(ctx, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ApplicationGatewayAvailableSslOptionsGet.json -func ExampleApplicationGatewaysClient_ListAvailableSSLOptions() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewApplicationGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListAvailableSSLOptions(ctx, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPoliciesGet.json -func ExampleApplicationGatewaysClient_NewListAvailableSSLPredefinedPoliciesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewApplicationGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListAvailableSSLPredefinedPoliciesPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPolicyGet.json -func ExampleApplicationGatewaysClient_GetSSLPredefinedPolicy() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewApplicationGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetSSLPredefinedPolicy(ctx, "AppGwSslPolicy20150501", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/applicationgatewaywafdynamicmanifests_client.go b/sdk/resourcemanager/network/armnetwork/applicationgatewaywafdynamicmanifests_client.go index 15d12730c825..0193fdf1019c 100644 --- a/sdk/resourcemanager/network/armnetwork/applicationgatewaywafdynamicmanifests_client.go +++ b/sdk/resourcemanager/network/armnetwork/applicationgatewaywafdynamicmanifests_client.go @@ -32,10 +32,10 @@ type ApplicationGatewayWafDynamicManifestsClient struct { } // NewApplicationGatewayWafDynamicManifestsClient creates a new instance of ApplicationGatewayWafDynamicManifestsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewApplicationGatewayWafDynamicManifestsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationGatewayWafDynamicManifestsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,10 +57,11 @@ func NewApplicationGatewayWafDynamicManifestsClient(subscriptionID string, crede } // NewGetPager - Gets the regional application gateway waf manifest. +// // Generated from API version 2022-07-01 -// location - The region where the nrp are located at. -// options - ApplicationGatewayWafDynamicManifestsClientGetOptions contains the optional parameters for the ApplicationGatewayWafDynamicManifestsClient.Get -// method. +// - location - The region where the nrp are located at. +// - options - ApplicationGatewayWafDynamicManifestsClientGetOptions contains the optional parameters for the ApplicationGatewayWafDynamicManifestsClient.NewGetPager +// method. func (client *ApplicationGatewayWafDynamicManifestsClient) NewGetPager(location string, options *ApplicationGatewayWafDynamicManifestsClientGetOptions) *runtime.Pager[ApplicationGatewayWafDynamicManifestsClientGetResponse] { return runtime.NewPager(runtime.PagingHandler[ApplicationGatewayWafDynamicManifestsClientGetResponse]{ More: func(page ApplicationGatewayWafDynamicManifestsClientGetResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/applicationgatewaywafdynamicmanifests_client_example_test.go b/sdk/resourcemanager/network/armnetwork/applicationgatewaywafdynamicmanifests_client_example_test.go deleted file mode 100644 index c59472f5c08f..000000000000 --- a/sdk/resourcemanager/network/armnetwork/applicationgatewaywafdynamicmanifests_client_example_test.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/GetApplicationGatewayWafDynamicManifests.json -func ExampleApplicationGatewayWafDynamicManifestsClient_NewGetPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewApplicationGatewayWafDynamicManifestsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetPager("westus", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/applicationgatewaywafdynamicmanifestsdefault_client.go b/sdk/resourcemanager/network/armnetwork/applicationgatewaywafdynamicmanifestsdefault_client.go index 2a92810f192e..c81e56954ae6 100644 --- a/sdk/resourcemanager/network/armnetwork/applicationgatewaywafdynamicmanifestsdefault_client.go +++ b/sdk/resourcemanager/network/armnetwork/applicationgatewaywafdynamicmanifestsdefault_client.go @@ -32,10 +32,10 @@ type ApplicationGatewayWafDynamicManifestsDefaultClient struct { } // NewApplicationGatewayWafDynamicManifestsDefaultClient creates a new instance of ApplicationGatewayWafDynamicManifestsDefaultClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewApplicationGatewayWafDynamicManifestsDefaultClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationGatewayWafDynamicManifestsDefaultClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,10 +58,11 @@ func NewApplicationGatewayWafDynamicManifestsDefaultClient(subscriptionID string // Get - Gets the regional application gateway waf manifest. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// location - The region where the nrp are located at. -// options - ApplicationGatewayWafDynamicManifestsDefaultClientGetOptions contains the optional parameters for the ApplicationGatewayWafDynamicManifestsDefaultClient.Get -// method. +// - location - The region where the nrp are located at. +// - options - ApplicationGatewayWafDynamicManifestsDefaultClientGetOptions contains the optional parameters for the ApplicationGatewayWafDynamicManifestsDefaultClient.Get +// method. func (client *ApplicationGatewayWafDynamicManifestsDefaultClient) Get(ctx context.Context, location string, options *ApplicationGatewayWafDynamicManifestsDefaultClientGetOptions) (ApplicationGatewayWafDynamicManifestsDefaultClientGetResponse, error) { req, err := client.getCreateRequest(ctx, location, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/applicationgatewaywafdynamicmanifestsdefault_client_example_test.go b/sdk/resourcemanager/network/armnetwork/applicationgatewaywafdynamicmanifestsdefault_client_example_test.go deleted file mode 100644 index b5a4174f7640..000000000000 --- a/sdk/resourcemanager/network/armnetwork/applicationgatewaywafdynamicmanifestsdefault_client_example_test.go +++ /dev/null @@ -1,36 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json -func ExampleApplicationGatewayWafDynamicManifestsDefaultClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewApplicationGatewayWafDynamicManifestsDefaultClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "westus", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/applicationsecuritygroups_client.go b/sdk/resourcemanager/network/armnetwork/applicationsecuritygroups_client.go index 0e5959554d9b..64f403e7f09c 100644 --- a/sdk/resourcemanager/network/armnetwork/applicationsecuritygroups_client.go +++ b/sdk/resourcemanager/network/armnetwork/applicationsecuritygroups_client.go @@ -32,10 +32,10 @@ type ApplicationSecurityGroupsClient struct { } // NewApplicationSecurityGroupsClient creates a new instance of ApplicationSecurityGroupsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewApplicationSecurityGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationSecurityGroupsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewApplicationSecurityGroupsClient(subscriptionID string, credential azcore // BeginCreateOrUpdate - Creates or updates an application security group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// applicationSecurityGroupName - The name of the application security group. -// parameters - Parameters supplied to the create or update ApplicationSecurityGroup operation. -// options - ApplicationSecurityGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationSecurityGroupsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - applicationSecurityGroupName - The name of the application security group. +// - parameters - Parameters supplied to the create or update ApplicationSecurityGroup operation. +// - options - ApplicationSecurityGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationSecurityGroupsClient.BeginCreateOrUpdate +// method. func (client *ApplicationSecurityGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, parameters ApplicationSecurityGroup, options *ApplicationSecurityGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ApplicationSecurityGroupsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, applicationSecurityGroupName, parameters, options) @@ -80,6 +81,7 @@ func (client *ApplicationSecurityGroupsClient) BeginCreateOrUpdate(ctx context.C // CreateOrUpdate - Creates or updates an application security group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ApplicationSecurityGroupsClient) createOrUpdate(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, parameters ApplicationSecurityGroup, options *ApplicationSecurityGroupsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, applicationSecurityGroupName, parameters, options) @@ -124,11 +126,12 @@ func (client *ApplicationSecurityGroupsClient) createOrUpdateCreateRequest(ctx c // BeginDelete - Deletes the specified application security group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// applicationSecurityGroupName - The name of the application security group. -// options - ApplicationSecurityGroupsClientBeginDeleteOptions contains the optional parameters for the ApplicationSecurityGroupsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - applicationSecurityGroupName - The name of the application security group. +// - options - ApplicationSecurityGroupsClientBeginDeleteOptions contains the optional parameters for the ApplicationSecurityGroupsClient.BeginDelete +// method. func (client *ApplicationSecurityGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, options *ApplicationSecurityGroupsClientBeginDeleteOptions) (*runtime.Poller[ApplicationSecurityGroupsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, applicationSecurityGroupName, options) @@ -145,6 +148,7 @@ func (client *ApplicationSecurityGroupsClient) BeginDelete(ctx context.Context, // Delete - Deletes the specified application security group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ApplicationSecurityGroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, options *ApplicationSecurityGroupsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, applicationSecurityGroupName, options) @@ -189,11 +193,12 @@ func (client *ApplicationSecurityGroupsClient) deleteCreateRequest(ctx context.C // Get - Gets information about the specified application security group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// applicationSecurityGroupName - The name of the application security group. -// options - ApplicationSecurityGroupsClientGetOptions contains the optional parameters for the ApplicationSecurityGroupsClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - applicationSecurityGroupName - The name of the application security group. +// - options - ApplicationSecurityGroupsClientGetOptions contains the optional parameters for the ApplicationSecurityGroupsClient.Get +// method. func (client *ApplicationSecurityGroupsClient) Get(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, options *ApplicationSecurityGroupsClientGetOptions) (ApplicationSecurityGroupsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, applicationSecurityGroupName, options) if err != nil { @@ -245,10 +250,11 @@ func (client *ApplicationSecurityGroupsClient) getHandleResponse(resp *http.Resp } // NewListPager - Gets all the application security groups in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - ApplicationSecurityGroupsClientListOptions contains the optional parameters for the ApplicationSecurityGroupsClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - options - ApplicationSecurityGroupsClientListOptions contains the optional parameters for the ApplicationSecurityGroupsClient.NewListPager +// method. func (client *ApplicationSecurityGroupsClient) NewListPager(resourceGroupName string, options *ApplicationSecurityGroupsClientListOptions) *runtime.Pager[ApplicationSecurityGroupsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ApplicationSecurityGroupsClientListResponse]{ More: func(page ApplicationSecurityGroupsClientListResponse) bool { @@ -309,9 +315,10 @@ func (client *ApplicationSecurityGroupsClient) listHandleResponse(resp *http.Res } // NewListAllPager - Gets all application security groups in a subscription. +// // Generated from API version 2022-07-01 -// options - ApplicationSecurityGroupsClientListAllOptions contains the optional parameters for the ApplicationSecurityGroupsClient.ListAll -// method. +// - options - ApplicationSecurityGroupsClientListAllOptions contains the optional parameters for the ApplicationSecurityGroupsClient.NewListAllPager +// method. func (client *ApplicationSecurityGroupsClient) NewListAllPager(options *ApplicationSecurityGroupsClientListAllOptions) *runtime.Pager[ApplicationSecurityGroupsClientListAllResponse] { return runtime.NewPager(runtime.PagingHandler[ApplicationSecurityGroupsClientListAllResponse]{ More: func(page ApplicationSecurityGroupsClientListAllResponse) bool { @@ -369,12 +376,13 @@ func (client *ApplicationSecurityGroupsClient) listAllHandleResponse(resp *http. // UpdateTags - Updates an application security group's tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// applicationSecurityGroupName - The name of the application security group. -// parameters - Parameters supplied to update application security group tags. -// options - ApplicationSecurityGroupsClientUpdateTagsOptions contains the optional parameters for the ApplicationSecurityGroupsClient.UpdateTags -// method. +// - resourceGroupName - The name of the resource group. +// - applicationSecurityGroupName - The name of the application security group. +// - parameters - Parameters supplied to update application security group tags. +// - options - ApplicationSecurityGroupsClientUpdateTagsOptions contains the optional parameters for the ApplicationSecurityGroupsClient.UpdateTags +// method. func (client *ApplicationSecurityGroupsClient) UpdateTags(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, parameters TagsObject, options *ApplicationSecurityGroupsClientUpdateTagsOptions) (ApplicationSecurityGroupsClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, applicationSecurityGroupName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/applicationsecuritygroups_client_example_test.go b/sdk/resourcemanager/network/armnetwork/applicationsecuritygroups_client_example_test.go deleted file mode 100644 index 2b1bedbbc64b..000000000000 --- a/sdk/resourcemanager/network/armnetwork/applicationsecuritygroups_client_example_test.go +++ /dev/null @@ -1,156 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ApplicationSecurityGroupDelete.json -func ExampleApplicationSecurityGroupsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewApplicationSecurityGroupsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "test-asg", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ApplicationSecurityGroupGet.json -func ExampleApplicationSecurityGroupsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewApplicationSecurityGroupsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "test-asg", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ApplicationSecurityGroupCreate.json -func ExampleApplicationSecurityGroupsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewApplicationSecurityGroupsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "test-asg", armnetwork.ApplicationSecurityGroup{ - Location: to.Ptr("westus"), - Properties: &armnetwork.ApplicationSecurityGroupPropertiesFormat{}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ApplicationSecurityGroupUpdateTags.json -func ExampleApplicationSecurityGroupsClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewApplicationSecurityGroupsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, "rg1", "test-asg", armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ApplicationSecurityGroupListAll.json -func ExampleApplicationSecurityGroupsClient_NewListAllPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewApplicationSecurityGroupsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListAllPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ApplicationSecurityGroupList.json -func ExampleApplicationSecurityGroupsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewApplicationSecurityGroupsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/autorest.md b/sdk/resourcemanager/network/armnetwork/autorest.md index 80b1a73a34f5..354fa00b60f7 100644 --- a/sdk/resourcemanager/network/armnetwork/autorest.md +++ b/sdk/resourcemanager/network/armnetwork/autorest.md @@ -5,8 +5,8 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/a80de12c16d6d9c3545bdc3e2b6c1d4ca6739876/specification/network/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/a80de12c16d6d9c3545bdc3e2b6c1d4ca6739876/specification/network/resource-manager/readme.go.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/network/resource-manager/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/network/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 2.1.0 +module-version: 2.1.1 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/network/armnetwork/availabledelegations_client.go b/sdk/resourcemanager/network/armnetwork/availabledelegations_client.go index 5753464c6d84..2f6526919866 100644 --- a/sdk/resourcemanager/network/armnetwork/availabledelegations_client.go +++ b/sdk/resourcemanager/network/armnetwork/availabledelegations_client.go @@ -32,10 +32,10 @@ type AvailableDelegationsClient struct { } // NewAvailableDelegationsClient creates a new instance of AvailableDelegationsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewAvailableDelegationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailableDelegationsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,10 +57,11 @@ func NewAvailableDelegationsClient(subscriptionID string, credential azcore.Toke } // NewListPager - Gets all of the available subnet delegations for this subscription in this region. +// // Generated from API version 2022-07-01 -// location - The location of the subnet. -// options - AvailableDelegationsClientListOptions contains the optional parameters for the AvailableDelegationsClient.List -// method. +// - location - The location of the subnet. +// - options - AvailableDelegationsClientListOptions contains the optional parameters for the AvailableDelegationsClient.NewListPager +// method. func (client *AvailableDelegationsClient) NewListPager(location string, options *AvailableDelegationsClientListOptions) *runtime.Pager[AvailableDelegationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[AvailableDelegationsClientListResponse]{ More: func(page AvailableDelegationsClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/availabledelegations_client_example_test.go b/sdk/resourcemanager/network/armnetwork/availabledelegations_client_example_test.go deleted file mode 100644 index 9b07bfd9bc7f..000000000000 --- a/sdk/resourcemanager/network/armnetwork/availabledelegations_client_example_test.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/AvailableDelegationsSubscriptionGet.json -func ExampleAvailableDelegationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAvailableDelegationsClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("westcentralus", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/availableendpointservices_client.go b/sdk/resourcemanager/network/armnetwork/availableendpointservices_client.go index fbb01fbc468a..530f3e24d3a6 100644 --- a/sdk/resourcemanager/network/armnetwork/availableendpointservices_client.go +++ b/sdk/resourcemanager/network/armnetwork/availableendpointservices_client.go @@ -32,10 +32,10 @@ type AvailableEndpointServicesClient struct { } // NewAvailableEndpointServicesClient creates a new instance of AvailableEndpointServicesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewAvailableEndpointServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailableEndpointServicesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,10 +57,11 @@ func NewAvailableEndpointServicesClient(subscriptionID string, credential azcore } // NewListPager - List what values of endpoint services are available for use. +// // Generated from API version 2022-07-01 -// location - The location to check available endpoint services. -// options - AvailableEndpointServicesClientListOptions contains the optional parameters for the AvailableEndpointServicesClient.List -// method. +// - location - The location to check available endpoint services. +// - options - AvailableEndpointServicesClientListOptions contains the optional parameters for the AvailableEndpointServicesClient.NewListPager +// method. func (client *AvailableEndpointServicesClient) NewListPager(location string, options *AvailableEndpointServicesClientListOptions) *runtime.Pager[AvailableEndpointServicesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[AvailableEndpointServicesClientListResponse]{ More: func(page AvailableEndpointServicesClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/availableendpointservices_client_example_test.go b/sdk/resourcemanager/network/armnetwork/availableendpointservices_client_example_test.go deleted file mode 100644 index 5dd1f5111a3c..000000000000 --- a/sdk/resourcemanager/network/armnetwork/availableendpointservices_client_example_test.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/EndpointServicesList.json -func ExampleAvailableEndpointServicesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAvailableEndpointServicesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("westus", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/availableprivateendpointtypes_client.go b/sdk/resourcemanager/network/armnetwork/availableprivateendpointtypes_client.go index 5919e1b157db..6757bcdc2890 100644 --- a/sdk/resourcemanager/network/armnetwork/availableprivateendpointtypes_client.go +++ b/sdk/resourcemanager/network/armnetwork/availableprivateendpointtypes_client.go @@ -32,10 +32,10 @@ type AvailablePrivateEndpointTypesClient struct { } // NewAvailablePrivateEndpointTypesClient creates a new instance of AvailablePrivateEndpointTypesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewAvailablePrivateEndpointTypesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailablePrivateEndpointTypesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,10 +58,11 @@ func NewAvailablePrivateEndpointTypesClient(subscriptionID string, credential az // NewListPager - Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this // region. +// // Generated from API version 2022-07-01 -// location - The location of the domain name. -// options - AvailablePrivateEndpointTypesClientListOptions contains the optional parameters for the AvailablePrivateEndpointTypesClient.List -// method. +// - location - The location of the domain name. +// - options - AvailablePrivateEndpointTypesClientListOptions contains the optional parameters for the AvailablePrivateEndpointTypesClient.NewListPager +// method. func (client *AvailablePrivateEndpointTypesClient) NewListPager(location string, options *AvailablePrivateEndpointTypesClientListOptions) *runtime.Pager[AvailablePrivateEndpointTypesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[AvailablePrivateEndpointTypesClientListResponse]{ More: func(page AvailablePrivateEndpointTypesClientListResponse) bool { @@ -123,11 +124,12 @@ func (client *AvailablePrivateEndpointTypesClient) listHandleResponse(resp *http // NewListByResourceGroupPager - Returns all of the resource types that can be linked to a Private Endpoint in this subscription // in this region. +// // Generated from API version 2022-07-01 -// location - The location of the domain name. -// resourceGroupName - The name of the resource group. -// options - AvailablePrivateEndpointTypesClientListByResourceGroupOptions contains the optional parameters for the AvailablePrivateEndpointTypesClient.ListByResourceGroup -// method. +// - location - The location of the domain name. +// - resourceGroupName - The name of the resource group. +// - options - AvailablePrivateEndpointTypesClientListByResourceGroupOptions contains the optional parameters for the AvailablePrivateEndpointTypesClient.NewListByResourceGroupPager +// method. func (client *AvailablePrivateEndpointTypesClient) NewListByResourceGroupPager(location string, resourceGroupName string, options *AvailablePrivateEndpointTypesClientListByResourceGroupOptions) *runtime.Pager[AvailablePrivateEndpointTypesClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[AvailablePrivateEndpointTypesClientListByResourceGroupResponse]{ More: func(page AvailablePrivateEndpointTypesClientListByResourceGroupResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/availableprivateendpointtypes_client_example_test.go b/sdk/resourcemanager/network/armnetwork/availableprivateendpointtypes_client_example_test.go deleted file mode 100644 index 025571976487..000000000000 --- a/sdk/resourcemanager/network/armnetwork/availableprivateendpointtypes_client_example_test.go +++ /dev/null @@ -1,65 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/AvailablePrivateEndpointTypesGet.json -func ExampleAvailablePrivateEndpointTypesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAvailablePrivateEndpointTypesClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("regionName", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/AvailablePrivateEndpointTypesResourceGroupGet.json -func ExampleAvailablePrivateEndpointTypesClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAvailablePrivateEndpointTypesClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("regionName", "rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/availableresourcegroupdelegations_client.go b/sdk/resourcemanager/network/armnetwork/availableresourcegroupdelegations_client.go index 532db4581c52..ff042863c876 100644 --- a/sdk/resourcemanager/network/armnetwork/availableresourcegroupdelegations_client.go +++ b/sdk/resourcemanager/network/armnetwork/availableresourcegroupdelegations_client.go @@ -32,10 +32,10 @@ type AvailableResourceGroupDelegationsClient struct { } // NewAvailableResourceGroupDelegationsClient creates a new instance of AvailableResourceGroupDelegationsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewAvailableResourceGroupDelegationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailableResourceGroupDelegationsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,11 +57,12 @@ func NewAvailableResourceGroupDelegationsClient(subscriptionID string, credentia } // NewListPager - Gets all of the available subnet delegations for this resource group in this region. +// // Generated from API version 2022-07-01 -// location - The location of the domain name. -// resourceGroupName - The name of the resource group. -// options - AvailableResourceGroupDelegationsClientListOptions contains the optional parameters for the AvailableResourceGroupDelegationsClient.List -// method. +// - location - The location of the domain name. +// - resourceGroupName - The name of the resource group. +// - options - AvailableResourceGroupDelegationsClientListOptions contains the optional parameters for the AvailableResourceGroupDelegationsClient.NewListPager +// method. func (client *AvailableResourceGroupDelegationsClient) NewListPager(location string, resourceGroupName string, options *AvailableResourceGroupDelegationsClientListOptions) *runtime.Pager[AvailableResourceGroupDelegationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[AvailableResourceGroupDelegationsClientListResponse]{ More: func(page AvailableResourceGroupDelegationsClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/availableresourcegroupdelegations_client_example_test.go b/sdk/resourcemanager/network/armnetwork/availableresourcegroupdelegations_client_example_test.go deleted file mode 100644 index dc6b9fb8b798..000000000000 --- a/sdk/resourcemanager/network/armnetwork/availableresourcegroupdelegations_client_example_test.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/AvailableDelegationsResourceGroupGet.json -func ExampleAvailableResourceGroupDelegationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAvailableResourceGroupDelegationsClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("westcentralus", "rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/availableservicealiases_client.go b/sdk/resourcemanager/network/armnetwork/availableservicealiases_client.go index 8c929f39b986..d6821210fed2 100644 --- a/sdk/resourcemanager/network/armnetwork/availableservicealiases_client.go +++ b/sdk/resourcemanager/network/armnetwork/availableservicealiases_client.go @@ -32,10 +32,10 @@ type AvailableServiceAliasesClient struct { } // NewAvailableServiceAliasesClient creates a new instance of AvailableServiceAliasesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewAvailableServiceAliasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailableServiceAliasesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,10 +57,11 @@ func NewAvailableServiceAliasesClient(subscriptionID string, credential azcore.T } // NewListPager - Gets all available service aliases for this subscription in this region. +// // Generated from API version 2022-07-01 -// location - The location. -// options - AvailableServiceAliasesClientListOptions contains the optional parameters for the AvailableServiceAliasesClient.List -// method. +// - location - The location. +// - options - AvailableServiceAliasesClientListOptions contains the optional parameters for the AvailableServiceAliasesClient.NewListPager +// method. func (client *AvailableServiceAliasesClient) NewListPager(location string, options *AvailableServiceAliasesClientListOptions) *runtime.Pager[AvailableServiceAliasesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[AvailableServiceAliasesClientListResponse]{ More: func(page AvailableServiceAliasesClientListResponse) bool { @@ -121,11 +122,12 @@ func (client *AvailableServiceAliasesClient) listHandleResponse(resp *http.Respo } // NewListByResourceGroupPager - Gets all available service aliases for this resource group in this region. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// location - The location. -// options - AvailableServiceAliasesClientListByResourceGroupOptions contains the optional parameters for the AvailableServiceAliasesClient.ListByResourceGroup -// method. +// - resourceGroupName - The name of the resource group. +// - location - The location. +// - options - AvailableServiceAliasesClientListByResourceGroupOptions contains the optional parameters for the AvailableServiceAliasesClient.NewListByResourceGroupPager +// method. func (client *AvailableServiceAliasesClient) NewListByResourceGroupPager(resourceGroupName string, location string, options *AvailableServiceAliasesClientListByResourceGroupOptions) *runtime.Pager[AvailableServiceAliasesClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[AvailableServiceAliasesClientListByResourceGroupResponse]{ More: func(page AvailableServiceAliasesClientListByResourceGroupResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/availableservicealiases_client_example_test.go b/sdk/resourcemanager/network/armnetwork/availableservicealiases_client_example_test.go deleted file mode 100644 index 1b0a7d575ab2..000000000000 --- a/sdk/resourcemanager/network/armnetwork/availableservicealiases_client_example_test.go +++ /dev/null @@ -1,65 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/AvailableServiceAliasesList.json -func ExampleAvailableServiceAliasesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAvailableServiceAliasesClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("westcentralus", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/AvailableServiceAliasesListByResourceGroup.json -func ExampleAvailableServiceAliasesClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAvailableServiceAliasesClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("rg1", "westcentralus", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/azurefirewallfqdntags_client.go b/sdk/resourcemanager/network/armnetwork/azurefirewallfqdntags_client.go index 844b87bdf419..5b0481581bb1 100644 --- a/sdk/resourcemanager/network/armnetwork/azurefirewallfqdntags_client.go +++ b/sdk/resourcemanager/network/armnetwork/azurefirewallfqdntags_client.go @@ -32,10 +32,10 @@ type AzureFirewallFqdnTagsClient struct { } // NewAzureFirewallFqdnTagsClient creates a new instance of AzureFirewallFqdnTagsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewAzureFirewallFqdnTagsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AzureFirewallFqdnTagsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,9 +57,10 @@ func NewAzureFirewallFqdnTagsClient(subscriptionID string, credential azcore.Tok } // NewListAllPager - Gets all the Azure Firewall FQDN Tags in a subscription. +// // Generated from API version 2022-07-01 -// options - AzureFirewallFqdnTagsClientListAllOptions contains the optional parameters for the AzureFirewallFqdnTagsClient.ListAll -// method. +// - options - AzureFirewallFqdnTagsClientListAllOptions contains the optional parameters for the AzureFirewallFqdnTagsClient.NewListAllPager +// method. func (client *AzureFirewallFqdnTagsClient) NewListAllPager(options *AzureFirewallFqdnTagsClientListAllOptions) *runtime.Pager[AzureFirewallFqdnTagsClientListAllResponse] { return runtime.NewPager(runtime.PagingHandler[AzureFirewallFqdnTagsClientListAllResponse]{ More: func(page AzureFirewallFqdnTagsClientListAllResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/azurefirewallfqdntags_client_example_test.go b/sdk/resourcemanager/network/armnetwork/azurefirewallfqdntags_client_example_test.go deleted file mode 100644 index f6647e0eb26d..000000000000 --- a/sdk/resourcemanager/network/armnetwork/azurefirewallfqdntags_client_example_test.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/AzureFirewallFqdnTagsListBySubscription.json -func ExampleAzureFirewallFqdnTagsClient_NewListAllPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAzureFirewallFqdnTagsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListAllPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/azurefirewalls_client.go b/sdk/resourcemanager/network/armnetwork/azurefirewalls_client.go index a217f030f401..47bacbc17f5c 100644 --- a/sdk/resourcemanager/network/armnetwork/azurefirewalls_client.go +++ b/sdk/resourcemanager/network/armnetwork/azurefirewalls_client.go @@ -32,10 +32,10 @@ type AzureFirewallsClient struct { } // NewAzureFirewallsClient creates a new instance of AzureFirewallsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewAzureFirewallsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AzureFirewallsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewAzureFirewallsClient(subscriptionID string, credential azcore.TokenCrede // BeginCreateOrUpdate - Creates or updates the specified Azure Firewall. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// azureFirewallName - The name of the Azure Firewall. -// parameters - Parameters supplied to the create or update Azure Firewall operation. -// options - AzureFirewallsClientBeginCreateOrUpdateOptions contains the optional parameters for the AzureFirewallsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - azureFirewallName - The name of the Azure Firewall. +// - parameters - Parameters supplied to the create or update Azure Firewall operation. +// - options - AzureFirewallsClientBeginCreateOrUpdateOptions contains the optional parameters for the AzureFirewallsClient.BeginCreateOrUpdate +// method. func (client *AzureFirewallsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters AzureFirewall, options *AzureFirewallsClientBeginCreateOrUpdateOptions) (*runtime.Poller[AzureFirewallsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, azureFirewallName, parameters, options) @@ -80,6 +81,7 @@ func (client *AzureFirewallsClient) BeginCreateOrUpdate(ctx context.Context, res // CreateOrUpdate - Creates or updates the specified Azure Firewall. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *AzureFirewallsClient) createOrUpdate(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters AzureFirewall, options *AzureFirewallsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, azureFirewallName, parameters, options) @@ -124,11 +126,12 @@ func (client *AzureFirewallsClient) createOrUpdateCreateRequest(ctx context.Cont // BeginDelete - Deletes the specified Azure Firewall. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// azureFirewallName - The name of the Azure Firewall. -// options - AzureFirewallsClientBeginDeleteOptions contains the optional parameters for the AzureFirewallsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - azureFirewallName - The name of the Azure Firewall. +// - options - AzureFirewallsClientBeginDeleteOptions contains the optional parameters for the AzureFirewallsClient.BeginDelete +// method. func (client *AzureFirewallsClient) BeginDelete(ctx context.Context, resourceGroupName string, azureFirewallName string, options *AzureFirewallsClientBeginDeleteOptions) (*runtime.Poller[AzureFirewallsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, azureFirewallName, options) @@ -145,6 +148,7 @@ func (client *AzureFirewallsClient) BeginDelete(ctx context.Context, resourceGro // Delete - Deletes the specified Azure Firewall. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *AzureFirewallsClient) deleteOperation(ctx context.Context, resourceGroupName string, azureFirewallName string, options *AzureFirewallsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, azureFirewallName, options) @@ -189,10 +193,11 @@ func (client *AzureFirewallsClient) deleteCreateRequest(ctx context.Context, res // Get - Gets the specified Azure Firewall. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// azureFirewallName - The name of the Azure Firewall. -// options - AzureFirewallsClientGetOptions contains the optional parameters for the AzureFirewallsClient.Get method. +// - resourceGroupName - The name of the resource group. +// - azureFirewallName - The name of the Azure Firewall. +// - options - AzureFirewallsClientGetOptions contains the optional parameters for the AzureFirewallsClient.Get method. func (client *AzureFirewallsClient) Get(ctx context.Context, resourceGroupName string, azureFirewallName string, options *AzureFirewallsClientGetOptions) (AzureFirewallsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, azureFirewallName, options) if err != nil { @@ -244,9 +249,10 @@ func (client *AzureFirewallsClient) getHandleResponse(resp *http.Response) (Azur } // NewListPager - Lists all Azure Firewalls in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - AzureFirewallsClientListOptions contains the optional parameters for the AzureFirewallsClient.List method. +// - resourceGroupName - The name of the resource group. +// - options - AzureFirewallsClientListOptions contains the optional parameters for the AzureFirewallsClient.NewListPager method. func (client *AzureFirewallsClient) NewListPager(resourceGroupName string, options *AzureFirewallsClientListOptions) *runtime.Pager[AzureFirewallsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[AzureFirewallsClientListResponse]{ More: func(page AzureFirewallsClientListResponse) bool { @@ -307,8 +313,10 @@ func (client *AzureFirewallsClient) listHandleResponse(resp *http.Response) (Azu } // NewListAllPager - Gets all the Azure Firewalls in a subscription. +// // Generated from API version 2022-07-01 -// options - AzureFirewallsClientListAllOptions contains the optional parameters for the AzureFirewallsClient.ListAll method. +// - options - AzureFirewallsClientListAllOptions contains the optional parameters for the AzureFirewallsClient.NewListAllPager +// method. func (client *AzureFirewallsClient) NewListAllPager(options *AzureFirewallsClientListAllOptions) *runtime.Pager[AzureFirewallsClientListAllResponse] { return runtime.NewPager(runtime.PagingHandler[AzureFirewallsClientListAllResponse]{ More: func(page AzureFirewallsClientListAllResponse) bool { @@ -366,11 +374,12 @@ func (client *AzureFirewallsClient) listAllHandleResponse(resp *http.Response) ( // BeginListLearnedPrefixes - Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// azureFirewallName - The name of the azure firewall. -// options - AzureFirewallsClientBeginListLearnedPrefixesOptions contains the optional parameters for the AzureFirewallsClient.BeginListLearnedPrefixes -// method. +// - resourceGroupName - The name of the resource group. +// - azureFirewallName - The name of the azure firewall. +// - options - AzureFirewallsClientBeginListLearnedPrefixesOptions contains the optional parameters for the AzureFirewallsClient.BeginListLearnedPrefixes +// method. func (client *AzureFirewallsClient) BeginListLearnedPrefixes(ctx context.Context, resourceGroupName string, azureFirewallName string, options *AzureFirewallsClientBeginListLearnedPrefixesOptions) (*runtime.Poller[AzureFirewallsClientListLearnedPrefixesResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.listLearnedPrefixes(ctx, resourceGroupName, azureFirewallName, options) @@ -387,6 +396,7 @@ func (client *AzureFirewallsClient) BeginListLearnedPrefixes(ctx context.Context // ListLearnedPrefixes - Retrieves a list of all IP prefixes that azure firewall has learned to not SNAT. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *AzureFirewallsClient) listLearnedPrefixes(ctx context.Context, resourceGroupName string, azureFirewallName string, options *AzureFirewallsClientBeginListLearnedPrefixesOptions) (*http.Response, error) { req, err := client.listLearnedPrefixesCreateRequest(ctx, resourceGroupName, azureFirewallName, options) @@ -431,12 +441,13 @@ func (client *AzureFirewallsClient) listLearnedPrefixesCreateRequest(ctx context // BeginUpdateTags - Updates tags of an Azure Firewall resource. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// azureFirewallName - The name of the Azure Firewall. -// parameters - Parameters supplied to update azure firewall tags. -// options - AzureFirewallsClientBeginUpdateTagsOptions contains the optional parameters for the AzureFirewallsClient.BeginUpdateTags -// method. +// - resourceGroupName - The name of the resource group. +// - azureFirewallName - The name of the Azure Firewall. +// - parameters - Parameters supplied to update azure firewall tags. +// - options - AzureFirewallsClientBeginUpdateTagsOptions contains the optional parameters for the AzureFirewallsClient.BeginUpdateTags +// method. func (client *AzureFirewallsClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters TagsObject, options *AzureFirewallsClientBeginUpdateTagsOptions) (*runtime.Poller[AzureFirewallsClientUpdateTagsResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.updateTags(ctx, resourceGroupName, azureFirewallName, parameters, options) @@ -453,6 +464,7 @@ func (client *AzureFirewallsClient) BeginUpdateTags(ctx context.Context, resourc // UpdateTags - Updates tags of an Azure Firewall resource. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *AzureFirewallsClient) updateTags(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters TagsObject, options *AzureFirewallsClientBeginUpdateTagsOptions) (*http.Response, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, azureFirewallName, parameters, options) diff --git a/sdk/resourcemanager/network/armnetwork/azurefirewalls_client_example_test.go b/sdk/resourcemanager/network/armnetwork/azurefirewalls_client_example_test.go deleted file mode 100644 index 6677628985b0..000000000000 --- a/sdk/resourcemanager/network/armnetwork/azurefirewalls_client_example_test.go +++ /dev/null @@ -1,1050 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/AzureFirewallDelete.json -func ExampleAzureFirewallsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAzureFirewallsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "azurefirewall", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/AzureFirewallGet.json -func ExampleAzureFirewallsClient_Get_getAzureFirewall() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAzureFirewallsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "azurefirewall", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/AzureFirewallGetWithAdditionalProperties.json -func ExampleAzureFirewallsClient_Get_getAzureFirewallWithAdditionalProperties() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAzureFirewallsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "azurefirewall", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/AzureFirewallGetWithIpGroups.json -func ExampleAzureFirewallsClient_Get_getAzureFirewallWithIpGroups() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAzureFirewallsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "azurefirewall", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/AzureFirewallGetWithZones.json -func ExampleAzureFirewallsClient_Get_getAzureFirewallWithZones() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAzureFirewallsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "azurefirewall", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/AzureFirewallGetWithMgmtSubnet.json -func ExampleAzureFirewallsClient_Get_getAzureFirewallWithManagementSubnet() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAzureFirewallsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "azurefirewall", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/AzureFirewallPut.json -func ExampleAzureFirewallsClient_BeginCreateOrUpdate_createAzureFirewall() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAzureFirewallsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "azurefirewall", armnetwork.AzureFirewall{ - Location: to.Ptr("West US"), - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - }, - Properties: &armnetwork.AzureFirewallPropertiesFormat{ - ApplicationRuleCollections: []*armnetwork.AzureFirewallApplicationRuleCollection{ - { - Name: to.Ptr("apprulecoll"), - Properties: &armnetwork.AzureFirewallApplicationRuleCollectionPropertiesFormat{ - Action: &armnetwork.AzureFirewallRCAction{ - Type: to.Ptr(armnetwork.AzureFirewallRCActionTypeDeny), - }, - Priority: to.Ptr[int32](110), - Rules: []*armnetwork.AzureFirewallApplicationRule{ - { - Name: to.Ptr("rule1"), - Description: to.Ptr("Deny inbound rule"), - Protocols: []*armnetwork.AzureFirewallApplicationRuleProtocol{ - { - Port: to.Ptr[int32](443), - ProtocolType: to.Ptr(armnetwork.AzureFirewallApplicationRuleProtocolTypeHTTPS), - }}, - SourceAddresses: []*string{ - to.Ptr("216.58.216.164"), - to.Ptr("10.0.0.0/24")}, - TargetFqdns: []*string{ - to.Ptr("www.test.com")}, - }}, - }, - }}, - IPConfigurations: []*armnetwork.AzureFirewallIPConfiguration{ - { - Name: to.Ptr("azureFirewallIpConfiguration"), - Properties: &armnetwork.AzureFirewallIPConfigurationPropertiesFormat{ - PublicIPAddress: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName"), - }, - Subnet: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet"), - }, - }, - }}, - NatRuleCollections: []*armnetwork.AzureFirewallNatRuleCollection{ - { - Name: to.Ptr("natrulecoll"), - Properties: &armnetwork.AzureFirewallNatRuleCollectionProperties{ - Action: &armnetwork.AzureFirewallNatRCAction{ - Type: to.Ptr(armnetwork.AzureFirewallNatRCActionTypeDnat), - }, - Priority: to.Ptr[int32](112), - Rules: []*armnetwork.AzureFirewallNatRule{ - { - Name: to.Ptr("DNAT-HTTPS-traffic"), - Description: to.Ptr("D-NAT all outbound web traffic for inspection"), - DestinationAddresses: []*string{ - to.Ptr("1.2.3.4")}, - DestinationPorts: []*string{ - to.Ptr("443")}, - Protocols: []*armnetwork.AzureFirewallNetworkRuleProtocol{ - to.Ptr(armnetwork.AzureFirewallNetworkRuleProtocolTCP)}, - SourceAddresses: []*string{ - to.Ptr("*")}, - TranslatedAddress: to.Ptr("1.2.3.5"), - TranslatedPort: to.Ptr("8443"), - }, - { - Name: to.Ptr("DNAT-HTTP-traffic-With-FQDN"), - Description: to.Ptr("D-NAT all inbound web traffic for inspection"), - DestinationAddresses: []*string{ - to.Ptr("1.2.3.4")}, - DestinationPorts: []*string{ - to.Ptr("80")}, - Protocols: []*armnetwork.AzureFirewallNetworkRuleProtocol{ - to.Ptr(armnetwork.AzureFirewallNetworkRuleProtocolTCP)}, - SourceAddresses: []*string{ - to.Ptr("*")}, - TranslatedFqdn: to.Ptr("internalhttpserver"), - TranslatedPort: to.Ptr("880"), - }}, - }, - }}, - NetworkRuleCollections: []*armnetwork.AzureFirewallNetworkRuleCollection{ - { - Name: to.Ptr("netrulecoll"), - Properties: &armnetwork.AzureFirewallNetworkRuleCollectionPropertiesFormat{ - Action: &armnetwork.AzureFirewallRCAction{ - Type: to.Ptr(armnetwork.AzureFirewallRCActionTypeDeny), - }, - Priority: to.Ptr[int32](112), - Rules: []*armnetwork.AzureFirewallNetworkRule{ - { - Name: to.Ptr("L4-traffic"), - Description: to.Ptr("Block traffic based on source IPs and ports"), - DestinationAddresses: []*string{ - to.Ptr("*")}, - DestinationPorts: []*string{ - to.Ptr("443-444"), - to.Ptr("8443")}, - Protocols: []*armnetwork.AzureFirewallNetworkRuleProtocol{ - to.Ptr(armnetwork.AzureFirewallNetworkRuleProtocolTCP)}, - SourceAddresses: []*string{ - to.Ptr("192.168.1.1-192.168.1.12"), - to.Ptr("10.1.4.12-10.1.4.255")}, - }, - { - Name: to.Ptr("L4-traffic-with-FQDN"), - Description: to.Ptr("Block traffic based on source IPs and ports to amazon"), - DestinationFqdns: []*string{ - to.Ptr("www.amazon.com")}, - DestinationPorts: []*string{ - to.Ptr("443-444"), - to.Ptr("8443")}, - Protocols: []*armnetwork.AzureFirewallNetworkRuleProtocol{ - to.Ptr(armnetwork.AzureFirewallNetworkRuleProtocolTCP)}, - SourceAddresses: []*string{ - to.Ptr("10.2.4.12-10.2.4.255")}, - }}, - }, - }}, - SKU: &armnetwork.AzureFirewallSKU{ - Name: to.Ptr(armnetwork.AzureFirewallSKUNameAZFWVnet), - Tier: to.Ptr(armnetwork.AzureFirewallSKUTierStandard), - }, - ThreatIntelMode: to.Ptr(armnetwork.AzureFirewallThreatIntelModeAlert), - }, - Zones: []*string{}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/AzureFirewallPutWithAdditionalProperties.json -func ExampleAzureFirewallsClient_BeginCreateOrUpdate_createAzureFirewallWithAdditionalProperties() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAzureFirewallsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "azurefirewall", armnetwork.AzureFirewall{ - Location: to.Ptr("West US"), - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - }, - Properties: &armnetwork.AzureFirewallPropertiesFormat{ - AdditionalProperties: map[string]*string{ - "key1": to.Ptr("value1"), - "key2": to.Ptr("value2"), - }, - ApplicationRuleCollections: []*armnetwork.AzureFirewallApplicationRuleCollection{ - { - Name: to.Ptr("apprulecoll"), - Properties: &armnetwork.AzureFirewallApplicationRuleCollectionPropertiesFormat{ - Action: &armnetwork.AzureFirewallRCAction{ - Type: to.Ptr(armnetwork.AzureFirewallRCActionTypeDeny), - }, - Priority: to.Ptr[int32](110), - Rules: []*armnetwork.AzureFirewallApplicationRule{ - { - Name: to.Ptr("rule1"), - Description: to.Ptr("Deny inbound rule"), - Protocols: []*armnetwork.AzureFirewallApplicationRuleProtocol{ - { - Port: to.Ptr[int32](443), - ProtocolType: to.Ptr(armnetwork.AzureFirewallApplicationRuleProtocolTypeHTTPS), - }}, - SourceAddresses: []*string{ - to.Ptr("216.58.216.164"), - to.Ptr("10.0.0.0/24")}, - TargetFqdns: []*string{ - to.Ptr("www.test.com")}, - }}, - }, - }}, - IPConfigurations: []*armnetwork.AzureFirewallIPConfiguration{ - { - Name: to.Ptr("azureFirewallIpConfiguration"), - Properties: &armnetwork.AzureFirewallIPConfigurationPropertiesFormat{ - PublicIPAddress: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName"), - }, - Subnet: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet"), - }, - }, - }}, - IPGroups: []*armnetwork.AzureFirewallIPGroups{}, - NatRuleCollections: []*armnetwork.AzureFirewallNatRuleCollection{ - { - Name: to.Ptr("natrulecoll"), - Properties: &armnetwork.AzureFirewallNatRuleCollectionProperties{ - Action: &armnetwork.AzureFirewallNatRCAction{ - Type: to.Ptr(armnetwork.AzureFirewallNatRCActionTypeDnat), - }, - Priority: to.Ptr[int32](112), - Rules: []*armnetwork.AzureFirewallNatRule{ - { - Name: to.Ptr("DNAT-HTTPS-traffic"), - Description: to.Ptr("D-NAT all outbound web traffic for inspection"), - DestinationAddresses: []*string{ - to.Ptr("1.2.3.4")}, - DestinationPorts: []*string{ - to.Ptr("443")}, - Protocols: []*armnetwork.AzureFirewallNetworkRuleProtocol{ - to.Ptr(armnetwork.AzureFirewallNetworkRuleProtocolTCP)}, - SourceAddresses: []*string{ - to.Ptr("*")}, - TranslatedAddress: to.Ptr("1.2.3.5"), - TranslatedPort: to.Ptr("8443"), - }, - { - Name: to.Ptr("DNAT-HTTP-traffic-With-FQDN"), - Description: to.Ptr("D-NAT all inbound web traffic for inspection"), - DestinationAddresses: []*string{ - to.Ptr("1.2.3.4")}, - DestinationPorts: []*string{ - to.Ptr("80")}, - Protocols: []*armnetwork.AzureFirewallNetworkRuleProtocol{ - to.Ptr(armnetwork.AzureFirewallNetworkRuleProtocolTCP)}, - SourceAddresses: []*string{ - to.Ptr("*")}, - TranslatedFqdn: to.Ptr("internalhttpserver"), - TranslatedPort: to.Ptr("880"), - }}, - }, - }}, - NetworkRuleCollections: []*armnetwork.AzureFirewallNetworkRuleCollection{ - { - Name: to.Ptr("netrulecoll"), - Properties: &armnetwork.AzureFirewallNetworkRuleCollectionPropertiesFormat{ - Action: &armnetwork.AzureFirewallRCAction{ - Type: to.Ptr(armnetwork.AzureFirewallRCActionTypeDeny), - }, - Priority: to.Ptr[int32](112), - Rules: []*armnetwork.AzureFirewallNetworkRule{ - { - Name: to.Ptr("L4-traffic"), - Description: to.Ptr("Block traffic based on source IPs and ports"), - DestinationAddresses: []*string{ - to.Ptr("*")}, - DestinationPorts: []*string{ - to.Ptr("443-444"), - to.Ptr("8443")}, - Protocols: []*armnetwork.AzureFirewallNetworkRuleProtocol{ - to.Ptr(armnetwork.AzureFirewallNetworkRuleProtocolTCP)}, - SourceAddresses: []*string{ - to.Ptr("192.168.1.1-192.168.1.12"), - to.Ptr("10.1.4.12-10.1.4.255")}, - }, - { - Name: to.Ptr("L4-traffic-with-FQDN"), - Description: to.Ptr("Block traffic based on source IPs and ports to amazon"), - DestinationFqdns: []*string{ - to.Ptr("www.amazon.com")}, - DestinationPorts: []*string{ - to.Ptr("443-444"), - to.Ptr("8443")}, - Protocols: []*armnetwork.AzureFirewallNetworkRuleProtocol{ - to.Ptr(armnetwork.AzureFirewallNetworkRuleProtocolTCP)}, - SourceAddresses: []*string{ - to.Ptr("10.2.4.12-10.2.4.255")}, - }}, - }, - }}, - SKU: &armnetwork.AzureFirewallSKU{ - Name: to.Ptr(armnetwork.AzureFirewallSKUNameAZFWVnet), - Tier: to.Ptr(armnetwork.AzureFirewallSKUTierStandard), - }, - ThreatIntelMode: to.Ptr(armnetwork.AzureFirewallThreatIntelModeAlert), - }, - Zones: []*string{}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/AzureFirewallPutWithIpGroups.json -func ExampleAzureFirewallsClient_BeginCreateOrUpdate_createAzureFirewallWithIpGroups() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAzureFirewallsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "azurefirewall", armnetwork.AzureFirewall{ - Location: to.Ptr("West US"), - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - }, - Properties: &armnetwork.AzureFirewallPropertiesFormat{ - ApplicationRuleCollections: []*armnetwork.AzureFirewallApplicationRuleCollection{ - { - Name: to.Ptr("apprulecoll"), - Properties: &armnetwork.AzureFirewallApplicationRuleCollectionPropertiesFormat{ - Action: &armnetwork.AzureFirewallRCAction{ - Type: to.Ptr(armnetwork.AzureFirewallRCActionTypeDeny), - }, - Priority: to.Ptr[int32](110), - Rules: []*armnetwork.AzureFirewallApplicationRule{ - { - Name: to.Ptr("rule1"), - Description: to.Ptr("Deny inbound rule"), - Protocols: []*armnetwork.AzureFirewallApplicationRuleProtocol{ - { - Port: to.Ptr[int32](443), - ProtocolType: to.Ptr(armnetwork.AzureFirewallApplicationRuleProtocolTypeHTTPS), - }}, - SourceAddresses: []*string{ - to.Ptr("216.58.216.164"), - to.Ptr("10.0.0.0/24")}, - TargetFqdns: []*string{ - to.Ptr("www.test.com")}, - }}, - }, - }}, - IPConfigurations: []*armnetwork.AzureFirewallIPConfiguration{ - { - Name: to.Ptr("azureFirewallIpConfiguration"), - Properties: &armnetwork.AzureFirewallIPConfigurationPropertiesFormat{ - PublicIPAddress: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName"), - }, - Subnet: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet"), - }, - }, - }}, - NatRuleCollections: []*armnetwork.AzureFirewallNatRuleCollection{ - { - Name: to.Ptr("natrulecoll"), - Properties: &armnetwork.AzureFirewallNatRuleCollectionProperties{ - Action: &armnetwork.AzureFirewallNatRCAction{ - Type: to.Ptr(armnetwork.AzureFirewallNatRCActionTypeDnat), - }, - Priority: to.Ptr[int32](112), - Rules: []*armnetwork.AzureFirewallNatRule{ - { - Name: to.Ptr("DNAT-HTTPS-traffic"), - Description: to.Ptr("D-NAT all outbound web traffic for inspection"), - DestinationAddresses: []*string{ - to.Ptr("1.2.3.4")}, - DestinationPorts: []*string{ - to.Ptr("443")}, - Protocols: []*armnetwork.AzureFirewallNetworkRuleProtocol{ - to.Ptr(armnetwork.AzureFirewallNetworkRuleProtocolTCP)}, - SourceAddresses: []*string{ - to.Ptr("*")}, - TranslatedAddress: to.Ptr("1.2.3.5"), - TranslatedPort: to.Ptr("8443"), - }, - { - Name: to.Ptr("DNAT-HTTP-traffic-With-FQDN"), - Description: to.Ptr("D-NAT all inbound web traffic for inspection"), - DestinationAddresses: []*string{ - to.Ptr("1.2.3.4")}, - DestinationPorts: []*string{ - to.Ptr("80")}, - Protocols: []*armnetwork.AzureFirewallNetworkRuleProtocol{ - to.Ptr(armnetwork.AzureFirewallNetworkRuleProtocolTCP)}, - SourceAddresses: []*string{ - to.Ptr("*")}, - TranslatedFqdn: to.Ptr("internalhttpserver"), - TranslatedPort: to.Ptr("880"), - }}, - }, - }}, - NetworkRuleCollections: []*armnetwork.AzureFirewallNetworkRuleCollection{ - { - Name: to.Ptr("netrulecoll"), - Properties: &armnetwork.AzureFirewallNetworkRuleCollectionPropertiesFormat{ - Action: &armnetwork.AzureFirewallRCAction{ - Type: to.Ptr(armnetwork.AzureFirewallRCActionTypeDeny), - }, - Priority: to.Ptr[int32](112), - Rules: []*armnetwork.AzureFirewallNetworkRule{ - { - Name: to.Ptr("L4-traffic"), - Description: to.Ptr("Block traffic based on source IPs and ports"), - DestinationAddresses: []*string{ - to.Ptr("*")}, - DestinationPorts: []*string{ - to.Ptr("443-444"), - to.Ptr("8443")}, - Protocols: []*armnetwork.AzureFirewallNetworkRuleProtocol{ - to.Ptr(armnetwork.AzureFirewallNetworkRuleProtocolTCP)}, - SourceAddresses: []*string{ - to.Ptr("192.168.1.1-192.168.1.12"), - to.Ptr("10.1.4.12-10.1.4.255")}, - }, - { - Name: to.Ptr("L4-traffic-with-FQDN"), - Description: to.Ptr("Block traffic based on source IPs and ports to amazon"), - DestinationFqdns: []*string{ - to.Ptr("www.amazon.com")}, - DestinationPorts: []*string{ - to.Ptr("443-444"), - to.Ptr("8443")}, - Protocols: []*armnetwork.AzureFirewallNetworkRuleProtocol{ - to.Ptr(armnetwork.AzureFirewallNetworkRuleProtocolTCP)}, - SourceAddresses: []*string{ - to.Ptr("10.2.4.12-10.2.4.255")}, - }}, - }, - }}, - SKU: &armnetwork.AzureFirewallSKU{ - Name: to.Ptr(armnetwork.AzureFirewallSKUNameAZFWVnet), - Tier: to.Ptr(armnetwork.AzureFirewallSKUTierStandard), - }, - ThreatIntelMode: to.Ptr(armnetwork.AzureFirewallThreatIntelModeAlert), - }, - Zones: []*string{}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/AzureFirewallPutWithZones.json -func ExampleAzureFirewallsClient_BeginCreateOrUpdate_createAzureFirewallWithZones() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAzureFirewallsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "azurefirewall", armnetwork.AzureFirewall{ - Location: to.Ptr("West US 2"), - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - }, - Properties: &armnetwork.AzureFirewallPropertiesFormat{ - ApplicationRuleCollections: []*armnetwork.AzureFirewallApplicationRuleCollection{ - { - Name: to.Ptr("apprulecoll"), - Properties: &armnetwork.AzureFirewallApplicationRuleCollectionPropertiesFormat{ - Action: &armnetwork.AzureFirewallRCAction{ - Type: to.Ptr(armnetwork.AzureFirewallRCActionTypeDeny), - }, - Priority: to.Ptr[int32](110), - Rules: []*armnetwork.AzureFirewallApplicationRule{ - { - Name: to.Ptr("rule1"), - Description: to.Ptr("Deny inbound rule"), - Protocols: []*armnetwork.AzureFirewallApplicationRuleProtocol{ - { - Port: to.Ptr[int32](443), - ProtocolType: to.Ptr(armnetwork.AzureFirewallApplicationRuleProtocolTypeHTTPS), - }}, - SourceAddresses: []*string{ - to.Ptr("216.58.216.164"), - to.Ptr("10.0.0.0/24")}, - TargetFqdns: []*string{ - to.Ptr("www.test.com")}, - }}, - }, - }}, - IPConfigurations: []*armnetwork.AzureFirewallIPConfiguration{ - { - Name: to.Ptr("azureFirewallIpConfiguration"), - Properties: &armnetwork.AzureFirewallIPConfigurationPropertiesFormat{ - PublicIPAddress: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName"), - }, - Subnet: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet"), - }, - }, - }}, - NatRuleCollections: []*armnetwork.AzureFirewallNatRuleCollection{ - { - Name: to.Ptr("natrulecoll"), - Properties: &armnetwork.AzureFirewallNatRuleCollectionProperties{ - Action: &armnetwork.AzureFirewallNatRCAction{ - Type: to.Ptr(armnetwork.AzureFirewallNatRCActionTypeDnat), - }, - Priority: to.Ptr[int32](112), - Rules: []*armnetwork.AzureFirewallNatRule{ - { - Name: to.Ptr("DNAT-HTTPS-traffic"), - Description: to.Ptr("D-NAT all outbound web traffic for inspection"), - DestinationAddresses: []*string{ - to.Ptr("1.2.3.4")}, - DestinationPorts: []*string{ - to.Ptr("443")}, - Protocols: []*armnetwork.AzureFirewallNetworkRuleProtocol{ - to.Ptr(armnetwork.AzureFirewallNetworkRuleProtocolTCP)}, - SourceAddresses: []*string{ - to.Ptr("*")}, - TranslatedAddress: to.Ptr("1.2.3.5"), - TranslatedPort: to.Ptr("8443"), - }, - { - Name: to.Ptr("DNAT-HTTP-traffic-With-FQDN"), - Description: to.Ptr("D-NAT all inbound web traffic for inspection"), - DestinationAddresses: []*string{ - to.Ptr("1.2.3.4")}, - DestinationPorts: []*string{ - to.Ptr("80")}, - Protocols: []*armnetwork.AzureFirewallNetworkRuleProtocol{ - to.Ptr(armnetwork.AzureFirewallNetworkRuleProtocolTCP)}, - SourceAddresses: []*string{ - to.Ptr("*")}, - TranslatedFqdn: to.Ptr("internalhttpserver"), - TranslatedPort: to.Ptr("880"), - }}, - }, - }}, - NetworkRuleCollections: []*armnetwork.AzureFirewallNetworkRuleCollection{ - { - Name: to.Ptr("netrulecoll"), - Properties: &armnetwork.AzureFirewallNetworkRuleCollectionPropertiesFormat{ - Action: &armnetwork.AzureFirewallRCAction{ - Type: to.Ptr(armnetwork.AzureFirewallRCActionTypeDeny), - }, - Priority: to.Ptr[int32](112), - Rules: []*armnetwork.AzureFirewallNetworkRule{ - { - Name: to.Ptr("L4-traffic"), - Description: to.Ptr("Block traffic based on source IPs and ports"), - DestinationAddresses: []*string{ - to.Ptr("*")}, - DestinationPorts: []*string{ - to.Ptr("443-444"), - to.Ptr("8443")}, - Protocols: []*armnetwork.AzureFirewallNetworkRuleProtocol{ - to.Ptr(armnetwork.AzureFirewallNetworkRuleProtocolTCP)}, - SourceAddresses: []*string{ - to.Ptr("192.168.1.1-192.168.1.12"), - to.Ptr("10.1.4.12-10.1.4.255")}, - }, - { - Name: to.Ptr("L4-traffic-with-FQDN"), - Description: to.Ptr("Block traffic based on source IPs and ports to amazon"), - DestinationFqdns: []*string{ - to.Ptr("www.amazon.com")}, - DestinationPorts: []*string{ - to.Ptr("443-444"), - to.Ptr("8443")}, - Protocols: []*armnetwork.AzureFirewallNetworkRuleProtocol{ - to.Ptr(armnetwork.AzureFirewallNetworkRuleProtocolTCP)}, - SourceAddresses: []*string{ - to.Ptr("10.2.4.12-10.2.4.255")}, - }}, - }, - }}, - SKU: &armnetwork.AzureFirewallSKU{ - Name: to.Ptr(armnetwork.AzureFirewallSKUNameAZFWVnet), - Tier: to.Ptr(armnetwork.AzureFirewallSKUTierStandard), - }, - ThreatIntelMode: to.Ptr(armnetwork.AzureFirewallThreatIntelModeAlert), - }, - Zones: []*string{ - to.Ptr("1"), - to.Ptr("2"), - to.Ptr("3")}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/AzureFirewallPutWithMgmtSubnet.json -func ExampleAzureFirewallsClient_BeginCreateOrUpdate_createAzureFirewallWithManagementSubnet() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAzureFirewallsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "azurefirewall", armnetwork.AzureFirewall{ - Location: to.Ptr("West US"), - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - }, - Properties: &armnetwork.AzureFirewallPropertiesFormat{ - ApplicationRuleCollections: []*armnetwork.AzureFirewallApplicationRuleCollection{ - { - Name: to.Ptr("apprulecoll"), - Properties: &armnetwork.AzureFirewallApplicationRuleCollectionPropertiesFormat{ - Action: &armnetwork.AzureFirewallRCAction{ - Type: to.Ptr(armnetwork.AzureFirewallRCActionTypeDeny), - }, - Priority: to.Ptr[int32](110), - Rules: []*armnetwork.AzureFirewallApplicationRule{ - { - Name: to.Ptr("rule1"), - Description: to.Ptr("Deny inbound rule"), - Protocols: []*armnetwork.AzureFirewallApplicationRuleProtocol{ - { - Port: to.Ptr[int32](443), - ProtocolType: to.Ptr(armnetwork.AzureFirewallApplicationRuleProtocolTypeHTTPS), - }}, - SourceAddresses: []*string{ - to.Ptr("216.58.216.164"), - to.Ptr("10.0.0.0/24")}, - TargetFqdns: []*string{ - to.Ptr("www.test.com")}, - }}, - }, - }}, - IPConfigurations: []*armnetwork.AzureFirewallIPConfiguration{ - { - Name: to.Ptr("azureFirewallIpConfiguration"), - Properties: &armnetwork.AzureFirewallIPConfigurationPropertiesFormat{ - PublicIPAddress: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName"), - }, - Subnet: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallSubnet"), - }, - }, - }}, - ManagementIPConfiguration: &armnetwork.AzureFirewallIPConfiguration{ - Name: to.Ptr("azureFirewallMgmtIpConfiguration"), - Properties: &armnetwork.AzureFirewallIPConfigurationPropertiesFormat{ - PublicIPAddress: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/managementPipName"), - }, - Subnet: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/AzureFirewallManagementSubnet"), - }, - }, - }, - NatRuleCollections: []*armnetwork.AzureFirewallNatRuleCollection{ - { - Name: to.Ptr("natrulecoll"), - Properties: &armnetwork.AzureFirewallNatRuleCollectionProperties{ - Action: &armnetwork.AzureFirewallNatRCAction{ - Type: to.Ptr(armnetwork.AzureFirewallNatRCActionTypeDnat), - }, - Priority: to.Ptr[int32](112), - Rules: []*armnetwork.AzureFirewallNatRule{ - { - Name: to.Ptr("DNAT-HTTPS-traffic"), - Description: to.Ptr("D-NAT all outbound web traffic for inspection"), - DestinationAddresses: []*string{ - to.Ptr("1.2.3.4")}, - DestinationPorts: []*string{ - to.Ptr("443")}, - Protocols: []*armnetwork.AzureFirewallNetworkRuleProtocol{ - to.Ptr(armnetwork.AzureFirewallNetworkRuleProtocolTCP)}, - SourceAddresses: []*string{ - to.Ptr("*")}, - TranslatedAddress: to.Ptr("1.2.3.5"), - TranslatedPort: to.Ptr("8443"), - }, - { - Name: to.Ptr("DNAT-HTTP-traffic-With-FQDN"), - Description: to.Ptr("D-NAT all inbound web traffic for inspection"), - DestinationAddresses: []*string{ - to.Ptr("1.2.3.4")}, - DestinationPorts: []*string{ - to.Ptr("80")}, - Protocols: []*armnetwork.AzureFirewallNetworkRuleProtocol{ - to.Ptr(armnetwork.AzureFirewallNetworkRuleProtocolTCP)}, - SourceAddresses: []*string{ - to.Ptr("*")}, - TranslatedFqdn: to.Ptr("internalhttpserver"), - TranslatedPort: to.Ptr("880"), - }}, - }, - }}, - NetworkRuleCollections: []*armnetwork.AzureFirewallNetworkRuleCollection{ - { - Name: to.Ptr("netrulecoll"), - Properties: &armnetwork.AzureFirewallNetworkRuleCollectionPropertiesFormat{ - Action: &armnetwork.AzureFirewallRCAction{ - Type: to.Ptr(armnetwork.AzureFirewallRCActionTypeDeny), - }, - Priority: to.Ptr[int32](112), - Rules: []*armnetwork.AzureFirewallNetworkRule{ - { - Name: to.Ptr("L4-traffic"), - Description: to.Ptr("Block traffic based on source IPs and ports"), - DestinationAddresses: []*string{ - to.Ptr("*")}, - DestinationPorts: []*string{ - to.Ptr("443-444"), - to.Ptr("8443")}, - Protocols: []*armnetwork.AzureFirewallNetworkRuleProtocol{ - to.Ptr(armnetwork.AzureFirewallNetworkRuleProtocolTCP)}, - SourceAddresses: []*string{ - to.Ptr("192.168.1.1-192.168.1.12"), - to.Ptr("10.1.4.12-10.1.4.255")}, - }, - { - Name: to.Ptr("L4-traffic-with-FQDN"), - Description: to.Ptr("Block traffic based on source IPs and ports to amazon"), - DestinationFqdns: []*string{ - to.Ptr("www.amazon.com")}, - DestinationPorts: []*string{ - to.Ptr("443-444"), - to.Ptr("8443")}, - Protocols: []*armnetwork.AzureFirewallNetworkRuleProtocol{ - to.Ptr(armnetwork.AzureFirewallNetworkRuleProtocolTCP)}, - SourceAddresses: []*string{ - to.Ptr("10.2.4.12-10.2.4.255")}, - }}, - }, - }}, - SKU: &armnetwork.AzureFirewallSKU{ - Name: to.Ptr(armnetwork.AzureFirewallSKUNameAZFWVnet), - Tier: to.Ptr(armnetwork.AzureFirewallSKUTierStandard), - }, - ThreatIntelMode: to.Ptr(armnetwork.AzureFirewallThreatIntelModeAlert), - }, - Zones: []*string{}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/AzureFirewallPutInHub.json -func ExampleAzureFirewallsClient_BeginCreateOrUpdate_createAzureFirewallInVirtualHub() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAzureFirewallsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "azurefirewall", armnetwork.AzureFirewall{ - Location: to.Ptr("West US"), - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - }, - Properties: &armnetwork.AzureFirewallPropertiesFormat{ - FirewallPolicy: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/firewallPolicies/policy1"), - }, - HubIPAddresses: &armnetwork.HubIPAddresses{ - PublicIPs: &armnetwork.HubPublicIPAddresses{ - Addresses: []*armnetwork.AzureFirewallPublicIPAddress{}, - Count: to.Ptr[int32](1), - }, - }, - SKU: &armnetwork.AzureFirewallSKU{ - Name: to.Ptr(armnetwork.AzureFirewallSKUNameAZFWHub), - Tier: to.Ptr(armnetwork.AzureFirewallSKUTierStandard), - }, - ThreatIntelMode: to.Ptr(armnetwork.AzureFirewallThreatIntelModeAlert), - VirtualHub: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1"), - }, - }, - Zones: []*string{}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/AzureFirewallUpdateTags.json -func ExampleAzureFirewallsClient_BeginUpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAzureFirewallsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdateTags(ctx, "azfwtest", "fw1", armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/AzureFirewallListByResourceGroup.json -func ExampleAzureFirewallsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAzureFirewallsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/AzureFirewallListBySubscription.json -func ExampleAzureFirewallsClient_NewListAllPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAzureFirewallsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListAllPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/AzureFirewallListLearnedIPPrefixes.json -func ExampleAzureFirewallsClient_BeginListLearnedPrefixes() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewAzureFirewallsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginListLearnedPrefixes(ctx, "rg1", "azureFirewall1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/bastionhosts_client.go b/sdk/resourcemanager/network/armnetwork/bastionhosts_client.go index 768eb3b15410..f64310d6463c 100644 --- a/sdk/resourcemanager/network/armnetwork/bastionhosts_client.go +++ b/sdk/resourcemanager/network/armnetwork/bastionhosts_client.go @@ -32,10 +32,10 @@ type BastionHostsClient struct { } // NewBastionHostsClient creates a new instance of BastionHostsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewBastionHostsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BastionHostsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewBastionHostsClient(subscriptionID string, credential azcore.TokenCredent // BeginCreateOrUpdate - Creates or updates the specified Bastion Host. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// bastionHostName - The name of the Bastion Host. -// parameters - Parameters supplied to the create or update Bastion Host operation. -// options - BastionHostsClientBeginCreateOrUpdateOptions contains the optional parameters for the BastionHostsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - bastionHostName - The name of the Bastion Host. +// - parameters - Parameters supplied to the create or update Bastion Host operation. +// - options - BastionHostsClientBeginCreateOrUpdateOptions contains the optional parameters for the BastionHostsClient.BeginCreateOrUpdate +// method. func (client *BastionHostsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, bastionHostName string, parameters BastionHost, options *BastionHostsClientBeginCreateOrUpdateOptions) (*runtime.Poller[BastionHostsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, bastionHostName, parameters, options) @@ -80,6 +81,7 @@ func (client *BastionHostsClient) BeginCreateOrUpdate(ctx context.Context, resou // CreateOrUpdate - Creates or updates the specified Bastion Host. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *BastionHostsClient) createOrUpdate(ctx context.Context, resourceGroupName string, bastionHostName string, parameters BastionHost, options *BastionHostsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, bastionHostName, parameters, options) @@ -124,11 +126,12 @@ func (client *BastionHostsClient) createOrUpdateCreateRequest(ctx context.Contex // BeginDelete - Deletes the specified Bastion Host. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// bastionHostName - The name of the Bastion Host. -// options - BastionHostsClientBeginDeleteOptions contains the optional parameters for the BastionHostsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - bastionHostName - The name of the Bastion Host. +// - options - BastionHostsClientBeginDeleteOptions contains the optional parameters for the BastionHostsClient.BeginDelete +// method. func (client *BastionHostsClient) BeginDelete(ctx context.Context, resourceGroupName string, bastionHostName string, options *BastionHostsClientBeginDeleteOptions) (*runtime.Poller[BastionHostsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, bastionHostName, options) @@ -145,6 +148,7 @@ func (client *BastionHostsClient) BeginDelete(ctx context.Context, resourceGroup // Delete - Deletes the specified Bastion Host. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *BastionHostsClient) deleteOperation(ctx context.Context, resourceGroupName string, bastionHostName string, options *BastionHostsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, bastionHostName, options) @@ -189,10 +193,11 @@ func (client *BastionHostsClient) deleteCreateRequest(ctx context.Context, resou // Get - Gets the specified Bastion Host. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// bastionHostName - The name of the Bastion Host. -// options - BastionHostsClientGetOptions contains the optional parameters for the BastionHostsClient.Get method. +// - resourceGroupName - The name of the resource group. +// - bastionHostName - The name of the Bastion Host. +// - options - BastionHostsClientGetOptions contains the optional parameters for the BastionHostsClient.Get method. func (client *BastionHostsClient) Get(ctx context.Context, resourceGroupName string, bastionHostName string, options *BastionHostsClientGetOptions) (BastionHostsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, bastionHostName, options) if err != nil { @@ -244,8 +249,9 @@ func (client *BastionHostsClient) getHandleResponse(resp *http.Response) (Bastio } // NewListPager - Lists all Bastion Hosts in a subscription. +// // Generated from API version 2022-07-01 -// options - BastionHostsClientListOptions contains the optional parameters for the BastionHostsClient.List method. +// - options - BastionHostsClientListOptions contains the optional parameters for the BastionHostsClient.NewListPager method. func (client *BastionHostsClient) NewListPager(options *BastionHostsClientListOptions) *runtime.Pager[BastionHostsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[BastionHostsClientListResponse]{ More: func(page BastionHostsClientListResponse) bool { @@ -302,10 +308,11 @@ func (client *BastionHostsClient) listHandleResponse(resp *http.Response) (Basti } // NewListByResourceGroupPager - Lists all Bastion Hosts in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - BastionHostsClientListByResourceGroupOptions contains the optional parameters for the BastionHostsClient.ListByResourceGroup -// method. +// - resourceGroupName - The name of the resource group. +// - options - BastionHostsClientListByResourceGroupOptions contains the optional parameters for the BastionHostsClient.NewListByResourceGroupPager +// method. func (client *BastionHostsClient) NewListByResourceGroupPager(resourceGroupName string, options *BastionHostsClientListByResourceGroupOptions) *runtime.Pager[BastionHostsClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[BastionHostsClientListByResourceGroupResponse]{ More: func(page BastionHostsClientListByResourceGroupResponse) bool { @@ -367,12 +374,13 @@ func (client *BastionHostsClient) listByResourceGroupHandleResponse(resp *http.R // BeginUpdateTags - Updates Tags for BastionHost resource // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// bastionHostName - The name of the Bastion Host. -// parameters - Parameters supplied to update BastionHost tags. -// options - BastionHostsClientBeginUpdateTagsOptions contains the optional parameters for the BastionHostsClient.BeginUpdateTags -// method. +// - resourceGroupName - The name of the resource group. +// - bastionHostName - The name of the Bastion Host. +// - parameters - Parameters supplied to update BastionHost tags. +// - options - BastionHostsClientBeginUpdateTagsOptions contains the optional parameters for the BastionHostsClient.BeginUpdateTags +// method. func (client *BastionHostsClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, bastionHostName string, parameters TagsObject, options *BastionHostsClientBeginUpdateTagsOptions) (*runtime.Poller[BastionHostsClientUpdateTagsResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.updateTags(ctx, resourceGroupName, bastionHostName, parameters, options) @@ -389,6 +397,7 @@ func (client *BastionHostsClient) BeginUpdateTags(ctx context.Context, resourceG // UpdateTags - Updates Tags for BastionHost resource // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *BastionHostsClient) updateTags(ctx context.Context, resourceGroupName string, bastionHostName string, parameters TagsObject, options *BastionHostsClientBeginUpdateTagsOptions) (*http.Response, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, bastionHostName, parameters, options) diff --git a/sdk/resourcemanager/network/armnetwork/bastionhosts_client_example_test.go b/sdk/resourcemanager/network/armnetwork/bastionhosts_client_example_test.go deleted file mode 100644 index 8cd74c03e91e..000000000000 --- a/sdk/resourcemanager/network/armnetwork/bastionhosts_client_example_test.go +++ /dev/null @@ -1,172 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/BastionHostDelete.json -func ExampleBastionHostsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewBastionHostsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "bastionhosttenant", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/BastionHostGet.json -func ExampleBastionHostsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewBastionHostsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "bastionhosttenant'", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/BastionHostPut.json -func ExampleBastionHostsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewBastionHostsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "bastionhosttenant", armnetwork.BastionHost{ - Properties: &armnetwork.BastionHostPropertiesFormat{ - IPConfigurations: []*armnetwork.BastionHostIPConfiguration{ - { - Name: to.Ptr("bastionHostIpConfiguration"), - Properties: &armnetwork.BastionHostIPConfigurationPropertiesFormat{ - PublicIPAddress: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pipName"), - }, - Subnet: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/BastionHostSubnet"), - }, - }, - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/BastionHostPatch.json -func ExampleBastionHostsClient_BeginUpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewBastionHostsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdateTags(ctx, "rg1", "bastionhosttenant", armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/BastionHostListBySubscription.json -func ExampleBastionHostsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewBastionHostsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/BastionHostListByResourceGroup.json -func ExampleBastionHostsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewBastionHostsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/bgpservicecommunities_client.go b/sdk/resourcemanager/network/armnetwork/bgpservicecommunities_client.go index e614ac0e6cd6..792d1b5810f8 100644 --- a/sdk/resourcemanager/network/armnetwork/bgpservicecommunities_client.go +++ b/sdk/resourcemanager/network/armnetwork/bgpservicecommunities_client.go @@ -32,10 +32,10 @@ type BgpServiceCommunitiesClient struct { } // NewBgpServiceCommunitiesClient creates a new instance of BgpServiceCommunitiesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewBgpServiceCommunitiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BgpServiceCommunitiesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,9 +57,10 @@ func NewBgpServiceCommunitiesClient(subscriptionID string, credential azcore.Tok } // NewListPager - Gets all the available bgp service communities. +// // Generated from API version 2022-07-01 -// options - BgpServiceCommunitiesClientListOptions contains the optional parameters for the BgpServiceCommunitiesClient.List -// method. +// - options - BgpServiceCommunitiesClientListOptions contains the optional parameters for the BgpServiceCommunitiesClient.NewListPager +// method. func (client *BgpServiceCommunitiesClient) NewListPager(options *BgpServiceCommunitiesClientListOptions) *runtime.Pager[BgpServiceCommunitiesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[BgpServiceCommunitiesClientListResponse]{ More: func(page BgpServiceCommunitiesClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/bgpservicecommunities_client_example_test.go b/sdk/resourcemanager/network/armnetwork/bgpservicecommunities_client_example_test.go deleted file mode 100644 index 17c64f1cabb8..000000000000 --- a/sdk/resourcemanager/network/armnetwork/bgpservicecommunities_client_example_test.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ServiceCommunityList.json -func ExampleBgpServiceCommunitiesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewBgpServiceCommunitiesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/configurationpolicygroups_client.go b/sdk/resourcemanager/network/armnetwork/configurationpolicygroups_client.go index a8e3e9a1f33a..eaab85756a96 100644 --- a/sdk/resourcemanager/network/armnetwork/configurationpolicygroups_client.go +++ b/sdk/resourcemanager/network/armnetwork/configurationpolicygroups_client.go @@ -32,10 +32,10 @@ type ConfigurationPolicyGroupsClient struct { } // NewConfigurationPolicyGroupsClient creates a new instance of ConfigurationPolicyGroupsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewConfigurationPolicyGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConfigurationPolicyGroupsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewConfigurationPolicyGroupsClient(subscriptionID string, credential azcore // BeginCreateOrUpdate - Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the ConfigurationPolicyGroup. -// vpnServerConfigurationName - The name of the VpnServerConfiguration. -// configurationPolicyGroupName - The name of the ConfigurationPolicyGroup. -// vpnServerConfigurationPolicyGroupParameters - Parameters supplied to create or update a VpnServerConfiguration PolicyGroup. -// options - ConfigurationPolicyGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The resource group name of the ConfigurationPolicyGroup. +// - vpnServerConfigurationName - The name of the VpnServerConfiguration. +// - configurationPolicyGroupName - The name of the ConfigurationPolicyGroup. +// - vpnServerConfigurationPolicyGroupParameters - Parameters supplied to create or update a VpnServerConfiguration PolicyGroup. +// - options - ConfigurationPolicyGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.BeginCreateOrUpdate +// method. func (client *ConfigurationPolicyGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, configurationPolicyGroupName string, vpnServerConfigurationPolicyGroupParameters VPNServerConfigurationPolicyGroup, options *ConfigurationPolicyGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ConfigurationPolicyGroupsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, vpnServerConfigurationName, configurationPolicyGroupName, vpnServerConfigurationPolicyGroupParameters, options) @@ -81,6 +82,7 @@ func (client *ConfigurationPolicyGroupsClient) BeginCreateOrUpdate(ctx context.C // CreateOrUpdate - Creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ConfigurationPolicyGroupsClient) createOrUpdate(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, configurationPolicyGroupName string, vpnServerConfigurationPolicyGroupParameters VPNServerConfigurationPolicyGroup, options *ConfigurationPolicyGroupsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, vpnServerConfigurationName, configurationPolicyGroupName, vpnServerConfigurationPolicyGroupParameters, options) @@ -129,12 +131,13 @@ func (client *ConfigurationPolicyGroupsClient) createOrUpdateCreateRequest(ctx c // BeginDelete - Deletes a ConfigurationPolicyGroup. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the ConfigurationPolicyGroup. -// vpnServerConfigurationName - The name of the VpnServerConfiguration. -// configurationPolicyGroupName - The name of the ConfigurationPolicyGroup. -// options - ConfigurationPolicyGroupsClientBeginDeleteOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.BeginDelete -// method. +// - resourceGroupName - The resource group name of the ConfigurationPolicyGroup. +// - vpnServerConfigurationName - The name of the VpnServerConfiguration. +// - configurationPolicyGroupName - The name of the ConfigurationPolicyGroup. +// - options - ConfigurationPolicyGroupsClientBeginDeleteOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.BeginDelete +// method. func (client *ConfigurationPolicyGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, configurationPolicyGroupName string, options *ConfigurationPolicyGroupsClientBeginDeleteOptions) (*runtime.Poller[ConfigurationPolicyGroupsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, vpnServerConfigurationName, configurationPolicyGroupName, options) @@ -151,6 +154,7 @@ func (client *ConfigurationPolicyGroupsClient) BeginDelete(ctx context.Context, // Delete - Deletes a ConfigurationPolicyGroup. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ConfigurationPolicyGroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, configurationPolicyGroupName string, options *ConfigurationPolicyGroupsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, vpnServerConfigurationName, configurationPolicyGroupName, options) @@ -199,12 +203,13 @@ func (client *ConfigurationPolicyGroupsClient) deleteCreateRequest(ctx context.C // Get - Retrieves the details of a ConfigurationPolicyGroup. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VpnServerConfiguration. -// vpnServerConfigurationName - The name of the VpnServerConfiguration. -// configurationPolicyGroupName - The name of the ConfigurationPolicyGroup being retrieved. -// options - ConfigurationPolicyGroupsClientGetOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.Get -// method. +// - resourceGroupName - The resource group name of the VpnServerConfiguration. +// - vpnServerConfigurationName - The name of the VpnServerConfiguration. +// - configurationPolicyGroupName - The name of the ConfigurationPolicyGroup being retrieved. +// - options - ConfigurationPolicyGroupsClientGetOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.Get +// method. func (client *ConfigurationPolicyGroupsClient) Get(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, configurationPolicyGroupName string, options *ConfigurationPolicyGroupsClientGetOptions) (ConfigurationPolicyGroupsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, vpnServerConfigurationName, configurationPolicyGroupName, options) if err != nil { @@ -260,11 +265,12 @@ func (client *ConfigurationPolicyGroupsClient) getHandleResponse(resp *http.Resp } // NewListByVPNServerConfigurationPager - Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VpnServerConfiguration. -// vpnServerConfigurationName - The name of the VpnServerConfiguration. -// options - ConfigurationPolicyGroupsClientListByVPNServerConfigurationOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.ListByVPNServerConfiguration -// method. +// - resourceGroupName - The resource group name of the VpnServerConfiguration. +// - vpnServerConfigurationName - The name of the VpnServerConfiguration. +// - options - ConfigurationPolicyGroupsClientListByVPNServerConfigurationOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.NewListByVPNServerConfigurationPager +// method. func (client *ConfigurationPolicyGroupsClient) NewListByVPNServerConfigurationPager(resourceGroupName string, vpnServerConfigurationName string, options *ConfigurationPolicyGroupsClientListByVPNServerConfigurationOptions) *runtime.Pager[ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse] { return runtime.NewPager(runtime.PagingHandler[ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse]{ More: func(page ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/configurationpolicygroups_client_example_test.go b/sdk/resourcemanager/network/armnetwork/configurationpolicygroups_client_example_test.go deleted file mode 100644 index 77773151e46d..000000000000 --- a/sdk/resourcemanager/network/armnetwork/configurationpolicygroups_client_example_test.go +++ /dev/null @@ -1,121 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ConfigurationPolicyGroupPut.json -func ExampleConfigurationPolicyGroupsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewConfigurationPolicyGroupsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "vpnServerConfiguration1", "policyGroup1", armnetwork.VPNServerConfigurationPolicyGroup{ - Properties: &armnetwork.VPNServerConfigurationPolicyGroupProperties{ - IsDefault: to.Ptr(true), - PolicyMembers: []*armnetwork.VPNServerConfigurationPolicyGroupMember{ - { - Name: to.Ptr("policy1"), - AttributeType: to.Ptr(armnetwork.VPNPolicyMemberAttributeTypeRadiusAzureGroupID), - AttributeValue: to.Ptr("6ad1bd08"), - }, - { - Name: to.Ptr("policy2"), - AttributeType: to.Ptr(armnetwork.VPNPolicyMemberAttributeTypeCertificateGroupID), - AttributeValue: to.Ptr("red.com"), - }}, - Priority: to.Ptr[int32](0), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ConfigurationPolicyGroupDelete.json -func ExampleConfigurationPolicyGroupsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewConfigurationPolicyGroupsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "vpnServerConfiguration1", "policyGroup1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ConfigurationPolicyGroupGet.json -func ExampleConfigurationPolicyGroupsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewConfigurationPolicyGroupsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "vpnServerConfiguration1", "policyGroup1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ConfigurationPolicyGroupListByVpnServerConfiguration.json -func ExampleConfigurationPolicyGroupsClient_NewListByVPNServerConfigurationPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewConfigurationPolicyGroupsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByVPNServerConfigurationPager("rg1", "vpnServerConfiguration1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/connectionmonitors_client.go b/sdk/resourcemanager/network/armnetwork/connectionmonitors_client.go index 1e06157cfb1d..1d19745cba3b 100644 --- a/sdk/resourcemanager/network/armnetwork/connectionmonitors_client.go +++ b/sdk/resourcemanager/network/armnetwork/connectionmonitors_client.go @@ -32,10 +32,10 @@ type ConnectionMonitorsClient struct { } // NewConnectionMonitorsClient creates a new instance of ConnectionMonitorsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewConnectionMonitorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConnectionMonitorsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewConnectionMonitorsClient(subscriptionID string, credential azcore.TokenC // BeginCreateOrUpdate - Create or update a connection monitor. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group containing Network Watcher. -// networkWatcherName - The name of the Network Watcher resource. -// connectionMonitorName - The name of the connection monitor. -// parameters - Parameters that define the operation to create a connection monitor. -// options - ConnectionMonitorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ConnectionMonitorsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group containing Network Watcher. +// - networkWatcherName - The name of the Network Watcher resource. +// - connectionMonitorName - The name of the connection monitor. +// - parameters - Parameters that define the operation to create a connection monitor. +// - options - ConnectionMonitorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ConnectionMonitorsClient.BeginCreateOrUpdate +// method. func (client *ConnectionMonitorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, parameters ConnectionMonitor, options *ConnectionMonitorsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ConnectionMonitorsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, parameters, options) @@ -81,6 +82,7 @@ func (client *ConnectionMonitorsClient) BeginCreateOrUpdate(ctx context.Context, // CreateOrUpdate - Create or update a connection monitor. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ConnectionMonitorsClient) createOrUpdate(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, parameters ConnectionMonitor, options *ConnectionMonitorsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, parameters, options) @@ -132,12 +134,13 @@ func (client *ConnectionMonitorsClient) createOrUpdateCreateRequest(ctx context. // BeginDelete - Deletes the specified connection monitor. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group containing Network Watcher. -// networkWatcherName - The name of the Network Watcher resource. -// connectionMonitorName - The name of the connection monitor. -// options - ConnectionMonitorsClientBeginDeleteOptions contains the optional parameters for the ConnectionMonitorsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group containing Network Watcher. +// - networkWatcherName - The name of the Network Watcher resource. +// - connectionMonitorName - The name of the connection monitor. +// - options - ConnectionMonitorsClientBeginDeleteOptions contains the optional parameters for the ConnectionMonitorsClient.BeginDelete +// method. func (client *ConnectionMonitorsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginDeleteOptions) (*runtime.Poller[ConnectionMonitorsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) @@ -154,6 +157,7 @@ func (client *ConnectionMonitorsClient) BeginDelete(ctx context.Context, resourc // Delete - Deletes the specified connection monitor. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ConnectionMonitorsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) @@ -202,11 +206,12 @@ func (client *ConnectionMonitorsClient) deleteCreateRequest(ctx context.Context, // Get - Gets a connection monitor by name. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group containing Network Watcher. -// networkWatcherName - The name of the Network Watcher resource. -// connectionMonitorName - The name of the connection monitor. -// options - ConnectionMonitorsClientGetOptions contains the optional parameters for the ConnectionMonitorsClient.Get method. +// - resourceGroupName - The name of the resource group containing Network Watcher. +// - networkWatcherName - The name of the Network Watcher resource. +// - connectionMonitorName - The name of the connection monitor. +// - options - ConnectionMonitorsClientGetOptions contains the optional parameters for the ConnectionMonitorsClient.Get method. func (client *ConnectionMonitorsClient) Get(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientGetOptions) (ConnectionMonitorsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) if err != nil { @@ -262,10 +267,12 @@ func (client *ConnectionMonitorsClient) getHandleResponse(resp *http.Response) ( } // NewListPager - Lists all connection monitors for the specified Network Watcher. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group containing Network Watcher. -// networkWatcherName - The name of the Network Watcher resource. -// options - ConnectionMonitorsClientListOptions contains the optional parameters for the ConnectionMonitorsClient.List method. +// - resourceGroupName - The name of the resource group containing Network Watcher. +// - networkWatcherName - The name of the Network Watcher resource. +// - options - ConnectionMonitorsClientListOptions contains the optional parameters for the ConnectionMonitorsClient.NewListPager +// method. func (client *ConnectionMonitorsClient) NewListPager(resourceGroupName string, networkWatcherName string, options *ConnectionMonitorsClientListOptions) *runtime.Pager[ConnectionMonitorsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ConnectionMonitorsClientListResponse]{ More: func(page ConnectionMonitorsClientListResponse) bool { @@ -325,12 +332,13 @@ func (client *ConnectionMonitorsClient) listHandleResponse(resp *http.Response) // BeginQuery - Query a snapshot of the most recent connection states. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group containing Network Watcher. -// networkWatcherName - The name of the Network Watcher resource. -// connectionMonitorName - The name given to the connection monitor. -// options - ConnectionMonitorsClientBeginQueryOptions contains the optional parameters for the ConnectionMonitorsClient.BeginQuery -// method. +// - resourceGroupName - The name of the resource group containing Network Watcher. +// - networkWatcherName - The name of the Network Watcher resource. +// - connectionMonitorName - The name given to the connection monitor. +// - options - ConnectionMonitorsClientBeginQueryOptions contains the optional parameters for the ConnectionMonitorsClient.BeginQuery +// method. func (client *ConnectionMonitorsClient) BeginQuery(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginQueryOptions) (*runtime.Poller[ConnectionMonitorsClientQueryResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.query(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) @@ -347,6 +355,7 @@ func (client *ConnectionMonitorsClient) BeginQuery(ctx context.Context, resource // Query - Query a snapshot of the most recent connection states. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ConnectionMonitorsClient) query(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginQueryOptions) (*http.Response, error) { req, err := client.queryCreateRequest(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) @@ -395,12 +404,13 @@ func (client *ConnectionMonitorsClient) queryCreateRequest(ctx context.Context, // BeginStart - Starts the specified connection monitor. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group containing Network Watcher. -// networkWatcherName - The name of the Network Watcher resource. -// connectionMonitorName - The name of the connection monitor. -// options - ConnectionMonitorsClientBeginStartOptions contains the optional parameters for the ConnectionMonitorsClient.BeginStart -// method. +// - resourceGroupName - The name of the resource group containing Network Watcher. +// - networkWatcherName - The name of the Network Watcher resource. +// - connectionMonitorName - The name of the connection monitor. +// - options - ConnectionMonitorsClientBeginStartOptions contains the optional parameters for the ConnectionMonitorsClient.BeginStart +// method. func (client *ConnectionMonitorsClient) BeginStart(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginStartOptions) (*runtime.Poller[ConnectionMonitorsClientStartResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.start(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) @@ -417,6 +427,7 @@ func (client *ConnectionMonitorsClient) BeginStart(ctx context.Context, resource // Start - Starts the specified connection monitor. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ConnectionMonitorsClient) start(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginStartOptions) (*http.Response, error) { req, err := client.startCreateRequest(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) @@ -465,12 +476,13 @@ func (client *ConnectionMonitorsClient) startCreateRequest(ctx context.Context, // BeginStop - Stops the specified connection monitor. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group containing Network Watcher. -// networkWatcherName - The name of the Network Watcher resource. -// connectionMonitorName - The name of the connection monitor. -// options - ConnectionMonitorsClientBeginStopOptions contains the optional parameters for the ConnectionMonitorsClient.BeginStop -// method. +// - resourceGroupName - The name of the resource group containing Network Watcher. +// - networkWatcherName - The name of the Network Watcher resource. +// - connectionMonitorName - The name of the connection monitor. +// - options - ConnectionMonitorsClientBeginStopOptions contains the optional parameters for the ConnectionMonitorsClient.BeginStop +// method. func (client *ConnectionMonitorsClient) BeginStop(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginStopOptions) (*runtime.Poller[ConnectionMonitorsClientStopResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.stop(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) @@ -487,6 +499,7 @@ func (client *ConnectionMonitorsClient) BeginStop(ctx context.Context, resourceG // Stop - Stops the specified connection monitor. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ConnectionMonitorsClient) stop(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginStopOptions) (*http.Response, error) { req, err := client.stopCreateRequest(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) @@ -535,13 +548,14 @@ func (client *ConnectionMonitorsClient) stopCreateRequest(ctx context.Context, r // UpdateTags - Update tags of the specified connection monitor. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// connectionMonitorName - The name of the connection monitor. -// parameters - Parameters supplied to update connection monitor tags. -// options - ConnectionMonitorsClientUpdateTagsOptions contains the optional parameters for the ConnectionMonitorsClient.UpdateTags -// method. +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - connectionMonitorName - The name of the connection monitor. +// - parameters - Parameters supplied to update connection monitor tags. +// - options - ConnectionMonitorsClientUpdateTagsOptions contains the optional parameters for the ConnectionMonitorsClient.UpdateTags +// method. func (client *ConnectionMonitorsClient) UpdateTags(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, parameters TagsObject, options *ConnectionMonitorsClientUpdateTagsOptions) (ConnectionMonitorsClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/connectionmonitors_client_example_test.go b/sdk/resourcemanager/network/armnetwork/connectionmonitors_client_example_test.go deleted file mode 100644 index 6e635989c2e1..000000000000 --- a/sdk/resourcemanager/network/armnetwork/connectionmonitors_client_example_test.go +++ /dev/null @@ -1,301 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherConnectionMonitorCreate.json -func ExampleConnectionMonitorsClient_BeginCreateOrUpdate_createConnectionMonitorV1() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewConnectionMonitorsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "nw1", "cm1", armnetwork.ConnectionMonitor{ - Location: to.Ptr("eastus"), - Properties: &armnetwork.ConnectionMonitorParameters{ - Endpoints: []*armnetwork.ConnectionMonitorEndpoint{ - { - Name: to.Ptr("source"), - ResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/ct1"), - }, - { - Name: to.Ptr("destination"), - Address: to.Ptr("bing.com"), - }}, - TestConfigurations: []*armnetwork.ConnectionMonitorTestConfiguration{ - { - Name: to.Ptr("tcp"), - TCPConfiguration: &armnetwork.ConnectionMonitorTCPConfiguration{ - Port: to.Ptr[int32](80), - }, - TestFrequencySec: to.Ptr[int32](60), - Protocol: to.Ptr(armnetwork.ConnectionMonitorTestConfigurationProtocolTCP), - }}, - TestGroups: []*armnetwork.ConnectionMonitorTestGroup{ - { - Name: to.Ptr("tg"), - Destinations: []*string{ - to.Ptr("destination")}, - Sources: []*string{ - to.Ptr("source")}, - TestConfigurations: []*string{ - to.Ptr("tcp")}, - }}, - }, - }, &armnetwork.ConnectionMonitorsClientBeginCreateOrUpdateOptions{Migrate: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherConnectionMonitorV2Create.json -func ExampleConnectionMonitorsClient_BeginCreateOrUpdate_createConnectionMonitorV2() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewConnectionMonitorsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "nw1", "cm1", armnetwork.ConnectionMonitor{ - Properties: &armnetwork.ConnectionMonitorParameters{ - Endpoints: []*armnetwork.ConnectionMonitorEndpoint{ - { - Name: to.Ptr("vm1"), - ResourceID: to.Ptr("/subscriptions/96e68903-0a56-4819-9987-8d08ad6a1f99/resourceGroups/NwRgIrinaCentralUSEUAP/providers/Microsoft.Compute/virtualMachines/vm1"), - }, - { - Name: to.Ptr("CanaryWorkspaceVamshi"), - Filter: &armnetwork.ConnectionMonitorEndpointFilter{ - Type: to.Ptr(armnetwork.ConnectionMonitorEndpointFilterTypeInclude), - Items: []*armnetwork.ConnectionMonitorEndpointFilterItem{ - { - Type: to.Ptr(armnetwork.ConnectionMonitorEndpointFilterItemTypeAgentAddress), - Address: to.Ptr("npmuser"), - }}, - }, - ResourceID: to.Ptr("/subscriptions/96e68903-0a56-4819-9987-8d08ad6a1f99/resourceGroups/vasamudrRG/providers/Microsoft.OperationalInsights/workspaces/vasamudrWorkspace"), - }, - { - Name: to.Ptr("bing"), - Address: to.Ptr("bing.com"), - }, - { - Name: to.Ptr("google"), - Address: to.Ptr("google.com"), - }}, - Outputs: []*armnetwork.ConnectionMonitorOutput{}, - TestConfigurations: []*armnetwork.ConnectionMonitorTestConfiguration{ - { - Name: to.Ptr("testConfig1"), - TCPConfiguration: &armnetwork.ConnectionMonitorTCPConfiguration{ - DisableTraceRoute: to.Ptr(false), - Port: to.Ptr[int32](80), - }, - TestFrequencySec: to.Ptr[int32](60), - Protocol: to.Ptr(armnetwork.ConnectionMonitorTestConfigurationProtocolTCP), - }}, - TestGroups: []*armnetwork.ConnectionMonitorTestGroup{ - { - Name: to.Ptr("test1"), - Destinations: []*string{ - to.Ptr("bing"), - to.Ptr("google")}, - Disable: to.Ptr(false), - Sources: []*string{ - to.Ptr("vm1"), - to.Ptr("CanaryWorkspaceVamshi")}, - TestConfigurations: []*string{ - to.Ptr("testConfig1")}, - }}, - }, - }, &armnetwork.ConnectionMonitorsClientBeginCreateOrUpdateOptions{Migrate: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherConnectionMonitorGet.json -func ExampleConnectionMonitorsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewConnectionMonitorsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "nw1", "cm1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherConnectionMonitorDelete.json -func ExampleConnectionMonitorsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewConnectionMonitorsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "nw1", "cm1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherConnectionMonitorUpdateTags.json -func ExampleConnectionMonitorsClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewConnectionMonitorsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, "rg1", "nw1", "cm1", armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherConnectionMonitorStop.json -func ExampleConnectionMonitorsClient_BeginStop() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewConnectionMonitorsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStop(ctx, "rg1", "nw1", "cm1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherConnectionMonitorStart.json -func ExampleConnectionMonitorsClient_BeginStart() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewConnectionMonitorsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStart(ctx, "rg1", "nw1", "cm1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherConnectionMonitorQuery.json -func ExampleConnectionMonitorsClient_BeginQuery() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewConnectionMonitorsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginQuery(ctx, "rg1", "nw1", "cm1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherConnectionMonitorList.json -func ExampleConnectionMonitorsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewConnectionMonitorsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", "nw1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/connectivityconfigurations_client.go b/sdk/resourcemanager/network/armnetwork/connectivityconfigurations_client.go index 49f1d6846894..a36cf0d251ba 100644 --- a/sdk/resourcemanager/network/armnetwork/connectivityconfigurations_client.go +++ b/sdk/resourcemanager/network/armnetwork/connectivityconfigurations_client.go @@ -33,10 +33,10 @@ type ConnectivityConfigurationsClient struct { } // NewConnectivityConfigurationsClient creates a new instance of ConnectivityConfigurationsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewConnectivityConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConnectivityConfigurationsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -59,13 +59,14 @@ func NewConnectivityConfigurationsClient(subscriptionID string, credential azcor // CreateOrUpdate - Creates/Updates a new network manager connectivity configuration // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// configurationName - The name of the network manager connectivity configuration. -// connectivityConfiguration - Parameters supplied to create/update a network manager connectivity configuration -// options - ConnectivityConfigurationsClientCreateOrUpdateOptions contains the optional parameters for the ConnectivityConfigurationsClient.CreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager connectivity configuration. +// - connectivityConfiguration - Parameters supplied to create/update a network manager connectivity configuration +// - options - ConnectivityConfigurationsClientCreateOrUpdateOptions contains the optional parameters for the ConnectivityConfigurationsClient.CreateOrUpdate +// method. func (client *ConnectivityConfigurationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, connectivityConfiguration ConnectivityConfiguration, options *ConnectivityConfigurationsClientCreateOrUpdateOptions) (ConnectivityConfigurationsClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, connectivityConfiguration, options) if err != nil { @@ -123,12 +124,13 @@ func (client *ConnectivityConfigurationsClient) createOrUpdateHandleResponse(res // BeginDelete - Deletes a network manager connectivity configuration, specified by the resource group, network manager name, // and connectivity configuration name // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// configurationName - The name of the network manager connectivity configuration. -// options - ConnectivityConfigurationsClientBeginDeleteOptions contains the optional parameters for the ConnectivityConfigurationsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager connectivity configuration. +// - options - ConnectivityConfigurationsClientBeginDeleteOptions contains the optional parameters for the ConnectivityConfigurationsClient.BeginDelete +// method. func (client *ConnectivityConfigurationsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *ConnectivityConfigurationsClientBeginDeleteOptions) (*runtime.Poller[ConnectivityConfigurationsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, networkManagerName, configurationName, options) @@ -146,6 +148,7 @@ func (client *ConnectivityConfigurationsClient) BeginDelete(ctx context.Context, // Delete - Deletes a network manager connectivity configuration, specified by the resource group, network manager name, and // connectivity configuration name // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ConnectivityConfigurationsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *ConnectivityConfigurationsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, options) @@ -198,12 +201,13 @@ func (client *ConnectivityConfigurationsClient) deleteCreateRequest(ctx context. // Get - Gets a Network Connectivity Configuration, specified by the resource group, network manager name, and connectivity // Configuration name // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// configurationName - The name of the network manager connectivity configuration. -// options - ConnectivityConfigurationsClientGetOptions contains the optional parameters for the ConnectivityConfigurationsClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager connectivity configuration. +// - options - ConnectivityConfigurationsClientGetOptions contains the optional parameters for the ConnectivityConfigurationsClient.Get +// method. func (client *ConnectivityConfigurationsClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *ConnectivityConfigurationsClientGetOptions) (ConnectivityConfigurationsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, options) if err != nil { @@ -259,11 +263,12 @@ func (client *ConnectivityConfigurationsClient) getHandleResponse(resp *http.Res } // NewListPager - Lists all the network manager connectivity configuration in a specified network manager. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// options - ConnectivityConfigurationsClientListOptions contains the optional parameters for the ConnectivityConfigurationsClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - options - ConnectivityConfigurationsClientListOptions contains the optional parameters for the ConnectivityConfigurationsClient.NewListPager +// method. func (client *ConnectivityConfigurationsClient) NewListPager(resourceGroupName string, networkManagerName string, options *ConnectivityConfigurationsClientListOptions) *runtime.Pager[ConnectivityConfigurationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ConnectivityConfigurationsClientListResponse]{ More: func(page ConnectivityConfigurationsClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/connectivityconfigurations_client_example_test.go b/sdk/resourcemanager/network/armnetwork/connectivityconfigurations_client_example_test.go deleted file mode 100644 index 0c3035db70eb..000000000000 --- a/sdk/resourcemanager/network/armnetwork/connectivityconfigurations_client_example_test.go +++ /dev/null @@ -1,122 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerConnectivityConfigurationGet.json -func ExampleConnectivityConfigurationsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewConnectivityConfigurationsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "testNetworkManager", "myTestConnectivityConfig", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerConnectivityConfigurationPut.json -func ExampleConnectivityConfigurationsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewConnectivityConfigurationsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, "myResourceGroup", "testNetworkManager", "myTestConnectivityConfig", armnetwork.ConnectivityConfiguration{ - Properties: &armnetwork.ConnectivityConfigurationProperties{ - Description: to.Ptr("Sample Configuration"), - AppliesToGroups: []*armnetwork.ConnectivityGroupItem{ - { - GroupConnectivity: to.Ptr(armnetwork.GroupConnectivityNone), - IsGlobal: to.Ptr(armnetwork.IsGlobalFalse), - NetworkGroupID: to.Ptr("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/group1"), - UseHubGateway: to.Ptr(armnetwork.UseHubGatewayTrue), - }}, - ConnectivityTopology: to.Ptr(armnetwork.ConnectivityTopologyHubAndSpoke), - DeleteExistingPeering: to.Ptr(armnetwork.DeleteExistingPeeringTrue), - Hubs: []*armnetwork.Hub{ - { - ResourceID: to.Ptr("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myTestConnectivityConfig"), - ResourceType: to.Ptr("Microsoft.Network/virtualNetworks"), - }}, - IsGlobal: to.Ptr(armnetwork.IsGlobalTrue), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerConnectivityConfigurationDelete.json -func ExampleConnectivityConfigurationsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewConnectivityConfigurationsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "myResourceGroup", "testNetworkManager", "myTestConnectivityConfig", &armnetwork.ConnectivityConfigurationsClientBeginDeleteOptions{Force: to.Ptr(false)}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerConnectivityConfigurationList.json -func ExampleConnectivityConfigurationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewConnectivityConfigurationsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", "testNetworkManager", &armnetwork.ConnectivityConfigurationsClientListOptions{Top: nil, - SkipToken: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/constants.go b/sdk/resourcemanager/network/armnetwork/constants.go index 9335be9163a2..7694682b73a3 100644 --- a/sdk/resourcemanager/network/armnetwork/constants.go +++ b/sdk/resourcemanager/network/armnetwork/constants.go @@ -11,7 +11,7 @@ package armnetwork const ( moduleName = "armnetwork" - moduleVersion = "v2.1.0" + moduleVersion = "v2.1.1" ) // Access - Access to be allowed or denied. diff --git a/sdk/resourcemanager/network/armnetwork/customipprefixes_client.go b/sdk/resourcemanager/network/armnetwork/customipprefixes_client.go index ff4fd3ac1784..a320acf8c3e7 100644 --- a/sdk/resourcemanager/network/armnetwork/customipprefixes_client.go +++ b/sdk/resourcemanager/network/armnetwork/customipprefixes_client.go @@ -32,10 +32,10 @@ type CustomIPPrefixesClient struct { } // NewCustomIPPrefixesClient creates a new instance of CustomIPPrefixesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewCustomIPPrefixesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CustomIPPrefixesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewCustomIPPrefixesClient(subscriptionID string, credential azcore.TokenCre // BeginCreateOrUpdate - Creates or updates a custom IP prefix. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// customIPPrefixName - The name of the custom IP prefix. -// parameters - Parameters supplied to the create or update custom IP prefix operation. -// options - CustomIPPrefixesClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomIPPrefixesClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - customIPPrefixName - The name of the custom IP prefix. +// - parameters - Parameters supplied to the create or update custom IP prefix operation. +// - options - CustomIPPrefixesClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomIPPrefixesClient.BeginCreateOrUpdate +// method. func (client *CustomIPPrefixesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, customIPPrefixName string, parameters CustomIPPrefix, options *CustomIPPrefixesClientBeginCreateOrUpdateOptions) (*runtime.Poller[CustomIPPrefixesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, customIPPrefixName, parameters, options) @@ -80,6 +81,7 @@ func (client *CustomIPPrefixesClient) BeginCreateOrUpdate(ctx context.Context, r // CreateOrUpdate - Creates or updates a custom IP prefix. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *CustomIPPrefixesClient) createOrUpdate(ctx context.Context, resourceGroupName string, customIPPrefixName string, parameters CustomIPPrefix, options *CustomIPPrefixesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, customIPPrefixName, parameters, options) @@ -124,11 +126,12 @@ func (client *CustomIPPrefixesClient) createOrUpdateCreateRequest(ctx context.Co // BeginDelete - Deletes the specified custom IP prefix. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// customIPPrefixName - The name of the CustomIpPrefix. -// options - CustomIPPrefixesClientBeginDeleteOptions contains the optional parameters for the CustomIPPrefixesClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - customIPPrefixName - The name of the CustomIpPrefix. +// - options - CustomIPPrefixesClientBeginDeleteOptions contains the optional parameters for the CustomIPPrefixesClient.BeginDelete +// method. func (client *CustomIPPrefixesClient) BeginDelete(ctx context.Context, resourceGroupName string, customIPPrefixName string, options *CustomIPPrefixesClientBeginDeleteOptions) (*runtime.Poller[CustomIPPrefixesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, customIPPrefixName, options) @@ -145,6 +148,7 @@ func (client *CustomIPPrefixesClient) BeginDelete(ctx context.Context, resourceG // Delete - Deletes the specified custom IP prefix. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *CustomIPPrefixesClient) deleteOperation(ctx context.Context, resourceGroupName string, customIPPrefixName string, options *CustomIPPrefixesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, customIPPrefixName, options) @@ -189,10 +193,11 @@ func (client *CustomIPPrefixesClient) deleteCreateRequest(ctx context.Context, r // Get - Gets the specified custom IP prefix in a specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// customIPPrefixName - The name of the custom IP prefix. -// options - CustomIPPrefixesClientGetOptions contains the optional parameters for the CustomIPPrefixesClient.Get method. +// - resourceGroupName - The name of the resource group. +// - customIPPrefixName - The name of the custom IP prefix. +// - options - CustomIPPrefixesClientGetOptions contains the optional parameters for the CustomIPPrefixesClient.Get method. func (client *CustomIPPrefixesClient) Get(ctx context.Context, resourceGroupName string, customIPPrefixName string, options *CustomIPPrefixesClientGetOptions) (CustomIPPrefixesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, customIPPrefixName, options) if err != nil { @@ -247,9 +252,11 @@ func (client *CustomIPPrefixesClient) getHandleResponse(resp *http.Response) (Cu } // NewListPager - Gets all custom IP prefixes in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - CustomIPPrefixesClientListOptions contains the optional parameters for the CustomIPPrefixesClient.List method. +// - resourceGroupName - The name of the resource group. +// - options - CustomIPPrefixesClientListOptions contains the optional parameters for the CustomIPPrefixesClient.NewListPager +// method. func (client *CustomIPPrefixesClient) NewListPager(resourceGroupName string, options *CustomIPPrefixesClientListOptions) *runtime.Pager[CustomIPPrefixesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[CustomIPPrefixesClientListResponse]{ More: func(page CustomIPPrefixesClientListResponse) bool { @@ -310,9 +317,10 @@ func (client *CustomIPPrefixesClient) listHandleResponse(resp *http.Response) (C } // NewListAllPager - Gets all the custom IP prefixes in a subscription. +// // Generated from API version 2022-07-01 -// options - CustomIPPrefixesClientListAllOptions contains the optional parameters for the CustomIPPrefixesClient.ListAll -// method. +// - options - CustomIPPrefixesClientListAllOptions contains the optional parameters for the CustomIPPrefixesClient.NewListAllPager +// method. func (client *CustomIPPrefixesClient) NewListAllPager(options *CustomIPPrefixesClientListAllOptions) *runtime.Pager[CustomIPPrefixesClientListAllResponse] { return runtime.NewPager(runtime.PagingHandler[CustomIPPrefixesClientListAllResponse]{ More: func(page CustomIPPrefixesClientListAllResponse) bool { @@ -370,12 +378,13 @@ func (client *CustomIPPrefixesClient) listAllHandleResponse(resp *http.Response) // UpdateTags - Updates custom IP prefix tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// customIPPrefixName - The name of the custom IP prefix. -// parameters - Parameters supplied to update custom IP prefix tags. -// options - CustomIPPrefixesClientUpdateTagsOptions contains the optional parameters for the CustomIPPrefixesClient.UpdateTags -// method. +// - resourceGroupName - The name of the resource group. +// - customIPPrefixName - The name of the custom IP prefix. +// - parameters - Parameters supplied to update custom IP prefix tags. +// - options - CustomIPPrefixesClientUpdateTagsOptions contains the optional parameters for the CustomIPPrefixesClient.UpdateTags +// method. func (client *CustomIPPrefixesClient) UpdateTags(ctx context.Context, resourceGroupName string, customIPPrefixName string, parameters TagsObject, options *CustomIPPrefixesClientUpdateTagsOptions) (CustomIPPrefixesClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, customIPPrefixName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/customipprefixes_client_example_test.go b/sdk/resourcemanager/network/armnetwork/customipprefixes_client_example_test.go deleted file mode 100644 index 09b2b11b2931..000000000000 --- a/sdk/resourcemanager/network/armnetwork/customipprefixes_client_example_test.go +++ /dev/null @@ -1,158 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/CustomIpPrefixDelete.json -func ExampleCustomIPPrefixesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewCustomIPPrefixesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "test-customipprefix", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/CustomIpPrefixGet.json -func ExampleCustomIPPrefixesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewCustomIPPrefixesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "test-customipprefix", &armnetwork.CustomIPPrefixesClientGetOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/CustomIpPrefixCreateCustomizedValues.json -func ExampleCustomIPPrefixesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewCustomIPPrefixesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "test-customipprefix", armnetwork.CustomIPPrefix{ - Location: to.Ptr("westus"), - Properties: &armnetwork.CustomIPPrefixPropertiesFormat{ - Cidr: to.Ptr("0.0.0.0/24"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/CustomIpPrefixUpdateTags.json -func ExampleCustomIPPrefixesClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewCustomIPPrefixesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, "rg1", "test-customipprefix", armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/CustomIpPrefixListAll.json -func ExampleCustomIPPrefixesClient_NewListAllPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewCustomIPPrefixesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListAllPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/CustomIpPrefixList.json -func ExampleCustomIPPrefixesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewCustomIPPrefixesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ddoscustompolicies_client.go b/sdk/resourcemanager/network/armnetwork/ddoscustompolicies_client.go index eb11bebb7ddd..e91db2e7db3d 100644 --- a/sdk/resourcemanager/network/armnetwork/ddoscustompolicies_client.go +++ b/sdk/resourcemanager/network/armnetwork/ddoscustompolicies_client.go @@ -32,10 +32,10 @@ type DdosCustomPoliciesClient struct { } // NewDdosCustomPoliciesClient creates a new instance of DdosCustomPoliciesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewDdosCustomPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DdosCustomPoliciesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewDdosCustomPoliciesClient(subscriptionID string, credential azcore.TokenC // BeginCreateOrUpdate - Creates or updates a DDoS custom policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// ddosCustomPolicyName - The name of the DDoS custom policy. -// parameters - Parameters supplied to the create or update operation. -// options - DdosCustomPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the DdosCustomPoliciesClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - ddosCustomPolicyName - The name of the DDoS custom policy. +// - parameters - Parameters supplied to the create or update operation. +// - options - DdosCustomPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the DdosCustomPoliciesClient.BeginCreateOrUpdate +// method. func (client *DdosCustomPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters DdosCustomPolicy, options *DdosCustomPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[DdosCustomPoliciesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, ddosCustomPolicyName, parameters, options) @@ -80,6 +81,7 @@ func (client *DdosCustomPoliciesClient) BeginCreateOrUpdate(ctx context.Context, // CreateOrUpdate - Creates or updates a DDoS custom policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *DdosCustomPoliciesClient) createOrUpdate(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters DdosCustomPolicy, options *DdosCustomPoliciesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, ddosCustomPolicyName, parameters, options) @@ -124,11 +126,12 @@ func (client *DdosCustomPoliciesClient) createOrUpdateCreateRequest(ctx context. // BeginDelete - Deletes the specified DDoS custom policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// ddosCustomPolicyName - The name of the DDoS custom policy. -// options - DdosCustomPoliciesClientBeginDeleteOptions contains the optional parameters for the DdosCustomPoliciesClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - ddosCustomPolicyName - The name of the DDoS custom policy. +// - options - DdosCustomPoliciesClientBeginDeleteOptions contains the optional parameters for the DdosCustomPoliciesClient.BeginDelete +// method. func (client *DdosCustomPoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, options *DdosCustomPoliciesClientBeginDeleteOptions) (*runtime.Poller[DdosCustomPoliciesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, ddosCustomPolicyName, options) @@ -145,6 +148,7 @@ func (client *DdosCustomPoliciesClient) BeginDelete(ctx context.Context, resourc // Delete - Deletes the specified DDoS custom policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *DdosCustomPoliciesClient) deleteOperation(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, options *DdosCustomPoliciesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, ddosCustomPolicyName, options) @@ -189,10 +193,11 @@ func (client *DdosCustomPoliciesClient) deleteCreateRequest(ctx context.Context, // Get - Gets information about the specified DDoS custom policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// ddosCustomPolicyName - The name of the DDoS custom policy. -// options - DdosCustomPoliciesClientGetOptions contains the optional parameters for the DdosCustomPoliciesClient.Get method. +// - resourceGroupName - The name of the resource group. +// - ddosCustomPolicyName - The name of the DDoS custom policy. +// - options - DdosCustomPoliciesClientGetOptions contains the optional parameters for the DdosCustomPoliciesClient.Get method. func (client *DdosCustomPoliciesClient) Get(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, options *DdosCustomPoliciesClientGetOptions) (DdosCustomPoliciesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, ddosCustomPolicyName, options) if err != nil { @@ -245,12 +250,13 @@ func (client *DdosCustomPoliciesClient) getHandleResponse(resp *http.Response) ( // UpdateTags - Update a DDoS custom policy tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// ddosCustomPolicyName - The name of the DDoS custom policy. -// parameters - Parameters supplied to update DDoS custom policy resource tags. -// options - DdosCustomPoliciesClientUpdateTagsOptions contains the optional parameters for the DdosCustomPoliciesClient.UpdateTags -// method. +// - resourceGroupName - The name of the resource group. +// - ddosCustomPolicyName - The name of the DDoS custom policy. +// - parameters - Parameters supplied to update DDoS custom policy resource tags. +// - options - DdosCustomPoliciesClientUpdateTagsOptions contains the optional parameters for the DdosCustomPoliciesClient.UpdateTags +// method. func (client *DdosCustomPoliciesClient) UpdateTags(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters TagsObject, options *DdosCustomPoliciesClientUpdateTagsOptions) (DdosCustomPoliciesClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, ddosCustomPolicyName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/ddoscustompolicies_client_example_test.go b/sdk/resourcemanager/network/armnetwork/ddoscustompolicies_client_example_test.go deleted file mode 100644 index ab8117f560e3..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ddoscustompolicies_client_example_test.go +++ /dev/null @@ -1,107 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/DdosCustomPolicyDelete.json -func ExampleDdosCustomPoliciesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewDdosCustomPoliciesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "test-ddos-custom-policy", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/DdosCustomPolicyGet.json -func ExampleDdosCustomPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewDdosCustomPoliciesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "test-ddos-custom-policy", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/DdosCustomPolicyCreate.json -func ExampleDdosCustomPoliciesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewDdosCustomPoliciesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "test-ddos-custom-policy", armnetwork.DdosCustomPolicy{ - Location: to.Ptr("centraluseuap"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/DdosCustomPolicyUpdateTags.json -func ExampleDdosCustomPoliciesClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewDdosCustomPoliciesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, "rg1", "test-ddos-custom-policy", armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/ddosprotectionplans_client.go b/sdk/resourcemanager/network/armnetwork/ddosprotectionplans_client.go index fa1804addfc7..d0ec05373197 100644 --- a/sdk/resourcemanager/network/armnetwork/ddosprotectionplans_client.go +++ b/sdk/resourcemanager/network/armnetwork/ddosprotectionplans_client.go @@ -32,10 +32,10 @@ type DdosProtectionPlansClient struct { } // NewDdosProtectionPlansClient creates a new instance of DdosProtectionPlansClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewDdosProtectionPlansClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DdosProtectionPlansClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewDdosProtectionPlansClient(subscriptionID string, credential azcore.Token // BeginCreateOrUpdate - Creates or updates a DDoS protection plan. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// ddosProtectionPlanName - The name of the DDoS protection plan. -// parameters - Parameters supplied to the create or update operation. -// options - DdosProtectionPlansClientBeginCreateOrUpdateOptions contains the optional parameters for the DdosProtectionPlansClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - ddosProtectionPlanName - The name of the DDoS protection plan. +// - parameters - Parameters supplied to the create or update operation. +// - options - DdosProtectionPlansClientBeginCreateOrUpdateOptions contains the optional parameters for the DdosProtectionPlansClient.BeginCreateOrUpdate +// method. func (client *DdosProtectionPlansClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters DdosProtectionPlan, options *DdosProtectionPlansClientBeginCreateOrUpdateOptions) (*runtime.Poller[DdosProtectionPlansClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, ddosProtectionPlanName, parameters, options) @@ -80,6 +81,7 @@ func (client *DdosProtectionPlansClient) BeginCreateOrUpdate(ctx context.Context // CreateOrUpdate - Creates or updates a DDoS protection plan. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *DdosProtectionPlansClient) createOrUpdate(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters DdosProtectionPlan, options *DdosProtectionPlansClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, ddosProtectionPlanName, parameters, options) @@ -124,11 +126,12 @@ func (client *DdosProtectionPlansClient) createOrUpdateCreateRequest(ctx context // BeginDelete - Deletes the specified DDoS protection plan. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// ddosProtectionPlanName - The name of the DDoS protection plan. -// options - DdosProtectionPlansClientBeginDeleteOptions contains the optional parameters for the DdosProtectionPlansClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - ddosProtectionPlanName - The name of the DDoS protection plan. +// - options - DdosProtectionPlansClientBeginDeleteOptions contains the optional parameters for the DdosProtectionPlansClient.BeginDelete +// method. func (client *DdosProtectionPlansClient) BeginDelete(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, options *DdosProtectionPlansClientBeginDeleteOptions) (*runtime.Poller[DdosProtectionPlansClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, ddosProtectionPlanName, options) @@ -145,6 +148,7 @@ func (client *DdosProtectionPlansClient) BeginDelete(ctx context.Context, resour // Delete - Deletes the specified DDoS protection plan. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *DdosProtectionPlansClient) deleteOperation(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, options *DdosProtectionPlansClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, ddosProtectionPlanName, options) @@ -189,10 +193,11 @@ func (client *DdosProtectionPlansClient) deleteCreateRequest(ctx context.Context // Get - Gets information about the specified DDoS protection plan. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// ddosProtectionPlanName - The name of the DDoS protection plan. -// options - DdosProtectionPlansClientGetOptions contains the optional parameters for the DdosProtectionPlansClient.Get method. +// - resourceGroupName - The name of the resource group. +// - ddosProtectionPlanName - The name of the DDoS protection plan. +// - options - DdosProtectionPlansClientGetOptions contains the optional parameters for the DdosProtectionPlansClient.Get method. func (client *DdosProtectionPlansClient) Get(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, options *DdosProtectionPlansClientGetOptions) (DdosProtectionPlansClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, ddosProtectionPlanName, options) if err != nil { @@ -244,9 +249,10 @@ func (client *DdosProtectionPlansClient) getHandleResponse(resp *http.Response) } // NewListPager - Gets all DDoS protection plans in a subscription. +// // Generated from API version 2022-07-01 -// options - DdosProtectionPlansClientListOptions contains the optional parameters for the DdosProtectionPlansClient.List -// method. +// - options - DdosProtectionPlansClientListOptions contains the optional parameters for the DdosProtectionPlansClient.NewListPager +// method. func (client *DdosProtectionPlansClient) NewListPager(options *DdosProtectionPlansClientListOptions) *runtime.Pager[DdosProtectionPlansClientListResponse] { return runtime.NewPager(runtime.PagingHandler[DdosProtectionPlansClientListResponse]{ More: func(page DdosProtectionPlansClientListResponse) bool { @@ -303,10 +309,11 @@ func (client *DdosProtectionPlansClient) listHandleResponse(resp *http.Response) } // NewListByResourceGroupPager - Gets all the DDoS protection plans in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - DdosProtectionPlansClientListByResourceGroupOptions contains the optional parameters for the DdosProtectionPlansClient.ListByResourceGroup -// method. +// - resourceGroupName - The name of the resource group. +// - options - DdosProtectionPlansClientListByResourceGroupOptions contains the optional parameters for the DdosProtectionPlansClient.NewListByResourceGroupPager +// method. func (client *DdosProtectionPlansClient) NewListByResourceGroupPager(resourceGroupName string, options *DdosProtectionPlansClientListByResourceGroupOptions) *runtime.Pager[DdosProtectionPlansClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[DdosProtectionPlansClientListByResourceGroupResponse]{ More: func(page DdosProtectionPlansClientListByResourceGroupResponse) bool { @@ -368,12 +375,13 @@ func (client *DdosProtectionPlansClient) listByResourceGroupHandleResponse(resp // UpdateTags - Update a DDoS protection plan tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// ddosProtectionPlanName - The name of the DDoS protection plan. -// parameters - Parameters supplied to the update DDoS protection plan resource tags. -// options - DdosProtectionPlansClientUpdateTagsOptions contains the optional parameters for the DdosProtectionPlansClient.UpdateTags -// method. +// - resourceGroupName - The name of the resource group. +// - ddosProtectionPlanName - The name of the DDoS protection plan. +// - parameters - Parameters supplied to the update DDoS protection plan resource tags. +// - options - DdosProtectionPlansClientUpdateTagsOptions contains the optional parameters for the DdosProtectionPlansClient.UpdateTags +// method. func (client *DdosProtectionPlansClient) UpdateTags(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters TagsObject, options *DdosProtectionPlansClientUpdateTagsOptions) (DdosProtectionPlansClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, ddosProtectionPlanName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/ddosprotectionplans_client_example_test.go b/sdk/resourcemanager/network/armnetwork/ddosprotectionplans_client_example_test.go deleted file mode 100644 index 0f537f53d85f..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ddosprotectionplans_client_example_test.go +++ /dev/null @@ -1,156 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/DdosProtectionPlanDelete.json -func ExampleDdosProtectionPlansClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewDdosProtectionPlansClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "test-plan", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/DdosProtectionPlanGet.json -func ExampleDdosProtectionPlansClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewDdosProtectionPlansClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "test-plan", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/DdosProtectionPlanCreate.json -func ExampleDdosProtectionPlansClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewDdosProtectionPlansClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "test-plan", armnetwork.DdosProtectionPlan{ - Location: to.Ptr("westus"), - Properties: &armnetwork.DdosProtectionPlanPropertiesFormat{}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/DdosProtectionPlanUpdateTags.json -func ExampleDdosProtectionPlansClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewDdosProtectionPlansClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, "rg1", "test-plan", armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/DdosProtectionPlanListAll.json -func ExampleDdosProtectionPlansClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewDdosProtectionPlansClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/DdosProtectionPlanList.json -func ExampleDdosProtectionPlansClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewDdosProtectionPlansClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/defaultsecurityrules_client.go b/sdk/resourcemanager/network/armnetwork/defaultsecurityrules_client.go index ba6e5c7f0cfb..ccf356aa4b2e 100644 --- a/sdk/resourcemanager/network/armnetwork/defaultsecurityrules_client.go +++ b/sdk/resourcemanager/network/armnetwork/defaultsecurityrules_client.go @@ -32,10 +32,10 @@ type DefaultSecurityRulesClient struct { } // NewDefaultSecurityRulesClient creates a new instance of DefaultSecurityRulesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewDefaultSecurityRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DefaultSecurityRulesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewDefaultSecurityRulesClient(subscriptionID string, credential azcore.Toke // Get - Get the specified default network security rule. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkSecurityGroupName - The name of the network security group. -// defaultSecurityRuleName - The name of the default security rule. -// options - DefaultSecurityRulesClientGetOptions contains the optional parameters for the DefaultSecurityRulesClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - networkSecurityGroupName - The name of the network security group. +// - defaultSecurityRuleName - The name of the default security rule. +// - options - DefaultSecurityRulesClientGetOptions contains the optional parameters for the DefaultSecurityRulesClient.Get +// method. func (client *DefaultSecurityRulesClient) Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, defaultSecurityRuleName string, options *DefaultSecurityRulesClientGetOptions) (DefaultSecurityRulesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, defaultSecurityRuleName, options) if err != nil { @@ -119,11 +120,12 @@ func (client *DefaultSecurityRulesClient) getHandleResponse(resp *http.Response) } // NewListPager - Gets all default security rules in a network security group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkSecurityGroupName - The name of the network security group. -// options - DefaultSecurityRulesClientListOptions contains the optional parameters for the DefaultSecurityRulesClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - networkSecurityGroupName - The name of the network security group. +// - options - DefaultSecurityRulesClientListOptions contains the optional parameters for the DefaultSecurityRulesClient.NewListPager +// method. func (client *DefaultSecurityRulesClient) NewListPager(resourceGroupName string, networkSecurityGroupName string, options *DefaultSecurityRulesClientListOptions) *runtime.Pager[DefaultSecurityRulesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[DefaultSecurityRulesClientListResponse]{ More: func(page DefaultSecurityRulesClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/defaultsecurityrules_client_example_test.go b/sdk/resourcemanager/network/armnetwork/defaultsecurityrules_client_example_test.go deleted file mode 100644 index 29497b331fea..000000000000 --- a/sdk/resourcemanager/network/armnetwork/defaultsecurityrules_client_example_test.go +++ /dev/null @@ -1,60 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/DefaultSecurityRuleList.json -func ExampleDefaultSecurityRulesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewDefaultSecurityRulesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("testrg", "nsg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/DefaultSecurityRuleGet.json -func ExampleDefaultSecurityRulesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewDefaultSecurityRulesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "testrg", "nsg1", "AllowVnetInBound", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/dscpconfiguration_client.go b/sdk/resourcemanager/network/armnetwork/dscpconfiguration_client.go index 731b83018fae..98547947d186 100644 --- a/sdk/resourcemanager/network/armnetwork/dscpconfiguration_client.go +++ b/sdk/resourcemanager/network/armnetwork/dscpconfiguration_client.go @@ -32,10 +32,10 @@ type DscpConfigurationClient struct { } // NewDscpConfigurationClient creates a new instance of DscpConfigurationClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewDscpConfigurationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DscpConfigurationClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewDscpConfigurationClient(subscriptionID string, credential azcore.TokenCr // BeginCreateOrUpdate - Creates or updates a DSCP Configuration. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// dscpConfigurationName - The name of the resource. -// parameters - Parameters supplied to the create or update dscp configuration operation. -// options - DscpConfigurationClientBeginCreateOrUpdateOptions contains the optional parameters for the DscpConfigurationClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - dscpConfigurationName - The name of the resource. +// - parameters - Parameters supplied to the create or update dscp configuration operation. +// - options - DscpConfigurationClientBeginCreateOrUpdateOptions contains the optional parameters for the DscpConfigurationClient.BeginCreateOrUpdate +// method. func (client *DscpConfigurationClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, dscpConfigurationName string, parameters DscpConfiguration, options *DscpConfigurationClientBeginCreateOrUpdateOptions) (*runtime.Poller[DscpConfigurationClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, dscpConfigurationName, parameters, options) @@ -80,6 +81,7 @@ func (client *DscpConfigurationClient) BeginCreateOrUpdate(ctx context.Context, // CreateOrUpdate - Creates or updates a DSCP Configuration. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *DscpConfigurationClient) createOrUpdate(ctx context.Context, resourceGroupName string, dscpConfigurationName string, parameters DscpConfiguration, options *DscpConfigurationClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, dscpConfigurationName, parameters, options) @@ -124,11 +126,12 @@ func (client *DscpConfigurationClient) createOrUpdateCreateRequest(ctx context.C // BeginDelete - Deletes a DSCP Configuration. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// dscpConfigurationName - The name of the resource. -// options - DscpConfigurationClientBeginDeleteOptions contains the optional parameters for the DscpConfigurationClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - dscpConfigurationName - The name of the resource. +// - options - DscpConfigurationClientBeginDeleteOptions contains the optional parameters for the DscpConfigurationClient.BeginDelete +// method. func (client *DscpConfigurationClient) BeginDelete(ctx context.Context, resourceGroupName string, dscpConfigurationName string, options *DscpConfigurationClientBeginDeleteOptions) (*runtime.Poller[DscpConfigurationClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, dscpConfigurationName, options) @@ -145,6 +148,7 @@ func (client *DscpConfigurationClient) BeginDelete(ctx context.Context, resource // Delete - Deletes a DSCP Configuration. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *DscpConfigurationClient) deleteOperation(ctx context.Context, resourceGroupName string, dscpConfigurationName string, options *DscpConfigurationClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, dscpConfigurationName, options) @@ -189,10 +193,11 @@ func (client *DscpConfigurationClient) deleteCreateRequest(ctx context.Context, // Get - Gets a DSCP Configuration. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// dscpConfigurationName - The name of the resource. -// options - DscpConfigurationClientGetOptions contains the optional parameters for the DscpConfigurationClient.Get method. +// - resourceGroupName - The name of the resource group. +// - dscpConfigurationName - The name of the resource. +// - options - DscpConfigurationClientGetOptions contains the optional parameters for the DscpConfigurationClient.Get method. func (client *DscpConfigurationClient) Get(ctx context.Context, resourceGroupName string, dscpConfigurationName string, options *DscpConfigurationClientGetOptions) (DscpConfigurationClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, dscpConfigurationName, options) if err != nil { @@ -244,9 +249,11 @@ func (client *DscpConfigurationClient) getHandleResponse(resp *http.Response) (D } // NewListPager - Gets a DSCP Configuration. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - DscpConfigurationClientListOptions contains the optional parameters for the DscpConfigurationClient.List method. +// - resourceGroupName - The name of the resource group. +// - options - DscpConfigurationClientListOptions contains the optional parameters for the DscpConfigurationClient.NewListPager +// method. func (client *DscpConfigurationClient) NewListPager(resourceGroupName string, options *DscpConfigurationClientListOptions) *runtime.Pager[DscpConfigurationClientListResponse] { return runtime.NewPager(runtime.PagingHandler[DscpConfigurationClientListResponse]{ More: func(page DscpConfigurationClientListResponse) bool { @@ -307,9 +314,10 @@ func (client *DscpConfigurationClient) listHandleResponse(resp *http.Response) ( } // NewListAllPager - Gets all dscp configurations in a subscription. +// // Generated from API version 2022-07-01 -// options - DscpConfigurationClientListAllOptions contains the optional parameters for the DscpConfigurationClient.ListAll -// method. +// - options - DscpConfigurationClientListAllOptions contains the optional parameters for the DscpConfigurationClient.NewListAllPager +// method. func (client *DscpConfigurationClient) NewListAllPager(options *DscpConfigurationClientListAllOptions) *runtime.Pager[DscpConfigurationClientListAllResponse] { return runtime.NewPager(runtime.PagingHandler[DscpConfigurationClientListAllResponse]{ More: func(page DscpConfigurationClientListAllResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/dscpconfiguration_client_example_test.go b/sdk/resourcemanager/network/armnetwork/dscpconfiguration_client_example_test.go deleted file mode 100644 index 021a7aac31f1..000000000000 --- a/sdk/resourcemanager/network/armnetwork/dscpconfiguration_client_example_test.go +++ /dev/null @@ -1,188 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/DscpConfigurationCreate.json -func ExampleDscpConfigurationClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewDscpConfigurationClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "mydscpconfig", armnetwork.DscpConfiguration{ - Location: to.Ptr("eastus"), - Properties: &armnetwork.DscpConfigurationPropertiesFormat{ - QosDefinitionCollection: []*armnetwork.QosDefinition{ - { - DestinationIPRanges: []*armnetwork.QosIPRange{ - { - EndIP: to.Ptr("127.0.10.2"), - StartIP: to.Ptr("127.0.10.1"), - }}, - DestinationPortRanges: []*armnetwork.QosPortRange{ - { - End: to.Ptr[int32](15), - Start: to.Ptr[int32](15), - }}, - Markings: []*int32{ - to.Ptr[int32](1)}, - SourceIPRanges: []*armnetwork.QosIPRange{ - { - EndIP: to.Ptr("127.0.0.2"), - StartIP: to.Ptr("127.0.0.1"), - }}, - SourcePortRanges: []*armnetwork.QosPortRange{ - { - End: to.Ptr[int32](11), - Start: to.Ptr[int32](10), - }, - { - End: to.Ptr[int32](21), - Start: to.Ptr[int32](20), - }}, - Protocol: to.Ptr(armnetwork.ProtocolTypeTCP), - }, - { - DestinationIPRanges: []*armnetwork.QosIPRange{ - { - EndIP: to.Ptr("12.0.10.2"), - StartIP: to.Ptr("12.0.10.1"), - }}, - DestinationPortRanges: []*armnetwork.QosPortRange{ - { - End: to.Ptr[int32](52), - Start: to.Ptr[int32](51), - }}, - Markings: []*int32{ - to.Ptr[int32](2)}, - SourceIPRanges: []*armnetwork.QosIPRange{ - { - EndIP: to.Ptr("12.0.0.2"), - StartIP: to.Ptr("12.0.0.1"), - }}, - SourcePortRanges: []*armnetwork.QosPortRange{ - { - End: to.Ptr[int32](12), - Start: to.Ptr[int32](11), - }}, - Protocol: to.Ptr(armnetwork.ProtocolTypeUDP), - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/DscpConfigurationDelete.json -func ExampleDscpConfigurationClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewDscpConfigurationClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "mydscpConfig", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/DscpConfigurationGet.json -func ExampleDscpConfigurationClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewDscpConfigurationClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "mydscpConfig", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/DscpConfigurationList.json -func ExampleDscpConfigurationClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewDscpConfigurationClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/DscpConfigurationListAll.json -func ExampleDscpConfigurationClient_NewListAllPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewDscpConfigurationClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListAllPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/expressroutecircuitauthorizations_client.go b/sdk/resourcemanager/network/armnetwork/expressroutecircuitauthorizations_client.go index d8dc01c2f3bd..5c1ea19e2f22 100644 --- a/sdk/resourcemanager/network/armnetwork/expressroutecircuitauthorizations_client.go +++ b/sdk/resourcemanager/network/armnetwork/expressroutecircuitauthorizations_client.go @@ -32,10 +32,10 @@ type ExpressRouteCircuitAuthorizationsClient struct { } // NewExpressRouteCircuitAuthorizationsClient creates a new instance of ExpressRouteCircuitAuthorizationsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteCircuitAuthorizationsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string, credentia // BeginCreateOrUpdate - Creates or updates an authorization in the specified express route circuit. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// authorizationName - The name of the authorization. -// authorizationParameters - Parameters supplied to the create or update express route circuit authorization operation. -// options - ExpressRouteCircuitAuthorizationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - authorizationName - The name of the authorization. +// - authorizationParameters - Parameters supplied to the create or update express route circuit authorization operation. +// - options - ExpressRouteCircuitAuthorizationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.BeginCreateOrUpdate +// method. func (client *ExpressRouteCircuitAuthorizationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, authorizationParameters ExpressRouteCircuitAuthorization, options *ExpressRouteCircuitAuthorizationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, circuitName, authorizationName, authorizationParameters, options) @@ -81,6 +82,7 @@ func (client *ExpressRouteCircuitAuthorizationsClient) BeginCreateOrUpdate(ctx c // CreateOrUpdate - Creates or updates an authorization in the specified express route circuit. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ExpressRouteCircuitAuthorizationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, authorizationParameters ExpressRouteCircuitAuthorization, options *ExpressRouteCircuitAuthorizationsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, circuitName, authorizationName, authorizationParameters, options) @@ -129,12 +131,13 @@ func (client *ExpressRouteCircuitAuthorizationsClient) createOrUpdateCreateReque // BeginDelete - Deletes the specified authorization from the specified express route circuit. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// authorizationName - The name of the authorization. -// options - ExpressRouteCircuitAuthorizationsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - authorizationName - The name of the authorization. +// - options - ExpressRouteCircuitAuthorizationsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.BeginDelete +// method. func (client *ExpressRouteCircuitAuthorizationsClient) BeginDelete(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, options *ExpressRouteCircuitAuthorizationsClientBeginDeleteOptions) (*runtime.Poller[ExpressRouteCircuitAuthorizationsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, circuitName, authorizationName, options) @@ -151,6 +154,7 @@ func (client *ExpressRouteCircuitAuthorizationsClient) BeginDelete(ctx context.C // Delete - Deletes the specified authorization from the specified express route circuit. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ExpressRouteCircuitAuthorizationsClient) deleteOperation(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, options *ExpressRouteCircuitAuthorizationsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, circuitName, authorizationName, options) @@ -199,12 +203,13 @@ func (client *ExpressRouteCircuitAuthorizationsClient) deleteCreateRequest(ctx c // Get - Gets the specified authorization from the specified express route circuit. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// authorizationName - The name of the authorization. -// options - ExpressRouteCircuitAuthorizationsClientGetOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - authorizationName - The name of the authorization. +// - options - ExpressRouteCircuitAuthorizationsClientGetOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.Get +// method. func (client *ExpressRouteCircuitAuthorizationsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, options *ExpressRouteCircuitAuthorizationsClientGetOptions) (ExpressRouteCircuitAuthorizationsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, circuitName, authorizationName, options) if err != nil { @@ -260,11 +265,12 @@ func (client *ExpressRouteCircuitAuthorizationsClient) getHandleResponse(resp *h } // NewListPager - Gets all authorizations in an express route circuit. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the circuit. -// options - ExpressRouteCircuitAuthorizationsClientListOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the circuit. +// - options - ExpressRouteCircuitAuthorizationsClientListOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.NewListPager +// method. func (client *ExpressRouteCircuitAuthorizationsClient) NewListPager(resourceGroupName string, circuitName string, options *ExpressRouteCircuitAuthorizationsClientListOptions) *runtime.Pager[ExpressRouteCircuitAuthorizationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ExpressRouteCircuitAuthorizationsClientListResponse]{ More: func(page ExpressRouteCircuitAuthorizationsClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/expressroutecircuitauthorizations_client_example_test.go b/sdk/resourcemanager/network/armnetwork/expressroutecircuitauthorizations_client_example_test.go deleted file mode 100644 index e6e854dc28cb..000000000000 --- a/sdk/resourcemanager/network/armnetwork/expressroutecircuitauthorizations_client_example_test.go +++ /dev/null @@ -1,106 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCircuitAuthorizationDelete.json -func ExampleExpressRouteCircuitAuthorizationsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCircuitAuthorizationsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "circuitName", "authorizationName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCircuitAuthorizationGet.json -func ExampleExpressRouteCircuitAuthorizationsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCircuitAuthorizationsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "circuitName", "authorizationName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCircuitAuthorizationCreate.json -func ExampleExpressRouteCircuitAuthorizationsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCircuitAuthorizationsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "circuitName", "authorizatinName", armnetwork.ExpressRouteCircuitAuthorization{ - Properties: &armnetwork.AuthorizationPropertiesFormat{}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCircuitAuthorizationList.json -func ExampleExpressRouteCircuitAuthorizationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCircuitAuthorizationsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", "circuitName", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/expressroutecircuitconnections_client.go b/sdk/resourcemanager/network/armnetwork/expressroutecircuitconnections_client.go index f5c92743d127..ced33c5e969f 100644 --- a/sdk/resourcemanager/network/armnetwork/expressroutecircuitconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/expressroutecircuitconnections_client.go @@ -32,10 +32,10 @@ type ExpressRouteCircuitConnectionsClient struct { } // NewExpressRouteCircuitConnectionsClient creates a new instance of ExpressRouteCircuitConnectionsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewExpressRouteCircuitConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteCircuitConnectionsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,15 +58,16 @@ func NewExpressRouteCircuitConnectionsClient(subscriptionID string, credential a // BeginCreateOrUpdate - Creates or updates a Express Route Circuit Connection in the specified express route circuits. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// peeringName - The name of the peering. -// connectionName - The name of the express route circuit connection. -// expressRouteCircuitConnectionParameters - Parameters supplied to the create or update express route circuit connection -// operation. -// options - ExpressRouteCircuitConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - peeringName - The name of the peering. +// - connectionName - The name of the express route circuit connection. +// - expressRouteCircuitConnectionParameters - Parameters supplied to the create or update express route circuit connection +// operation. +// - options - ExpressRouteCircuitConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.BeginCreateOrUpdate +// method. func (client *ExpressRouteCircuitConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, expressRouteCircuitConnectionParameters ExpressRouteCircuitConnection, options *ExpressRouteCircuitConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters, options) @@ -83,6 +84,7 @@ func (client *ExpressRouteCircuitConnectionsClient) BeginCreateOrUpdate(ctx cont // CreateOrUpdate - Creates or updates a Express Route Circuit Connection in the specified express route circuits. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ExpressRouteCircuitConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, expressRouteCircuitConnectionParameters ExpressRouteCircuitConnection, options *ExpressRouteCircuitConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters, options) @@ -135,13 +137,14 @@ func (client *ExpressRouteCircuitConnectionsClient) createOrUpdateCreateRequest( // BeginDelete - Deletes the specified Express Route Circuit Connection from the specified express route circuit. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// peeringName - The name of the peering. -// connectionName - The name of the express route circuit connection. -// options - ExpressRouteCircuitConnectionsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - peeringName - The name of the peering. +// - connectionName - The name of the express route circuit connection. +// - options - ExpressRouteCircuitConnectionsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.BeginDelete +// method. func (client *ExpressRouteCircuitConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, options *ExpressRouteCircuitConnectionsClientBeginDeleteOptions) (*runtime.Poller[ExpressRouteCircuitConnectionsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, circuitName, peeringName, connectionName, options) @@ -158,6 +161,7 @@ func (client *ExpressRouteCircuitConnectionsClient) BeginDelete(ctx context.Cont // Delete - Deletes the specified Express Route Circuit Connection from the specified express route circuit. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ExpressRouteCircuitConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, options *ExpressRouteCircuitConnectionsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, circuitName, peeringName, connectionName, options) @@ -210,13 +214,14 @@ func (client *ExpressRouteCircuitConnectionsClient) deleteCreateRequest(ctx cont // Get - Gets the specified Express Route Circuit Connection from the specified express route circuit. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// peeringName - The name of the peering. -// connectionName - The name of the express route circuit connection. -// options - ExpressRouteCircuitConnectionsClientGetOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - peeringName - The name of the peering. +// - connectionName - The name of the express route circuit connection. +// - options - ExpressRouteCircuitConnectionsClientGetOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.Get +// method. func (client *ExpressRouteCircuitConnectionsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, options *ExpressRouteCircuitConnectionsClientGetOptions) (ExpressRouteCircuitConnectionsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, circuitName, peeringName, connectionName, options) if err != nil { @@ -276,12 +281,13 @@ func (client *ExpressRouteCircuitConnectionsClient) getHandleResponse(resp *http } // NewListPager - Gets all global reach connections associated with a private peering in an express route circuit. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the circuit. -// peeringName - The name of the peering. -// options - ExpressRouteCircuitConnectionsClientListOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the circuit. +// - peeringName - The name of the peering. +// - options - ExpressRouteCircuitConnectionsClientListOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.NewListPager +// method. func (client *ExpressRouteCircuitConnectionsClient) NewListPager(resourceGroupName string, circuitName string, peeringName string, options *ExpressRouteCircuitConnectionsClientListOptions) *runtime.Pager[ExpressRouteCircuitConnectionsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ExpressRouteCircuitConnectionsClientListResponse]{ More: func(page ExpressRouteCircuitConnectionsClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/expressroutecircuitconnections_client_example_test.go b/sdk/resourcemanager/network/armnetwork/expressroutecircuitconnections_client_example_test.go deleted file mode 100644 index 4d2be976754e..000000000000 --- a/sdk/resourcemanager/network/armnetwork/expressroutecircuitconnections_client_example_test.go +++ /dev/null @@ -1,119 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCircuitConnectionDelete.json -func ExampleExpressRouteCircuitConnectionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCircuitConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "ExpressRouteARMCircuitA", "AzurePrivatePeering", "circuitConnectionUSAUS", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCircuitConnectionGet.json -func ExampleExpressRouteCircuitConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCircuitConnectionsClient("subid1", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "ExpressRouteARMCircuitA", "AzurePrivatePeering", "circuitConnectionUSAUS", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCircuitConnectionCreate.json -func ExampleExpressRouteCircuitConnectionsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCircuitConnectionsClient("subid1", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "ExpressRouteARMCircuitA", "AzurePrivatePeering", "circuitConnectionUSAUS", armnetwork.ExpressRouteCircuitConnection{ - Properties: &armnetwork.ExpressRouteCircuitConnectionPropertiesFormat{ - AddressPrefix: to.Ptr("10.0.0.0/29"), - AuthorizationKey: to.Ptr("946a1918-b7a2-4917-b43c-8c4cdaee006a"), - ExpressRouteCircuitPeering: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid1/resourceGroups/dedharcktinit/providers/Microsoft.Network/expressRouteCircuits/dedharcktlocal/peerings/AzurePrivatePeering"), - }, - IPv6CircuitConnectionConfig: &armnetwork.IPv6CircuitConnectionConfig{ - AddressPrefix: to.Ptr("aa:bb::/125"), - }, - PeerExpressRouteCircuitPeering: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid2/resourceGroups/dedharcktpeer/providers/Microsoft.Network/expressRouteCircuits/dedharcktremote/peerings/AzurePrivatePeering"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCircuitConnectionList.json -func ExampleExpressRouteCircuitConnectionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCircuitConnectionsClient("subid1", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", "ExpressRouteARMCircuitA", "AzurePrivatePeering", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/expressroutecircuitpeerings_client.go b/sdk/resourcemanager/network/armnetwork/expressroutecircuitpeerings_client.go index 6668c521e653..5f4d1c640048 100644 --- a/sdk/resourcemanager/network/armnetwork/expressroutecircuitpeerings_client.go +++ b/sdk/resourcemanager/network/armnetwork/expressroutecircuitpeerings_client.go @@ -32,10 +32,10 @@ type ExpressRouteCircuitPeeringsClient struct { } // NewExpressRouteCircuitPeeringsClient creates a new instance of ExpressRouteCircuitPeeringsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewExpressRouteCircuitPeeringsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteCircuitPeeringsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string, credential azco // BeginCreateOrUpdate - Creates or updates a peering in the specified express route circuits. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// peeringName - The name of the peering. -// peeringParameters - Parameters supplied to the create or update express route circuit peering operation. -// options - ExpressRouteCircuitPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - peeringName - The name of the peering. +// - peeringParameters - Parameters supplied to the create or update express route circuit peering operation. +// - options - ExpressRouteCircuitPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.BeginCreateOrUpdate +// method. func (client *ExpressRouteCircuitPeeringsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, peeringParameters ExpressRouteCircuitPeering, options *ExpressRouteCircuitPeeringsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, circuitName, peeringName, peeringParameters, options) @@ -81,6 +82,7 @@ func (client *ExpressRouteCircuitPeeringsClient) BeginCreateOrUpdate(ctx context // CreateOrUpdate - Creates or updates a peering in the specified express route circuits. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ExpressRouteCircuitPeeringsClient) createOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, peeringParameters ExpressRouteCircuitPeering, options *ExpressRouteCircuitPeeringsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, circuitName, peeringName, peeringParameters, options) @@ -129,12 +131,13 @@ func (client *ExpressRouteCircuitPeeringsClient) createOrUpdateCreateRequest(ctx // BeginDelete - Deletes the specified peering from the specified express route circuit. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// peeringName - The name of the peering. -// options - ExpressRouteCircuitPeeringsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - peeringName - The name of the peering. +// - options - ExpressRouteCircuitPeeringsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.BeginDelete +// method. func (client *ExpressRouteCircuitPeeringsClient) BeginDelete(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, options *ExpressRouteCircuitPeeringsClientBeginDeleteOptions) (*runtime.Poller[ExpressRouteCircuitPeeringsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, circuitName, peeringName, options) @@ -151,6 +154,7 @@ func (client *ExpressRouteCircuitPeeringsClient) BeginDelete(ctx context.Context // Delete - Deletes the specified peering from the specified express route circuit. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ExpressRouteCircuitPeeringsClient) deleteOperation(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, options *ExpressRouteCircuitPeeringsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, circuitName, peeringName, options) @@ -199,12 +203,13 @@ func (client *ExpressRouteCircuitPeeringsClient) deleteCreateRequest(ctx context // Get - Gets the specified peering for the express route circuit. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// peeringName - The name of the peering. -// options - ExpressRouteCircuitPeeringsClientGetOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - peeringName - The name of the peering. +// - options - ExpressRouteCircuitPeeringsClientGetOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.Get +// method. func (client *ExpressRouteCircuitPeeringsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, options *ExpressRouteCircuitPeeringsClientGetOptions) (ExpressRouteCircuitPeeringsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, circuitName, peeringName, options) if err != nil { @@ -260,11 +265,12 @@ func (client *ExpressRouteCircuitPeeringsClient) getHandleResponse(resp *http.Re } // NewListPager - Gets all peerings in a specified express route circuit. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// options - ExpressRouteCircuitPeeringsClientListOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - options - ExpressRouteCircuitPeeringsClientListOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.NewListPager +// method. func (client *ExpressRouteCircuitPeeringsClient) NewListPager(resourceGroupName string, circuitName string, options *ExpressRouteCircuitPeeringsClientListOptions) *runtime.Pager[ExpressRouteCircuitPeeringsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ExpressRouteCircuitPeeringsClientListResponse]{ More: func(page ExpressRouteCircuitPeeringsClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/expressroutecircuitpeerings_client_example_test.go b/sdk/resourcemanager/network/armnetwork/expressroutecircuitpeerings_client_example_test.go deleted file mode 100644 index 67efc4c13228..000000000000 --- a/sdk/resourcemanager/network/armnetwork/expressroutecircuitpeerings_client_example_test.go +++ /dev/null @@ -1,112 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCircuitPeeringDelete.json -func ExampleExpressRouteCircuitPeeringsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCircuitPeeringsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "circuitName", "peeringName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCircuitPeeringGet.json -func ExampleExpressRouteCircuitPeeringsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCircuitPeeringsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "circuitName", "MicrosoftPeering", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCircuitPeeringCreate.json -func ExampleExpressRouteCircuitPeeringsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCircuitPeeringsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "circuitName", "AzurePrivatePeering", armnetwork.ExpressRouteCircuitPeering{ - Properties: &armnetwork.ExpressRouteCircuitPeeringPropertiesFormat{ - PeerASN: to.Ptr[int64](200), - PrimaryPeerAddressPrefix: to.Ptr("192.168.16.252/30"), - SecondaryPeerAddressPrefix: to.Ptr("192.168.18.252/30"), - VlanID: to.Ptr[int32](200), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCircuitPeeringList.json -func ExampleExpressRouteCircuitPeeringsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCircuitPeeringsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", "circuitName", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/expressroutecircuits_client.go b/sdk/resourcemanager/network/armnetwork/expressroutecircuits_client.go index 1e5c5380591d..ec2d0a33320e 100644 --- a/sdk/resourcemanager/network/armnetwork/expressroutecircuits_client.go +++ b/sdk/resourcemanager/network/armnetwork/expressroutecircuits_client.go @@ -32,10 +32,10 @@ type ExpressRouteCircuitsClient struct { } // NewExpressRouteCircuitsClient creates a new instance of ExpressRouteCircuitsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewExpressRouteCircuitsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteCircuitsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewExpressRouteCircuitsClient(subscriptionID string, credential azcore.Toke // BeginCreateOrUpdate - Creates or updates an express route circuit. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the circuit. -// parameters - Parameters supplied to the create or update express route circuit operation. -// options - ExpressRouteCircuitsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the circuit. +// - parameters - Parameters supplied to the create or update express route circuit operation. +// - options - ExpressRouteCircuitsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginCreateOrUpdate +// method. func (client *ExpressRouteCircuitsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, parameters ExpressRouteCircuit, options *ExpressRouteCircuitsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExpressRouteCircuitsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, circuitName, parameters, options) @@ -80,6 +81,7 @@ func (client *ExpressRouteCircuitsClient) BeginCreateOrUpdate(ctx context.Contex // CreateOrUpdate - Creates or updates an express route circuit. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ExpressRouteCircuitsClient) createOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, parameters ExpressRouteCircuit, options *ExpressRouteCircuitsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, circuitName, parameters, options) @@ -124,11 +126,12 @@ func (client *ExpressRouteCircuitsClient) createOrUpdateCreateRequest(ctx contex // BeginDelete - Deletes the specified express route circuit. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// options - ExpressRouteCircuitsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - options - ExpressRouteCircuitsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginDelete +// method. func (client *ExpressRouteCircuitsClient) BeginDelete(ctx context.Context, resourceGroupName string, circuitName string, options *ExpressRouteCircuitsClientBeginDeleteOptions) (*runtime.Poller[ExpressRouteCircuitsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, circuitName, options) @@ -145,6 +148,7 @@ func (client *ExpressRouteCircuitsClient) BeginDelete(ctx context.Context, resou // Delete - Deletes the specified express route circuit. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ExpressRouteCircuitsClient) deleteOperation(ctx context.Context, resourceGroupName string, circuitName string, options *ExpressRouteCircuitsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, circuitName, options) @@ -189,11 +193,12 @@ func (client *ExpressRouteCircuitsClient) deleteCreateRequest(ctx context.Contex // Get - Gets information about the specified express route circuit. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of express route circuit. -// options - ExpressRouteCircuitsClientGetOptions contains the optional parameters for the ExpressRouteCircuitsClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of express route circuit. +// - options - ExpressRouteCircuitsClientGetOptions contains the optional parameters for the ExpressRouteCircuitsClient.Get +// method. func (client *ExpressRouteCircuitsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, options *ExpressRouteCircuitsClientGetOptions) (ExpressRouteCircuitsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, circuitName, options) if err != nil { @@ -246,12 +251,13 @@ func (client *ExpressRouteCircuitsClient) getHandleResponse(resp *http.Response) // GetPeeringStats - Gets all stats from an express route circuit in a resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// peeringName - The name of the peering. -// options - ExpressRouteCircuitsClientGetPeeringStatsOptions contains the optional parameters for the ExpressRouteCircuitsClient.GetPeeringStats -// method. +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - peeringName - The name of the peering. +// - options - ExpressRouteCircuitsClientGetPeeringStatsOptions contains the optional parameters for the ExpressRouteCircuitsClient.GetPeeringStats +// method. func (client *ExpressRouteCircuitsClient) GetPeeringStats(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, options *ExpressRouteCircuitsClientGetPeeringStatsOptions) (ExpressRouteCircuitsClientGetPeeringStatsResponse, error) { req, err := client.getPeeringStatsCreateRequest(ctx, resourceGroupName, circuitName, peeringName, options) if err != nil { @@ -308,11 +314,12 @@ func (client *ExpressRouteCircuitsClient) getPeeringStatsHandleResponse(resp *ht // GetStats - Gets all the stats from an express route circuit in a resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// options - ExpressRouteCircuitsClientGetStatsOptions contains the optional parameters for the ExpressRouteCircuitsClient.GetStats -// method. +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - options - ExpressRouteCircuitsClientGetStatsOptions contains the optional parameters for the ExpressRouteCircuitsClient.GetStats +// method. func (client *ExpressRouteCircuitsClient) GetStats(ctx context.Context, resourceGroupName string, circuitName string, options *ExpressRouteCircuitsClientGetStatsOptions) (ExpressRouteCircuitsClientGetStatsResponse, error) { req, err := client.getStatsCreateRequest(ctx, resourceGroupName, circuitName, options) if err != nil { @@ -364,10 +371,11 @@ func (client *ExpressRouteCircuitsClient) getStatsHandleResponse(resp *http.Resp } // NewListPager - Gets all the express route circuits in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - ExpressRouteCircuitsClientListOptions contains the optional parameters for the ExpressRouteCircuitsClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - options - ExpressRouteCircuitsClientListOptions contains the optional parameters for the ExpressRouteCircuitsClient.NewListPager +// method. func (client *ExpressRouteCircuitsClient) NewListPager(resourceGroupName string, options *ExpressRouteCircuitsClientListOptions) *runtime.Pager[ExpressRouteCircuitsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ExpressRouteCircuitsClientListResponse]{ More: func(page ExpressRouteCircuitsClientListResponse) bool { @@ -428,9 +436,10 @@ func (client *ExpressRouteCircuitsClient) listHandleResponse(resp *http.Response } // NewListAllPager - Gets all the express route circuits in a subscription. +// // Generated from API version 2022-07-01 -// options - ExpressRouteCircuitsClientListAllOptions contains the optional parameters for the ExpressRouteCircuitsClient.ListAll -// method. +// - options - ExpressRouteCircuitsClientListAllOptions contains the optional parameters for the ExpressRouteCircuitsClient.NewListAllPager +// method. func (client *ExpressRouteCircuitsClient) NewListAllPager(options *ExpressRouteCircuitsClientListAllOptions) *runtime.Pager[ExpressRouteCircuitsClientListAllResponse] { return runtime.NewPager(runtime.PagingHandler[ExpressRouteCircuitsClientListAllResponse]{ More: func(page ExpressRouteCircuitsClientListAllResponse) bool { @@ -488,13 +497,14 @@ func (client *ExpressRouteCircuitsClient) listAllHandleResponse(resp *http.Respo // BeginListArpTable - Gets the currently advertised ARP table associated with the express route circuit in a resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// peeringName - The name of the peering. -// devicePath - The path of the device. -// options - ExpressRouteCircuitsClientBeginListArpTableOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginListArpTable -// method. +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - peeringName - The name of the peering. +// - devicePath - The path of the device. +// - options - ExpressRouteCircuitsClientBeginListArpTableOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginListArpTable +// method. func (client *ExpressRouteCircuitsClient) BeginListArpTable(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string, options *ExpressRouteCircuitsClientBeginListArpTableOptions) (*runtime.Poller[ExpressRouteCircuitsClientListArpTableResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.listArpTable(ctx, resourceGroupName, circuitName, peeringName, devicePath, options) @@ -511,6 +521,7 @@ func (client *ExpressRouteCircuitsClient) BeginListArpTable(ctx context.Context, // ListArpTable - Gets the currently advertised ARP table associated with the express route circuit in a resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ExpressRouteCircuitsClient) listArpTable(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string, options *ExpressRouteCircuitsClientBeginListArpTableOptions) (*http.Response, error) { req, err := client.listArpTableCreateRequest(ctx, resourceGroupName, circuitName, peeringName, devicePath, options) @@ -564,13 +575,14 @@ func (client *ExpressRouteCircuitsClient) listArpTableCreateRequest(ctx context. // BeginListRoutesTable - Gets the currently advertised routes table associated with the express route circuit in a resource // group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// peeringName - The name of the peering. -// devicePath - The path of the device. -// options - ExpressRouteCircuitsClientBeginListRoutesTableOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginListRoutesTable -// method. +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - peeringName - The name of the peering. +// - devicePath - The path of the device. +// - options - ExpressRouteCircuitsClientBeginListRoutesTableOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginListRoutesTable +// method. func (client *ExpressRouteCircuitsClient) BeginListRoutesTable(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string, options *ExpressRouteCircuitsClientBeginListRoutesTableOptions) (*runtime.Poller[ExpressRouteCircuitsClientListRoutesTableResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.listRoutesTable(ctx, resourceGroupName, circuitName, peeringName, devicePath, options) @@ -587,6 +599,7 @@ func (client *ExpressRouteCircuitsClient) BeginListRoutesTable(ctx context.Conte // ListRoutesTable - Gets the currently advertised routes table associated with the express route circuit in a resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ExpressRouteCircuitsClient) listRoutesTable(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string, options *ExpressRouteCircuitsClientBeginListRoutesTableOptions) (*http.Response, error) { req, err := client.listRoutesTableCreateRequest(ctx, resourceGroupName, circuitName, peeringName, devicePath, options) @@ -640,13 +653,14 @@ func (client *ExpressRouteCircuitsClient) listRoutesTableCreateRequest(ctx conte // BeginListRoutesTableSummary - Gets the currently advertised routes table summary associated with the express route circuit // in a resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// peeringName - The name of the peering. -// devicePath - The path of the device. -// options - ExpressRouteCircuitsClientBeginListRoutesTableSummaryOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginListRoutesTableSummary -// method. +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - peeringName - The name of the peering. +// - devicePath - The path of the device. +// - options - ExpressRouteCircuitsClientBeginListRoutesTableSummaryOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginListRoutesTableSummary +// method. func (client *ExpressRouteCircuitsClient) BeginListRoutesTableSummary(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string, options *ExpressRouteCircuitsClientBeginListRoutesTableSummaryOptions) (*runtime.Poller[ExpressRouteCircuitsClientListRoutesTableSummaryResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.listRoutesTableSummary(ctx, resourceGroupName, circuitName, peeringName, devicePath, options) @@ -664,6 +678,7 @@ func (client *ExpressRouteCircuitsClient) BeginListRoutesTableSummary(ctx contex // ListRoutesTableSummary - Gets the currently advertised routes table summary associated with the express route circuit in // a resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ExpressRouteCircuitsClient) listRoutesTableSummary(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string, options *ExpressRouteCircuitsClientBeginListRoutesTableSummaryOptions) (*http.Response, error) { req, err := client.listRoutesTableSummaryCreateRequest(ctx, resourceGroupName, circuitName, peeringName, devicePath, options) @@ -716,12 +731,13 @@ func (client *ExpressRouteCircuitsClient) listRoutesTableSummaryCreateRequest(ct // UpdateTags - Updates an express route circuit tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the circuit. -// parameters - Parameters supplied to update express route circuit tags. -// options - ExpressRouteCircuitsClientUpdateTagsOptions contains the optional parameters for the ExpressRouteCircuitsClient.UpdateTags -// method. +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the circuit. +// - parameters - Parameters supplied to update express route circuit tags. +// - options - ExpressRouteCircuitsClientUpdateTagsOptions contains the optional parameters for the ExpressRouteCircuitsClient.UpdateTags +// method. func (client *ExpressRouteCircuitsClient) UpdateTags(ctx context.Context, resourceGroupName string, circuitName string, parameters TagsObject, options *ExpressRouteCircuitsClientUpdateTagsOptions) (ExpressRouteCircuitsClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, circuitName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/expressroutecircuits_client_example_test.go b/sdk/resourcemanager/network/armnetwork/expressroutecircuits_client_example_test.go deleted file mode 100644 index c58cd921af21..000000000000 --- a/sdk/resourcemanager/network/armnetwork/expressroutecircuits_client_example_test.go +++ /dev/null @@ -1,314 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCircuitDelete.json -func ExampleExpressRouteCircuitsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCircuitsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "circuitName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCircuitGet.json -func ExampleExpressRouteCircuitsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCircuitsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "circuitName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCircuitCreate.json -func ExampleExpressRouteCircuitsClient_BeginCreateOrUpdate_createExpressRouteCircuit() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCircuitsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "circuitName", armnetwork.ExpressRouteCircuit{ - Location: to.Ptr("Brazil South"), - Properties: &armnetwork.ExpressRouteCircuitPropertiesFormat{ - AllowClassicOperations: to.Ptr(false), - Authorizations: []*armnetwork.ExpressRouteCircuitAuthorization{}, - Peerings: []*armnetwork.ExpressRouteCircuitPeering{}, - ServiceProviderProperties: &armnetwork.ExpressRouteCircuitServiceProviderProperties{ - BandwidthInMbps: to.Ptr[int32](200), - PeeringLocation: to.Ptr("Silicon Valley"), - ServiceProviderName: to.Ptr("Equinix"), - }, - }, - SKU: &armnetwork.ExpressRouteCircuitSKU{ - Name: to.Ptr("Standard_MeteredData"), - Family: to.Ptr(armnetwork.ExpressRouteCircuitSKUFamilyMeteredData), - Tier: to.Ptr(armnetwork.ExpressRouteCircuitSKUTierStandard), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCircuitCreateOnExpressRoutePort.json -func ExampleExpressRouteCircuitsClient_BeginCreateOrUpdate_createExpressRouteCircuitOnExpressRoutePort() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCircuitsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "expressRouteCircuit1", armnetwork.ExpressRouteCircuit{ - Location: to.Ptr("westus"), - Properties: &armnetwork.ExpressRouteCircuitPropertiesFormat{ - AuthorizationKey: to.Ptr("b0be57f5-1fba-463b-adec-ffe767354cdd"), - BandwidthInGbps: to.Ptr[float32](10), - ExpressRoutePort: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRoutePorts/portName"), - }, - }, - SKU: &armnetwork.ExpressRouteCircuitSKU{ - Name: to.Ptr("Premium_MeteredData"), - Family: to.Ptr(armnetwork.ExpressRouteCircuitSKUFamilyMeteredData), - Tier: to.Ptr(armnetwork.ExpressRouteCircuitSKUTierPremium), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCircuitUpdateTags.json -func ExampleExpressRouteCircuitsClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCircuitsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, "ertest", "er1", armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCircuitARPTableList.json -func ExampleExpressRouteCircuitsClient_BeginListArpTable() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCircuitsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginListArpTable(ctx, "rg1", "circuitName", "peeringName", "devicePath", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCircuitRouteTableList.json -func ExampleExpressRouteCircuitsClient_BeginListRoutesTable() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCircuitsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginListRoutesTable(ctx, "rg1", "circuitName", "peeringName", "devicePath", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCircuitRouteTableSummaryList.json -func ExampleExpressRouteCircuitsClient_BeginListRoutesTableSummary() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCircuitsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginListRoutesTableSummary(ctx, "rg1", "circuitName", "peeringName", "devicePath", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCircuitStats.json -func ExampleExpressRouteCircuitsClient_GetStats() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCircuitsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetStats(ctx, "rg1", "circuitName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCircuitPeeringStats.json -func ExampleExpressRouteCircuitsClient_GetPeeringStats() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCircuitsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetPeeringStats(ctx, "rg1", "circuitName", "peeringName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCircuitListByResourceGroup.json -func ExampleExpressRouteCircuitsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCircuitsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCircuitListBySubscription.json -func ExampleExpressRouteCircuitsClient_NewListAllPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCircuitsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListAllPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/expressrouteconnections_client.go b/sdk/resourcemanager/network/armnetwork/expressrouteconnections_client.go index 295a543bdb63..3a54a73df862 100644 --- a/sdk/resourcemanager/network/armnetwork/expressrouteconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/expressrouteconnections_client.go @@ -32,10 +32,10 @@ type ExpressRouteConnectionsClient struct { } // NewExpressRouteConnectionsClient creates a new instance of ExpressRouteConnectionsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewExpressRouteConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteConnectionsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewExpressRouteConnectionsClient(subscriptionID string, credential azcore.T // BeginCreateOrUpdate - Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// expressRouteGatewayName - The name of the ExpressRoute gateway. -// connectionName - The name of the connection subresource. -// putExpressRouteConnectionParameters - Parameters required in an ExpressRouteConnection PUT operation. -// options - ExpressRouteConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteConnectionsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - expressRouteGatewayName - The name of the ExpressRoute gateway. +// - connectionName - The name of the connection subresource. +// - putExpressRouteConnectionParameters - Parameters required in an ExpressRouteConnection PUT operation. +// - options - ExpressRouteConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteConnectionsClient.BeginCreateOrUpdate +// method. func (client *ExpressRouteConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, putExpressRouteConnectionParameters ExpressRouteConnection, options *ExpressRouteConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExpressRouteConnectionsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, expressRouteGatewayName, connectionName, putExpressRouteConnectionParameters, options) @@ -81,6 +82,7 @@ func (client *ExpressRouteConnectionsClient) BeginCreateOrUpdate(ctx context.Con // CreateOrUpdate - Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ExpressRouteConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, putExpressRouteConnectionParameters ExpressRouteConnection, options *ExpressRouteConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, expressRouteGatewayName, connectionName, putExpressRouteConnectionParameters, options) @@ -129,12 +131,13 @@ func (client *ExpressRouteConnectionsClient) createOrUpdateCreateRequest(ctx con // BeginDelete - Deletes a connection to a ExpressRoute circuit. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// expressRouteGatewayName - The name of the ExpressRoute gateway. -// connectionName - The name of the connection subresource. -// options - ExpressRouteConnectionsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteConnectionsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - expressRouteGatewayName - The name of the ExpressRoute gateway. +// - connectionName - The name of the connection subresource. +// - options - ExpressRouteConnectionsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteConnectionsClient.BeginDelete +// method. func (client *ExpressRouteConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, options *ExpressRouteConnectionsClientBeginDeleteOptions) (*runtime.Poller[ExpressRouteConnectionsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, expressRouteGatewayName, connectionName, options) @@ -151,6 +154,7 @@ func (client *ExpressRouteConnectionsClient) BeginDelete(ctx context.Context, re // Delete - Deletes a connection to a ExpressRoute circuit. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ExpressRouteConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, options *ExpressRouteConnectionsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, expressRouteGatewayName, connectionName, options) @@ -199,12 +203,13 @@ func (client *ExpressRouteConnectionsClient) deleteCreateRequest(ctx context.Con // Get - Gets the specified ExpressRouteConnection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// expressRouteGatewayName - The name of the ExpressRoute gateway. -// connectionName - The name of the ExpressRoute connection. -// options - ExpressRouteConnectionsClientGetOptions contains the optional parameters for the ExpressRouteConnectionsClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - expressRouteGatewayName - The name of the ExpressRoute gateway. +// - connectionName - The name of the ExpressRoute connection. +// - options - ExpressRouteConnectionsClientGetOptions contains the optional parameters for the ExpressRouteConnectionsClient.Get +// method. func (client *ExpressRouteConnectionsClient) Get(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, options *ExpressRouteConnectionsClientGetOptions) (ExpressRouteConnectionsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, expressRouteGatewayName, connectionName, options) if err != nil { @@ -261,11 +266,12 @@ func (client *ExpressRouteConnectionsClient) getHandleResponse(resp *http.Respon // List - Lists ExpressRouteConnections. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// expressRouteGatewayName - The name of the ExpressRoute gateway. -// options - ExpressRouteConnectionsClientListOptions contains the optional parameters for the ExpressRouteConnectionsClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - expressRouteGatewayName - The name of the ExpressRoute gateway. +// - options - ExpressRouteConnectionsClientListOptions contains the optional parameters for the ExpressRouteConnectionsClient.List +// method. func (client *ExpressRouteConnectionsClient) List(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, options *ExpressRouteConnectionsClientListOptions) (ExpressRouteConnectionsClientListResponse, error) { req, err := client.listCreateRequest(ctx, resourceGroupName, expressRouteGatewayName, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/expressrouteconnections_client_example_test.go b/sdk/resourcemanager/network/armnetwork/expressrouteconnections_client_example_test.go deleted file mode 100644 index f508963f96d1..000000000000 --- a/sdk/resourcemanager/network/armnetwork/expressrouteconnections_client_example_test.go +++ /dev/null @@ -1,136 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteConnectionCreate.json -func ExampleExpressRouteConnectionsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "resourceGroupName", "gateway-2", "connectionName", armnetwork.ExpressRouteConnection{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteGateways/gateway-2/expressRouteConnections/connectionName"), - Name: to.Ptr("connectionName"), - Properties: &armnetwork.ExpressRouteConnectionProperties{ - AuthorizationKey: to.Ptr("authorizationKey"), - ExpressRouteCircuitPeering: &armnetwork.ExpressRouteCircuitPeeringID{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/circuitName/peerings/AzurePrivatePeering"), - }, - RoutingConfiguration: &armnetwork.RoutingConfiguration{ - AssociatedRouteTable: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1"), - }, - InboundRouteMap: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1"), - }, - OutboundRouteMap: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2"), - }, - PropagatedRouteTables: &armnetwork.PropagatedRouteTable{ - IDs: []*armnetwork.SubResource{ - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1"), - }, - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable2"), - }, - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable3"), - }}, - Labels: []*string{ - to.Ptr("label1"), - to.Ptr("label2")}, - }, - }, - RoutingWeight: to.Ptr[int32](2), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteConnectionGet.json -func ExampleExpressRouteConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "resourceGroupName", "expressRouteGatewayName", "connectionName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteConnectionDelete.json -func ExampleExpressRouteConnectionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "resourceGroupName", "expressRouteGatewayName", "connectionName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteConnectionList.json -func ExampleExpressRouteConnectionsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.List(ctx, "resourceGroupName", "expressRouteGatewayName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/expressroutecrossconnectionpeerings_client.go b/sdk/resourcemanager/network/armnetwork/expressroutecrossconnectionpeerings_client.go index 5992c58f87f6..1f4937b99e6a 100644 --- a/sdk/resourcemanager/network/armnetwork/expressroutecrossconnectionpeerings_client.go +++ b/sdk/resourcemanager/network/armnetwork/expressroutecrossconnectionpeerings_client.go @@ -32,10 +32,10 @@ type ExpressRouteCrossConnectionPeeringsClient struct { } // NewExpressRouteCrossConnectionPeeringsClient creates a new instance of ExpressRouteCrossConnectionPeeringsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewExpressRouteCrossConnectionPeeringsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteCrossConnectionPeeringsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewExpressRouteCrossConnectionPeeringsClient(subscriptionID string, credent // BeginCreateOrUpdate - Creates or updates a peering in the specified ExpressRouteCrossConnection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// crossConnectionName - The name of the ExpressRouteCrossConnection. -// peeringName - The name of the peering. -// peeringParameters - Parameters supplied to the create or update ExpressRouteCrossConnection peering operation. -// options - ExpressRouteCrossConnectionPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the -// ExpressRouteCrossConnectionPeeringsClient.BeginCreateOrUpdate method. +// - resourceGroupName - The name of the resource group. +// - crossConnectionName - The name of the ExpressRouteCrossConnection. +// - peeringName - The name of the peering. +// - peeringParameters - Parameters supplied to the create or update ExpressRouteCrossConnection peering operation. +// - options - ExpressRouteCrossConnectionPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the +// ExpressRouteCrossConnectionPeeringsClient.BeginCreateOrUpdate method. func (client *ExpressRouteCrossConnectionPeeringsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, peeringParameters ExpressRouteCrossConnectionPeering, options *ExpressRouteCrossConnectionPeeringsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, crossConnectionName, peeringName, peeringParameters, options) @@ -81,6 +82,7 @@ func (client *ExpressRouteCrossConnectionPeeringsClient) BeginCreateOrUpdate(ctx // CreateOrUpdate - Creates or updates a peering in the specified ExpressRouteCrossConnection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ExpressRouteCrossConnectionPeeringsClient) createOrUpdate(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, peeringParameters ExpressRouteCrossConnectionPeering, options *ExpressRouteCrossConnectionPeeringsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, crossConnectionName, peeringName, peeringParameters, options) @@ -129,12 +131,13 @@ func (client *ExpressRouteCrossConnectionPeeringsClient) createOrUpdateCreateReq // BeginDelete - Deletes the specified peering from the ExpressRouteCrossConnection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// crossConnectionName - The name of the ExpressRouteCrossConnection. -// peeringName - The name of the peering. -// options - ExpressRouteCrossConnectionPeeringsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - crossConnectionName - The name of the ExpressRouteCrossConnection. +// - peeringName - The name of the peering. +// - options - ExpressRouteCrossConnectionPeeringsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.BeginDelete +// method. func (client *ExpressRouteCrossConnectionPeeringsClient) BeginDelete(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, options *ExpressRouteCrossConnectionPeeringsClientBeginDeleteOptions) (*runtime.Poller[ExpressRouteCrossConnectionPeeringsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, crossConnectionName, peeringName, options) @@ -151,6 +154,7 @@ func (client *ExpressRouteCrossConnectionPeeringsClient) BeginDelete(ctx context // Delete - Deletes the specified peering from the ExpressRouteCrossConnection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ExpressRouteCrossConnectionPeeringsClient) deleteOperation(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, options *ExpressRouteCrossConnectionPeeringsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, crossConnectionName, peeringName, options) @@ -199,12 +203,13 @@ func (client *ExpressRouteCrossConnectionPeeringsClient) deleteCreateRequest(ctx // Get - Gets the specified peering for the ExpressRouteCrossConnection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// crossConnectionName - The name of the ExpressRouteCrossConnection. -// peeringName - The name of the peering. -// options - ExpressRouteCrossConnectionPeeringsClientGetOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - crossConnectionName - The name of the ExpressRouteCrossConnection. +// - peeringName - The name of the peering. +// - options - ExpressRouteCrossConnectionPeeringsClientGetOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.Get +// method. func (client *ExpressRouteCrossConnectionPeeringsClient) Get(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, options *ExpressRouteCrossConnectionPeeringsClientGetOptions) (ExpressRouteCrossConnectionPeeringsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, crossConnectionName, peeringName, options) if err != nil { @@ -260,11 +265,12 @@ func (client *ExpressRouteCrossConnectionPeeringsClient) getHandleResponse(resp } // NewListPager - Gets all peerings in a specified ExpressRouteCrossConnection. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// crossConnectionName - The name of the ExpressRouteCrossConnection. -// options - ExpressRouteCrossConnectionPeeringsClientListOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - crossConnectionName - The name of the ExpressRouteCrossConnection. +// - options - ExpressRouteCrossConnectionPeeringsClientListOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.NewListPager +// method. func (client *ExpressRouteCrossConnectionPeeringsClient) NewListPager(resourceGroupName string, crossConnectionName string, options *ExpressRouteCrossConnectionPeeringsClientListOptions) *runtime.Pager[ExpressRouteCrossConnectionPeeringsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ExpressRouteCrossConnectionPeeringsClientListResponse]{ More: func(page ExpressRouteCrossConnectionPeeringsClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/expressroutecrossconnectionpeerings_client_example_test.go b/sdk/resourcemanager/network/armnetwork/expressroutecrossconnectionpeerings_client_example_test.go deleted file mode 100644 index ab94773d7d49..000000000000 --- a/sdk/resourcemanager/network/armnetwork/expressroutecrossconnectionpeerings_client_example_test.go +++ /dev/null @@ -1,116 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCrossConnectionBgpPeeringList.json -func ExampleExpressRouteCrossConnectionPeeringsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCrossConnectionPeeringsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("CrossConnection-SiliconValley", "", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCrossConnectionBgpPeeringDelete.json -func ExampleExpressRouteCrossConnectionPeeringsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCrossConnectionPeeringsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "CrossConnection-SiliconValley", "", "AzurePrivatePeering", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json -func ExampleExpressRouteCrossConnectionPeeringsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCrossConnectionPeeringsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "CrossConnection-SiliconValley", "", "AzurePrivatePeering", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCrossConnectionBgpPeeringCreate.json -func ExampleExpressRouteCrossConnectionPeeringsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCrossConnectionPeeringsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "CrossConnection-SiliconValley", "", "AzurePrivatePeering", armnetwork.ExpressRouteCrossConnectionPeering{ - Properties: &armnetwork.ExpressRouteCrossConnectionPeeringProperties{ - IPv6PeeringConfig: &armnetwork.IPv6ExpressRouteCircuitPeeringConfig{ - PrimaryPeerAddressPrefix: to.Ptr("3FFE:FFFF:0:CD30::/126"), - SecondaryPeerAddressPrefix: to.Ptr("3FFE:FFFF:0:CD30::4/126"), - }, - PeerASN: to.Ptr[int64](200), - PrimaryPeerAddressPrefix: to.Ptr("192.168.16.252/30"), - SecondaryPeerAddressPrefix: to.Ptr("192.168.18.252/30"), - VlanID: to.Ptr[int32](200), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/expressroutecrossconnections_client.go b/sdk/resourcemanager/network/armnetwork/expressroutecrossconnections_client.go index a2b11ba5c110..9f4a4d77f40f 100644 --- a/sdk/resourcemanager/network/armnetwork/expressroutecrossconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/expressroutecrossconnections_client.go @@ -32,10 +32,10 @@ type ExpressRouteCrossConnectionsClient struct { } // NewExpressRouteCrossConnectionsClient creates a new instance of ExpressRouteCrossConnectionsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewExpressRouteCrossConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteCrossConnectionsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewExpressRouteCrossConnectionsClient(subscriptionID string, credential azc // BeginCreateOrUpdate - Update the specified ExpressRouteCrossConnection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// crossConnectionName - The name of the ExpressRouteCrossConnection. -// parameters - Parameters supplied to the update express route crossConnection operation. -// options - ExpressRouteCrossConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - crossConnectionName - The name of the ExpressRouteCrossConnection. +// - parameters - Parameters supplied to the update express route crossConnection operation. +// - options - ExpressRouteCrossConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginCreateOrUpdate +// method. func (client *ExpressRouteCrossConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, crossConnectionName string, parameters ExpressRouteCrossConnection, options *ExpressRouteCrossConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExpressRouteCrossConnectionsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, crossConnectionName, parameters, options) @@ -80,6 +81,7 @@ func (client *ExpressRouteCrossConnectionsClient) BeginCreateOrUpdate(ctx contex // CreateOrUpdate - Update the specified ExpressRouteCrossConnection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ExpressRouteCrossConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, crossConnectionName string, parameters ExpressRouteCrossConnection, options *ExpressRouteCrossConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, crossConnectionName, parameters, options) @@ -124,11 +126,12 @@ func (client *ExpressRouteCrossConnectionsClient) createOrUpdateCreateRequest(ct // Get - Gets details about the specified ExpressRouteCrossConnection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group (peering location of the circuit). -// crossConnectionName - The name of the ExpressRouteCrossConnection (service key of the circuit). -// options - ExpressRouteCrossConnectionsClientGetOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.Get -// method. +// - resourceGroupName - The name of the resource group (peering location of the circuit). +// - crossConnectionName - The name of the ExpressRouteCrossConnection (service key of the circuit). +// - options - ExpressRouteCrossConnectionsClientGetOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.Get +// method. func (client *ExpressRouteCrossConnectionsClient) Get(ctx context.Context, resourceGroupName string, crossConnectionName string, options *ExpressRouteCrossConnectionsClientGetOptions) (ExpressRouteCrossConnectionsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, crossConnectionName, options) if err != nil { @@ -180,9 +183,10 @@ func (client *ExpressRouteCrossConnectionsClient) getHandleResponse(resp *http.R } // NewListPager - Retrieves all the ExpressRouteCrossConnections in a subscription. +// // Generated from API version 2022-07-01 -// options - ExpressRouteCrossConnectionsClientListOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.List -// method. +// - options - ExpressRouteCrossConnectionsClientListOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.NewListPager +// method. func (client *ExpressRouteCrossConnectionsClient) NewListPager(options *ExpressRouteCrossConnectionsClientListOptions) *runtime.Pager[ExpressRouteCrossConnectionsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ExpressRouteCrossConnectionsClientListResponse]{ More: func(page ExpressRouteCrossConnectionsClientListResponse) bool { @@ -241,13 +245,14 @@ func (client *ExpressRouteCrossConnectionsClient) listHandleResponse(resp *http. // BeginListArpTable - Gets the currently advertised ARP table associated with the express route cross connection in a resource // group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// crossConnectionName - The name of the ExpressRouteCrossConnection. -// peeringName - The name of the peering. -// devicePath - The path of the device. -// options - ExpressRouteCrossConnectionsClientBeginListArpTableOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginListArpTable -// method. +// - resourceGroupName - The name of the resource group. +// - crossConnectionName - The name of the ExpressRouteCrossConnection. +// - peeringName - The name of the peering. +// - devicePath - The path of the device. +// - options - ExpressRouteCrossConnectionsClientBeginListArpTableOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginListArpTable +// method. func (client *ExpressRouteCrossConnectionsClient) BeginListArpTable(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string, options *ExpressRouteCrossConnectionsClientBeginListArpTableOptions) (*runtime.Poller[ExpressRouteCrossConnectionsClientListArpTableResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.listArpTable(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath, options) @@ -265,6 +270,7 @@ func (client *ExpressRouteCrossConnectionsClient) BeginListArpTable(ctx context. // ListArpTable - Gets the currently advertised ARP table associated with the express route cross connection in a resource // group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ExpressRouteCrossConnectionsClient) listArpTable(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string, options *ExpressRouteCrossConnectionsClientBeginListArpTableOptions) (*http.Response, error) { req, err := client.listArpTableCreateRequest(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath, options) @@ -316,10 +322,11 @@ func (client *ExpressRouteCrossConnectionsClient) listArpTableCreateRequest(ctx } // NewListByResourceGroupPager - Retrieves all the ExpressRouteCrossConnections in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - ExpressRouteCrossConnectionsClientListByResourceGroupOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.ListByResourceGroup -// method. +// - resourceGroupName - The name of the resource group. +// - options - ExpressRouteCrossConnectionsClientListByResourceGroupOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.NewListByResourceGroupPager +// method. func (client *ExpressRouteCrossConnectionsClient) NewListByResourceGroupPager(resourceGroupName string, options *ExpressRouteCrossConnectionsClientListByResourceGroupOptions) *runtime.Pager[ExpressRouteCrossConnectionsClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[ExpressRouteCrossConnectionsClientListByResourceGroupResponse]{ More: func(page ExpressRouteCrossConnectionsClientListByResourceGroupResponse) bool { @@ -382,13 +389,14 @@ func (client *ExpressRouteCrossConnectionsClient) listByResourceGroupHandleRespo // BeginListRoutesTable - Gets the currently advertised routes table associated with the express route cross connection in // a resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// crossConnectionName - The name of the ExpressRouteCrossConnection. -// peeringName - The name of the peering. -// devicePath - The path of the device. -// options - ExpressRouteCrossConnectionsClientBeginListRoutesTableOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginListRoutesTable -// method. +// - resourceGroupName - The name of the resource group. +// - crossConnectionName - The name of the ExpressRouteCrossConnection. +// - peeringName - The name of the peering. +// - devicePath - The path of the device. +// - options - ExpressRouteCrossConnectionsClientBeginListRoutesTableOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginListRoutesTable +// method. func (client *ExpressRouteCrossConnectionsClient) BeginListRoutesTable(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string, options *ExpressRouteCrossConnectionsClientBeginListRoutesTableOptions) (*runtime.Poller[ExpressRouteCrossConnectionsClientListRoutesTableResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.listRoutesTable(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath, options) @@ -406,6 +414,7 @@ func (client *ExpressRouteCrossConnectionsClient) BeginListRoutesTable(ctx conte // ListRoutesTable - Gets the currently advertised routes table associated with the express route cross connection in a resource // group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ExpressRouteCrossConnectionsClient) listRoutesTable(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string, options *ExpressRouteCrossConnectionsClientBeginListRoutesTableOptions) (*http.Response, error) { req, err := client.listRoutesTableCreateRequest(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath, options) @@ -459,13 +468,14 @@ func (client *ExpressRouteCrossConnectionsClient) listRoutesTableCreateRequest(c // BeginListRoutesTableSummary - Gets the route table summary associated with the express route cross connection in a resource // group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// crossConnectionName - The name of the ExpressRouteCrossConnection. -// peeringName - The name of the peering. -// devicePath - The path of the device. -// options - ExpressRouteCrossConnectionsClientBeginListRoutesTableSummaryOptions contains the optional parameters for the -// ExpressRouteCrossConnectionsClient.BeginListRoutesTableSummary method. +// - resourceGroupName - The name of the resource group. +// - crossConnectionName - The name of the ExpressRouteCrossConnection. +// - peeringName - The name of the peering. +// - devicePath - The path of the device. +// - options - ExpressRouteCrossConnectionsClientBeginListRoutesTableSummaryOptions contains the optional parameters for the +// ExpressRouteCrossConnectionsClient.BeginListRoutesTableSummary method. func (client *ExpressRouteCrossConnectionsClient) BeginListRoutesTableSummary(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string, options *ExpressRouteCrossConnectionsClientBeginListRoutesTableSummaryOptions) (*runtime.Poller[ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.listRoutesTableSummary(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath, options) @@ -483,6 +493,7 @@ func (client *ExpressRouteCrossConnectionsClient) BeginListRoutesTableSummary(ct // ListRoutesTableSummary - Gets the route table summary associated with the express route cross connection in a resource // group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ExpressRouteCrossConnectionsClient) listRoutesTableSummary(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string, options *ExpressRouteCrossConnectionsClientBeginListRoutesTableSummaryOptions) (*http.Response, error) { req, err := client.listRoutesTableSummaryCreateRequest(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath, options) @@ -535,12 +546,13 @@ func (client *ExpressRouteCrossConnectionsClient) listRoutesTableSummaryCreateRe // UpdateTags - Updates an express route cross connection tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// crossConnectionName - The name of the cross connection. -// crossConnectionParameters - Parameters supplied to update express route cross connection tags. -// options - ExpressRouteCrossConnectionsClientUpdateTagsOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.UpdateTags -// method. +// - resourceGroupName - The name of the resource group. +// - crossConnectionName - The name of the cross connection. +// - crossConnectionParameters - Parameters supplied to update express route cross connection tags. +// - options - ExpressRouteCrossConnectionsClientUpdateTagsOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.UpdateTags +// method. func (client *ExpressRouteCrossConnectionsClient) UpdateTags(ctx context.Context, resourceGroupName string, crossConnectionName string, crossConnectionParameters TagsObject, options *ExpressRouteCrossConnectionsClientUpdateTagsOptions) (ExpressRouteCrossConnectionsClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, crossConnectionName, crossConnectionParameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/expressroutecrossconnections_client_example_test.go b/sdk/resourcemanager/network/armnetwork/expressroutecrossconnections_client_example_test.go deleted file mode 100644 index 8ca32837b05d..000000000000 --- a/sdk/resourcemanager/network/armnetwork/expressroutecrossconnections_client_example_test.go +++ /dev/null @@ -1,205 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCrossConnectionList.json -func ExampleExpressRouteCrossConnectionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCrossConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCrossConnectionListByResourceGroup.json -func ExampleExpressRouteCrossConnectionsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCrossConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("CrossConnection-SiliconValley", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCrossConnectionGet.json -func ExampleExpressRouteCrossConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCrossConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "CrossConnection-SiliconValley", "", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCrossConnectionUpdate.json -func ExampleExpressRouteCrossConnectionsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCrossConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "CrossConnection-SiliconValley", "", armnetwork.ExpressRouteCrossConnection{ - Properties: &armnetwork.ExpressRouteCrossConnectionProperties{ - ServiceProviderProvisioningState: to.Ptr(armnetwork.ServiceProviderProvisioningStateNotProvisioned), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCrossConnectionUpdateTags.json -func ExampleExpressRouteCrossConnectionsClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCrossConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, "CrossConnection-SiliconValley", "", armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCrossConnectionsArpTable.json -func ExampleExpressRouteCrossConnectionsClient_BeginListArpTable() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCrossConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginListArpTable(ctx, "CrossConnection-SiliconValley", "", "AzurePrivatePeering", "primary", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCrossConnectionsRouteTableSummary.json -func ExampleExpressRouteCrossConnectionsClient_BeginListRoutesTableSummary() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCrossConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginListRoutesTableSummary(ctx, "CrossConnection-SiliconValley", "", "AzurePrivatePeering", "primary", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteCrossConnectionsRouteTable.json -func ExampleExpressRouteCrossConnectionsClient_BeginListRoutesTable() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteCrossConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginListRoutesTable(ctx, "CrossConnection-SiliconValley", "", "AzurePrivatePeering", "primary", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/expressroutegateways_client.go b/sdk/resourcemanager/network/armnetwork/expressroutegateways_client.go index 1b12efc79da7..13dd226ec4f0 100644 --- a/sdk/resourcemanager/network/armnetwork/expressroutegateways_client.go +++ b/sdk/resourcemanager/network/armnetwork/expressroutegateways_client.go @@ -32,10 +32,10 @@ type ExpressRouteGatewaysClient struct { } // NewExpressRouteGatewaysClient creates a new instance of ExpressRouteGatewaysClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewExpressRouteGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteGatewaysClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewExpressRouteGatewaysClient(subscriptionID string, credential azcore.Toke // BeginCreateOrUpdate - Creates or updates a ExpressRoute gateway in a specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// expressRouteGatewayName - The name of the ExpressRoute gateway. -// putExpressRouteGatewayParameters - Parameters required in an ExpressRoute gateway PUT operation. -// options - ExpressRouteGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteGatewaysClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - expressRouteGatewayName - The name of the ExpressRoute gateway. +// - putExpressRouteGatewayParameters - Parameters required in an ExpressRoute gateway PUT operation. +// - options - ExpressRouteGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteGatewaysClient.BeginCreateOrUpdate +// method. func (client *ExpressRouteGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, putExpressRouteGatewayParameters ExpressRouteGateway, options *ExpressRouteGatewaysClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExpressRouteGatewaysClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, expressRouteGatewayName, putExpressRouteGatewayParameters, options) @@ -80,6 +81,7 @@ func (client *ExpressRouteGatewaysClient) BeginCreateOrUpdate(ctx context.Contex // CreateOrUpdate - Creates or updates a ExpressRoute gateway in a specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ExpressRouteGatewaysClient) createOrUpdate(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, putExpressRouteGatewayParameters ExpressRouteGateway, options *ExpressRouteGatewaysClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, expressRouteGatewayName, putExpressRouteGatewayParameters, options) @@ -125,11 +127,12 @@ func (client *ExpressRouteGatewaysClient) createOrUpdateCreateRequest(ctx contex // BeginDelete - Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only // be deleted when there are no connection subresources. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// expressRouteGatewayName - The name of the ExpressRoute gateway. -// options - ExpressRouteGatewaysClientBeginDeleteOptions contains the optional parameters for the ExpressRouteGatewaysClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - expressRouteGatewayName - The name of the ExpressRoute gateway. +// - options - ExpressRouteGatewaysClientBeginDeleteOptions contains the optional parameters for the ExpressRouteGatewaysClient.BeginDelete +// method. func (client *ExpressRouteGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, options *ExpressRouteGatewaysClientBeginDeleteOptions) (*runtime.Poller[ExpressRouteGatewaysClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, expressRouteGatewayName, options) @@ -147,6 +150,7 @@ func (client *ExpressRouteGatewaysClient) BeginDelete(ctx context.Context, resou // Delete - Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted // when there are no connection subresources. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ExpressRouteGatewaysClient) deleteOperation(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, options *ExpressRouteGatewaysClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, expressRouteGatewayName, options) @@ -191,11 +195,12 @@ func (client *ExpressRouteGatewaysClient) deleteCreateRequest(ctx context.Contex // Get - Fetches the details of a ExpressRoute gateway in a resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// expressRouteGatewayName - The name of the ExpressRoute gateway. -// options - ExpressRouteGatewaysClientGetOptions contains the optional parameters for the ExpressRouteGatewaysClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - expressRouteGatewayName - The name of the ExpressRoute gateway. +// - options - ExpressRouteGatewaysClientGetOptions contains the optional parameters for the ExpressRouteGatewaysClient.Get +// method. func (client *ExpressRouteGatewaysClient) Get(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, options *ExpressRouteGatewaysClientGetOptions) (ExpressRouteGatewaysClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, expressRouteGatewayName, options) if err != nil { @@ -248,10 +253,11 @@ func (client *ExpressRouteGatewaysClient) getHandleResponse(resp *http.Response) // ListByResourceGroup - Lists ExpressRoute gateways in a given resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - ExpressRouteGatewaysClientListByResourceGroupOptions contains the optional parameters for the ExpressRouteGatewaysClient.ListByResourceGroup -// method. +// - resourceGroupName - The name of the resource group. +// - options - ExpressRouteGatewaysClientListByResourceGroupOptions contains the optional parameters for the ExpressRouteGatewaysClient.ListByResourceGroup +// method. func (client *ExpressRouteGatewaysClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, options *ExpressRouteGatewaysClientListByResourceGroupOptions) (ExpressRouteGatewaysClientListByResourceGroupResponse, error) { req, err := client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) if err != nil { @@ -300,9 +306,10 @@ func (client *ExpressRouteGatewaysClient) listByResourceGroupHandleResponse(resp // ListBySubscription - Lists ExpressRoute gateways under a given subscription. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// options - ExpressRouteGatewaysClientListBySubscriptionOptions contains the optional parameters for the ExpressRouteGatewaysClient.ListBySubscription -// method. +// - options - ExpressRouteGatewaysClientListBySubscriptionOptions contains the optional parameters for the ExpressRouteGatewaysClient.ListBySubscription +// method. func (client *ExpressRouteGatewaysClient) ListBySubscription(ctx context.Context, options *ExpressRouteGatewaysClientListBySubscriptionOptions) (ExpressRouteGatewaysClientListBySubscriptionResponse, error) { req, err := client.listBySubscriptionCreateRequest(ctx, options) if err != nil { @@ -347,12 +354,13 @@ func (client *ExpressRouteGatewaysClient) listBySubscriptionHandleResponse(resp // BeginUpdateTags - Updates express route gateway tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the ExpressRouteGateway. -// expressRouteGatewayName - The name of the gateway. -// expressRouteGatewayParameters - Parameters supplied to update a virtual wan express route gateway tags. -// options - ExpressRouteGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the ExpressRouteGatewaysClient.BeginUpdateTags -// method. +// - resourceGroupName - The resource group name of the ExpressRouteGateway. +// - expressRouteGatewayName - The name of the gateway. +// - expressRouteGatewayParameters - Parameters supplied to update a virtual wan express route gateway tags. +// - options - ExpressRouteGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the ExpressRouteGatewaysClient.BeginUpdateTags +// method. func (client *ExpressRouteGatewaysClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, expressRouteGatewayParameters TagsObject, options *ExpressRouteGatewaysClientBeginUpdateTagsOptions) (*runtime.Poller[ExpressRouteGatewaysClientUpdateTagsResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.updateTags(ctx, resourceGroupName, expressRouteGatewayName, expressRouteGatewayParameters, options) @@ -369,6 +377,7 @@ func (client *ExpressRouteGatewaysClient) BeginUpdateTags(ctx context.Context, r // UpdateTags - Updates express route gateway tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ExpressRouteGatewaysClient) updateTags(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, expressRouteGatewayParameters TagsObject, options *ExpressRouteGatewaysClientBeginUpdateTagsOptions) (*http.Response, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, expressRouteGatewayName, expressRouteGatewayParameters, options) diff --git a/sdk/resourcemanager/network/armnetwork/expressroutegateways_client_example_test.go b/sdk/resourcemanager/network/armnetwork/expressroutegateways_client_example_test.go deleted file mode 100644 index 45e315de7cef..000000000000 --- a/sdk/resourcemanager/network/armnetwork/expressroutegateways_client_example_test.go +++ /dev/null @@ -1,160 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteGatewayListBySubscription.json -func ExampleExpressRouteGatewaysClient_ListBySubscription() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListBySubscription(ctx, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteGatewayListByResourceGroup.json -func ExampleExpressRouteGatewaysClient_ListByResourceGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListByResourceGroup(ctx, "resourceGroupName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteGatewayCreate.json -func ExampleExpressRouteGatewaysClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "resourceGroupName", "gateway-2", armnetwork.ExpressRouteGateway{ - Location: to.Ptr("westus"), - Properties: &armnetwork.ExpressRouteGatewayProperties{ - AllowNonVirtualWanTraffic: to.Ptr(false), - AutoScaleConfiguration: &armnetwork.ExpressRouteGatewayPropertiesAutoScaleConfiguration{ - Bounds: &armnetwork.ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds{ - Min: to.Ptr[int32](3), - }, - }, - VirtualHub: &armnetwork.VirtualHubID{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/resourceGroupId/providers/Microsoft.Network/virtualHubs/virtualHubName"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteGatewayUpdateTags.json -func ExampleExpressRouteGatewaysClient_BeginUpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdateTags(ctx, "resourceGroupName", "expressRouteGatewayName", armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteGatewayGet.json -func ExampleExpressRouteGatewaysClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "resourceGroupName", "expressRouteGatewayName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteGatewayDelete.json -func ExampleExpressRouteGatewaysClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "resourceGroupName", "expressRouteGatewayName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/network/armnetwork/expressroutelinks_client.go b/sdk/resourcemanager/network/armnetwork/expressroutelinks_client.go index c77c2d33af6e..1aaee6b5fcf2 100644 --- a/sdk/resourcemanager/network/armnetwork/expressroutelinks_client.go +++ b/sdk/resourcemanager/network/armnetwork/expressroutelinks_client.go @@ -32,10 +32,10 @@ type ExpressRouteLinksClient struct { } // NewExpressRouteLinksClient creates a new instance of ExpressRouteLinksClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewExpressRouteLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteLinksClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,11 +58,12 @@ func NewExpressRouteLinksClient(subscriptionID string, credential azcore.TokenCr // Get - Retrieves the specified ExpressRouteLink resource. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// expressRoutePortName - The name of the ExpressRoutePort resource. -// linkName - The name of the ExpressRouteLink resource. -// options - ExpressRouteLinksClientGetOptions contains the optional parameters for the ExpressRouteLinksClient.Get method. +// - resourceGroupName - The name of the resource group. +// - expressRoutePortName - The name of the ExpressRoutePort resource. +// - linkName - The name of the ExpressRouteLink resource. +// - options - ExpressRouteLinksClientGetOptions contains the optional parameters for the ExpressRouteLinksClient.Get method. func (client *ExpressRouteLinksClient) Get(ctx context.Context, resourceGroupName string, expressRoutePortName string, linkName string, options *ExpressRouteLinksClientGetOptions) (ExpressRouteLinksClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, expressRoutePortName, linkName, options) if err != nil { @@ -118,10 +119,12 @@ func (client *ExpressRouteLinksClient) getHandleResponse(resp *http.Response) (E } // NewListPager - Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// expressRoutePortName - The name of the ExpressRoutePort resource. -// options - ExpressRouteLinksClientListOptions contains the optional parameters for the ExpressRouteLinksClient.List method. +// - resourceGroupName - The name of the resource group. +// - expressRoutePortName - The name of the ExpressRoutePort resource. +// - options - ExpressRouteLinksClientListOptions contains the optional parameters for the ExpressRouteLinksClient.NewListPager +// method. func (client *ExpressRouteLinksClient) NewListPager(resourceGroupName string, expressRoutePortName string, options *ExpressRouteLinksClientListOptions) *runtime.Pager[ExpressRouteLinksClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ExpressRouteLinksClientListResponse]{ More: func(page ExpressRouteLinksClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/expressroutelinks_client_example_test.go b/sdk/resourcemanager/network/armnetwork/expressroutelinks_client_example_test.go deleted file mode 100644 index 984cc9b62db7..000000000000 --- a/sdk/resourcemanager/network/armnetwork/expressroutelinks_client_example_test.go +++ /dev/null @@ -1,60 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteLinkGet.json -func ExampleExpressRouteLinksClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteLinksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "portName", "linkName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteLinkList.json -func ExampleExpressRouteLinksClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteLinksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", "portName", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/expressrouteportauthorizations_client.go b/sdk/resourcemanager/network/armnetwork/expressrouteportauthorizations_client.go index 7414acafdef5..b9ee4975d447 100644 --- a/sdk/resourcemanager/network/armnetwork/expressrouteportauthorizations_client.go +++ b/sdk/resourcemanager/network/armnetwork/expressrouteportauthorizations_client.go @@ -32,10 +32,10 @@ type ExpressRoutePortAuthorizationsClient struct { } // NewExpressRoutePortAuthorizationsClient creates a new instance of ExpressRoutePortAuthorizationsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewExpressRoutePortAuthorizationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRoutePortAuthorizationsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewExpressRoutePortAuthorizationsClient(subscriptionID string, credential a // BeginCreateOrUpdate - Creates or updates an authorization in the specified express route port. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// expressRoutePortName - The name of the express route port. -// authorizationName - The name of the authorization. -// authorizationParameters - Parameters supplied to the create or update express route port authorization operation. -// options - ExpressRoutePortAuthorizationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - expressRoutePortName - The name of the express route port. +// - authorizationName - The name of the authorization. +// - authorizationParameters - Parameters supplied to the create or update express route port authorization operation. +// - options - ExpressRoutePortAuthorizationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.BeginCreateOrUpdate +// method. func (client *ExpressRoutePortAuthorizationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, expressRoutePortName string, authorizationName string, authorizationParameters ExpressRoutePortAuthorization, options *ExpressRoutePortAuthorizationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExpressRoutePortAuthorizationsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, expressRoutePortName, authorizationName, authorizationParameters, options) @@ -81,6 +82,7 @@ func (client *ExpressRoutePortAuthorizationsClient) BeginCreateOrUpdate(ctx cont // CreateOrUpdate - Creates or updates an authorization in the specified express route port. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ExpressRoutePortAuthorizationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, expressRoutePortName string, authorizationName string, authorizationParameters ExpressRoutePortAuthorization, options *ExpressRoutePortAuthorizationsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, expressRoutePortName, authorizationName, authorizationParameters, options) @@ -129,12 +131,13 @@ func (client *ExpressRoutePortAuthorizationsClient) createOrUpdateCreateRequest( // BeginDelete - Deletes the specified authorization from the specified express route port. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// expressRoutePortName - The name of the express route port. -// authorizationName - The name of the authorization. -// options - ExpressRoutePortAuthorizationsClientBeginDeleteOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - expressRoutePortName - The name of the express route port. +// - authorizationName - The name of the authorization. +// - options - ExpressRoutePortAuthorizationsClientBeginDeleteOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.BeginDelete +// method. func (client *ExpressRoutePortAuthorizationsClient) BeginDelete(ctx context.Context, resourceGroupName string, expressRoutePortName string, authorizationName string, options *ExpressRoutePortAuthorizationsClientBeginDeleteOptions) (*runtime.Poller[ExpressRoutePortAuthorizationsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, expressRoutePortName, authorizationName, options) @@ -151,6 +154,7 @@ func (client *ExpressRoutePortAuthorizationsClient) BeginDelete(ctx context.Cont // Delete - Deletes the specified authorization from the specified express route port. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ExpressRoutePortAuthorizationsClient) deleteOperation(ctx context.Context, resourceGroupName string, expressRoutePortName string, authorizationName string, options *ExpressRoutePortAuthorizationsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, expressRoutePortName, authorizationName, options) @@ -199,12 +203,13 @@ func (client *ExpressRoutePortAuthorizationsClient) deleteCreateRequest(ctx cont // Get - Gets the specified authorization from the specified express route port. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// expressRoutePortName - The name of the express route port. -// authorizationName - The name of the authorization. -// options - ExpressRoutePortAuthorizationsClientGetOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - expressRoutePortName - The name of the express route port. +// - authorizationName - The name of the authorization. +// - options - ExpressRoutePortAuthorizationsClientGetOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.Get +// method. func (client *ExpressRoutePortAuthorizationsClient) Get(ctx context.Context, resourceGroupName string, expressRoutePortName string, authorizationName string, options *ExpressRoutePortAuthorizationsClientGetOptions) (ExpressRoutePortAuthorizationsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, expressRoutePortName, authorizationName, options) if err != nil { @@ -260,11 +265,12 @@ func (client *ExpressRoutePortAuthorizationsClient) getHandleResponse(resp *http } // NewListPager - Gets all authorizations in an express route port. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// expressRoutePortName - The name of the express route port. -// options - ExpressRoutePortAuthorizationsClientListOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - expressRoutePortName - The name of the express route port. +// - options - ExpressRoutePortAuthorizationsClientListOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.NewListPager +// method. func (client *ExpressRoutePortAuthorizationsClient) NewListPager(resourceGroupName string, expressRoutePortName string, options *ExpressRoutePortAuthorizationsClientListOptions) *runtime.Pager[ExpressRoutePortAuthorizationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ExpressRoutePortAuthorizationsClientListResponse]{ More: func(page ExpressRoutePortAuthorizationsClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/expressrouteportauthorizations_client_example_test.go b/sdk/resourcemanager/network/armnetwork/expressrouteportauthorizations_client_example_test.go deleted file mode 100644 index c3be88b07c0f..000000000000 --- a/sdk/resourcemanager/network/armnetwork/expressrouteportauthorizations_client_example_test.go +++ /dev/null @@ -1,106 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRoutePortAuthorizationDelete.json -func ExampleExpressRoutePortAuthorizationsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRoutePortAuthorizationsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "expressRoutePortName", "authorizationName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRoutePortAuthorizationGet.json -func ExampleExpressRoutePortAuthorizationsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRoutePortAuthorizationsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "expressRoutePortName", "authorizationName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRoutePortAuthorizationCreate.json -func ExampleExpressRoutePortAuthorizationsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRoutePortAuthorizationsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "expressRoutePortName", "authorizatinName", armnetwork.ExpressRoutePortAuthorization{ - Properties: &armnetwork.ExpressRoutePortAuthorizationPropertiesFormat{}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRoutePortAuthorizationList.json -func ExampleExpressRoutePortAuthorizationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRoutePortAuthorizationsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", "expressRoutePortName", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/expressrouteports_client.go b/sdk/resourcemanager/network/armnetwork/expressrouteports_client.go index 7d37c7c994f8..c2d95d525d86 100644 --- a/sdk/resourcemanager/network/armnetwork/expressrouteports_client.go +++ b/sdk/resourcemanager/network/armnetwork/expressrouteports_client.go @@ -32,10 +32,10 @@ type ExpressRoutePortsClient struct { } // NewExpressRoutePortsClient creates a new instance of ExpressRoutePortsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewExpressRoutePortsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRoutePortsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewExpressRoutePortsClient(subscriptionID string, credential azcore.TokenCr // BeginCreateOrUpdate - Creates or updates the specified ExpressRoutePort resource. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// expressRoutePortName - The name of the ExpressRoutePort resource. -// parameters - Parameters supplied to the create ExpressRoutePort operation. -// options - ExpressRoutePortsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRoutePortsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - expressRoutePortName - The name of the ExpressRoutePort resource. +// - parameters - Parameters supplied to the create ExpressRoutePort operation. +// - options - ExpressRoutePortsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRoutePortsClient.BeginCreateOrUpdate +// method. func (client *ExpressRoutePortsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters ExpressRoutePort, options *ExpressRoutePortsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExpressRoutePortsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, expressRoutePortName, parameters, options) @@ -80,6 +81,7 @@ func (client *ExpressRoutePortsClient) BeginCreateOrUpdate(ctx context.Context, // CreateOrUpdate - Creates or updates the specified ExpressRoutePort resource. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ExpressRoutePortsClient) createOrUpdate(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters ExpressRoutePort, options *ExpressRoutePortsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, expressRoutePortName, parameters, options) @@ -124,11 +126,12 @@ func (client *ExpressRoutePortsClient) createOrUpdateCreateRequest(ctx context.C // BeginDelete - Deletes the specified ExpressRoutePort resource. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// expressRoutePortName - The name of the ExpressRoutePort resource. -// options - ExpressRoutePortsClientBeginDeleteOptions contains the optional parameters for the ExpressRoutePortsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - expressRoutePortName - The name of the ExpressRoutePort resource. +// - options - ExpressRoutePortsClientBeginDeleteOptions contains the optional parameters for the ExpressRoutePortsClient.BeginDelete +// method. func (client *ExpressRoutePortsClient) BeginDelete(ctx context.Context, resourceGroupName string, expressRoutePortName string, options *ExpressRoutePortsClientBeginDeleteOptions) (*runtime.Poller[ExpressRoutePortsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, expressRoutePortName, options) @@ -145,6 +148,7 @@ func (client *ExpressRoutePortsClient) BeginDelete(ctx context.Context, resource // Delete - Deletes the specified ExpressRoutePort resource. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ExpressRoutePortsClient) deleteOperation(ctx context.Context, resourceGroupName string, expressRoutePortName string, options *ExpressRoutePortsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, expressRoutePortName, options) @@ -189,12 +193,13 @@ func (client *ExpressRoutePortsClient) deleteCreateRequest(ctx context.Context, // GenerateLOA - Generate a letter of authorization for the requested ExpressRoutePort resource. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// expressRoutePortName - The name of ExpressRoutePort. -// request - Request parameters supplied to generate a letter of authorization. -// options - ExpressRoutePortsClientGenerateLOAOptions contains the optional parameters for the ExpressRoutePortsClient.GenerateLOA -// method. +// - resourceGroupName - The name of the resource group. +// - expressRoutePortName - The name of ExpressRoutePort. +// - request - Request parameters supplied to generate a letter of authorization. +// - options - ExpressRoutePortsClientGenerateLOAOptions contains the optional parameters for the ExpressRoutePortsClient.GenerateLOA +// method. func (client *ExpressRoutePortsClient) GenerateLOA(ctx context.Context, resourceGroupName string, expressRoutePortName string, request GenerateExpressRoutePortsLOARequest, options *ExpressRoutePortsClientGenerateLOAOptions) (ExpressRoutePortsClientGenerateLOAResponse, error) { req, err := client.generateLOACreateRequest(ctx, resourceGroupName, expressRoutePortName, request, options) if err != nil { @@ -247,10 +252,11 @@ func (client *ExpressRoutePortsClient) generateLOAHandleResponse(resp *http.Resp // Get - Retrieves the requested ExpressRoutePort resource. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// expressRoutePortName - The name of ExpressRoutePort. -// options - ExpressRoutePortsClientGetOptions contains the optional parameters for the ExpressRoutePortsClient.Get method. +// - resourceGroupName - The name of the resource group. +// - expressRoutePortName - The name of ExpressRoutePort. +// - options - ExpressRoutePortsClientGetOptions contains the optional parameters for the ExpressRoutePortsClient.Get method. func (client *ExpressRoutePortsClient) Get(ctx context.Context, resourceGroupName string, expressRoutePortName string, options *ExpressRoutePortsClientGetOptions) (ExpressRoutePortsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, expressRoutePortName, options) if err != nil { @@ -302,8 +308,10 @@ func (client *ExpressRoutePortsClient) getHandleResponse(resp *http.Response) (E } // NewListPager - List all the ExpressRoutePort resources in the specified subscription. +// // Generated from API version 2022-07-01 -// options - ExpressRoutePortsClientListOptions contains the optional parameters for the ExpressRoutePortsClient.List method. +// - options - ExpressRoutePortsClientListOptions contains the optional parameters for the ExpressRoutePortsClient.NewListPager +// method. func (client *ExpressRoutePortsClient) NewListPager(options *ExpressRoutePortsClientListOptions) *runtime.Pager[ExpressRoutePortsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ExpressRoutePortsClientListResponse]{ More: func(page ExpressRoutePortsClientListResponse) bool { @@ -360,10 +368,11 @@ func (client *ExpressRoutePortsClient) listHandleResponse(resp *http.Response) ( } // NewListByResourceGroupPager - List all the ExpressRoutePort resources in the specified resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - ExpressRoutePortsClientListByResourceGroupOptions contains the optional parameters for the ExpressRoutePortsClient.ListByResourceGroup -// method. +// - resourceGroupName - The name of the resource group. +// - options - ExpressRoutePortsClientListByResourceGroupOptions contains the optional parameters for the ExpressRoutePortsClient.NewListByResourceGroupPager +// method. func (client *ExpressRoutePortsClient) NewListByResourceGroupPager(resourceGroupName string, options *ExpressRoutePortsClientListByResourceGroupOptions) *runtime.Pager[ExpressRoutePortsClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[ExpressRoutePortsClientListByResourceGroupResponse]{ More: func(page ExpressRoutePortsClientListByResourceGroupResponse) bool { @@ -425,12 +434,13 @@ func (client *ExpressRoutePortsClient) listByResourceGroupHandleResponse(resp *h // UpdateTags - Update ExpressRoutePort tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// expressRoutePortName - The name of the ExpressRoutePort resource. -// parameters - Parameters supplied to update ExpressRoutePort resource tags. -// options - ExpressRoutePortsClientUpdateTagsOptions contains the optional parameters for the ExpressRoutePortsClient.UpdateTags -// method. +// - resourceGroupName - The name of the resource group. +// - expressRoutePortName - The name of the ExpressRoutePort resource. +// - parameters - Parameters supplied to update ExpressRoutePort resource tags. +// - options - ExpressRoutePortsClientUpdateTagsOptions contains the optional parameters for the ExpressRoutePortsClient.UpdateTags +// method. func (client *ExpressRoutePortsClient) UpdateTags(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters TagsObject, options *ExpressRoutePortsClientUpdateTagsOptions) (ExpressRoutePortsClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, expressRoutePortName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/expressrouteports_client_example_test.go b/sdk/resourcemanager/network/armnetwork/expressrouteports_client_example_test.go deleted file mode 100644 index 8a713157db6c..000000000000 --- a/sdk/resourcemanager/network/armnetwork/expressrouteports_client_example_test.go +++ /dev/null @@ -1,220 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRoutePortDelete.json -func ExampleExpressRoutePortsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRoutePortsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "portName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRoutePortGet.json -func ExampleExpressRoutePortsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRoutePortsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "portName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRoutePortCreate.json -func ExampleExpressRoutePortsClient_BeginCreateOrUpdate_expressRoutePortCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRoutePortsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "portName", armnetwork.ExpressRoutePort{ - Location: to.Ptr("westus"), - Properties: &armnetwork.ExpressRoutePortPropertiesFormat{ - BandwidthInGbps: to.Ptr[int32](100), - BillingType: to.Ptr(armnetwork.ExpressRoutePortsBillingTypeUnlimitedData), - Encapsulation: to.Ptr(armnetwork.ExpressRoutePortsEncapsulationQinQ), - PeeringLocation: to.Ptr("peeringLocationName"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRoutePortUpdateLink.json -func ExampleExpressRoutePortsClient_BeginCreateOrUpdate_expressRoutePortUpdateLink() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRoutePortsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "portName", armnetwork.ExpressRoutePort{ - Location: to.Ptr("westus"), - Properties: &armnetwork.ExpressRoutePortPropertiesFormat{ - BandwidthInGbps: to.Ptr[int32](100), - BillingType: to.Ptr(armnetwork.ExpressRoutePortsBillingTypeUnlimitedData), - Encapsulation: to.Ptr(armnetwork.ExpressRoutePortsEncapsulationQinQ), - Links: []*armnetwork.ExpressRouteLink{ - { - Name: to.Ptr("link1"), - Properties: &armnetwork.ExpressRouteLinkPropertiesFormat{ - AdminState: to.Ptr(armnetwork.ExpressRouteLinkAdminStateEnabled), - }, - }}, - PeeringLocation: to.Ptr("peeringLocationName"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRoutePortUpdateTags.json -func ExampleExpressRoutePortsClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRoutePortsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, "rg1", "portName", armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRoutePortListByResourceGroup.json -func ExampleExpressRoutePortsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRoutePortsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRoutePortList.json -func ExampleExpressRoutePortsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRoutePortsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/GenerateExpressRoutePortsLOA.json -func ExampleExpressRoutePortsClient_GenerateLOA() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRoutePortsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GenerateLOA(ctx, "rg1", "portName", armnetwork.GenerateExpressRoutePortsLOARequest{ - CustomerName: to.Ptr("customerName"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/expressrouteportslocations_client.go b/sdk/resourcemanager/network/armnetwork/expressrouteportslocations_client.go index 64f0fec80a77..6a7054f3d2c9 100644 --- a/sdk/resourcemanager/network/armnetwork/expressrouteportslocations_client.go +++ b/sdk/resourcemanager/network/armnetwork/expressrouteportslocations_client.go @@ -32,10 +32,10 @@ type ExpressRoutePortsLocationsClient struct { } // NewExpressRoutePortsLocationsClient creates a new instance of ExpressRoutePortsLocationsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewExpressRoutePortsLocationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRoutePortsLocationsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -59,10 +59,11 @@ func NewExpressRoutePortsLocationsClient(subscriptionID string, credential azcor // Get - Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said // peering location. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// locationName - Name of the requested ExpressRoutePort peering location. -// options - ExpressRoutePortsLocationsClientGetOptions contains the optional parameters for the ExpressRoutePortsLocationsClient.Get -// method. +// - locationName - Name of the requested ExpressRoutePort peering location. +// - options - ExpressRoutePortsLocationsClientGetOptions contains the optional parameters for the ExpressRoutePortsLocationsClient.Get +// method. func (client *ExpressRoutePortsLocationsClient) Get(ctx context.Context, locationName string, options *ExpressRoutePortsLocationsClientGetOptions) (ExpressRoutePortsLocationsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, locationName, options) if err != nil { @@ -111,9 +112,10 @@ func (client *ExpressRoutePortsLocationsClient) getHandleResponse(resp *http.Res // NewListPager - Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location. // Available bandwidths can only be obtained when retrieving a specific peering location. +// // Generated from API version 2022-07-01 -// options - ExpressRoutePortsLocationsClientListOptions contains the optional parameters for the ExpressRoutePortsLocationsClient.List -// method. +// - options - ExpressRoutePortsLocationsClientListOptions contains the optional parameters for the ExpressRoutePortsLocationsClient.NewListPager +// method. func (client *ExpressRoutePortsLocationsClient) NewListPager(options *ExpressRoutePortsLocationsClientListOptions) *runtime.Pager[ExpressRoutePortsLocationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ExpressRoutePortsLocationsClientListResponse]{ More: func(page ExpressRoutePortsLocationsClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/expressrouteportslocations_client_example_test.go b/sdk/resourcemanager/network/armnetwork/expressrouteportslocations_client_example_test.go deleted file mode 100644 index 44ba155560f0..000000000000 --- a/sdk/resourcemanager/network/armnetwork/expressrouteportslocations_client_example_test.go +++ /dev/null @@ -1,60 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRoutePortsLocationList.json -func ExampleExpressRoutePortsLocationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRoutePortsLocationsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRoutePortsLocationGet.json -func ExampleExpressRoutePortsLocationsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRoutePortsLocationsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "locationName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/expressrouteproviderportslocation_client.go b/sdk/resourcemanager/network/armnetwork/expressrouteproviderportslocation_client.go index 8ea71af5ffdd..2b6295a8ac92 100644 --- a/sdk/resourcemanager/network/armnetwork/expressrouteproviderportslocation_client.go +++ b/sdk/resourcemanager/network/armnetwork/expressrouteproviderportslocation_client.go @@ -32,10 +32,10 @@ type ExpressRouteProviderPortsLocationClient struct { } // NewExpressRouteProviderPortsLocationClient creates a new instance of ExpressRouteProviderPortsLocationClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewExpressRouteProviderPortsLocationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteProviderPortsLocationClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,9 +58,10 @@ func NewExpressRouteProviderPortsLocationClient(subscriptionID string, credentia // List - Retrieves all the ExpressRouteProviderPorts in a subscription. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// options - ExpressRouteProviderPortsLocationClientListOptions contains the optional parameters for the ExpressRouteProviderPortsLocationClient.List -// method. +// - options - ExpressRouteProviderPortsLocationClientListOptions contains the optional parameters for the ExpressRouteProviderPortsLocationClient.List +// method. func (client *ExpressRouteProviderPortsLocationClient) List(ctx context.Context, options *ExpressRouteProviderPortsLocationClientListOptions) (ExpressRouteProviderPortsLocationClientListResponse, error) { req, err := client.listCreateRequest(ctx, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/expressrouteproviderportslocation_client_example_test.go b/sdk/resourcemanager/network/armnetwork/expressrouteproviderportslocation_client_example_test.go deleted file mode 100644 index 7eed21915204..000000000000 --- a/sdk/resourcemanager/network/armnetwork/expressrouteproviderportslocation_client_example_test.go +++ /dev/null @@ -1,36 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/expressRouteProviderPortList.json -func ExampleExpressRouteProviderPortsLocationClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteProviderPortsLocationClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.List(ctx, &armnetwork.ExpressRouteProviderPortsLocationClientListOptions{Filter: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/expressrouteserviceproviders_client.go b/sdk/resourcemanager/network/armnetwork/expressrouteserviceproviders_client.go index d220fed300c7..37496c7737b7 100644 --- a/sdk/resourcemanager/network/armnetwork/expressrouteserviceproviders_client.go +++ b/sdk/resourcemanager/network/armnetwork/expressrouteserviceproviders_client.go @@ -32,10 +32,10 @@ type ExpressRouteServiceProvidersClient struct { } // NewExpressRouteServiceProvidersClient creates a new instance of ExpressRouteServiceProvidersClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewExpressRouteServiceProvidersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteServiceProvidersClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,9 +57,10 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string, credential azc } // NewListPager - Gets all the available express route service providers. +// // Generated from API version 2022-07-01 -// options - ExpressRouteServiceProvidersClientListOptions contains the optional parameters for the ExpressRouteServiceProvidersClient.List -// method. +// - options - ExpressRouteServiceProvidersClientListOptions contains the optional parameters for the ExpressRouteServiceProvidersClient.NewListPager +// method. func (client *ExpressRouteServiceProvidersClient) NewListPager(options *ExpressRouteServiceProvidersClientListOptions) *runtime.Pager[ExpressRouteServiceProvidersClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ExpressRouteServiceProvidersClientListResponse]{ More: func(page ExpressRouteServiceProvidersClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/expressrouteserviceproviders_client_example_test.go b/sdk/resourcemanager/network/armnetwork/expressrouteserviceproviders_client_example_test.go deleted file mode 100644 index 09bcdab035e6..000000000000 --- a/sdk/resourcemanager/network/armnetwork/expressrouteserviceproviders_client_example_test.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ExpressRouteProviderList.json -func ExampleExpressRouteServiceProvidersClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewExpressRouteServiceProvidersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/firewallpolicies_client.go b/sdk/resourcemanager/network/armnetwork/firewallpolicies_client.go index ac1051e69726..c344dafd4987 100644 --- a/sdk/resourcemanager/network/armnetwork/firewallpolicies_client.go +++ b/sdk/resourcemanager/network/armnetwork/firewallpolicies_client.go @@ -32,10 +32,10 @@ type FirewallPoliciesClient struct { } // NewFirewallPoliciesClient creates a new instance of FirewallPoliciesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewFirewallPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallPoliciesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewFirewallPoliciesClient(subscriptionID string, credential azcore.TokenCre // BeginCreateOrUpdate - Creates or updates the specified Firewall Policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// firewallPolicyName - The name of the Firewall Policy. -// parameters - Parameters supplied to the create or update Firewall Policy operation. -// options - FirewallPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the FirewallPoliciesClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - parameters - Parameters supplied to the create or update Firewall Policy operation. +// - options - FirewallPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the FirewallPoliciesClient.BeginCreateOrUpdate +// method. func (client *FirewallPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters FirewallPolicy, options *FirewallPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[FirewallPoliciesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, firewallPolicyName, parameters, options) @@ -80,6 +81,7 @@ func (client *FirewallPoliciesClient) BeginCreateOrUpdate(ctx context.Context, r // CreateOrUpdate - Creates or updates the specified Firewall Policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *FirewallPoliciesClient) createOrUpdate(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters FirewallPolicy, options *FirewallPoliciesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, firewallPolicyName, parameters, options) @@ -124,11 +126,12 @@ func (client *FirewallPoliciesClient) createOrUpdateCreateRequest(ctx context.Co // BeginDelete - Deletes the specified Firewall Policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// firewallPolicyName - The name of the Firewall Policy. -// options - FirewallPoliciesClientBeginDeleteOptions contains the optional parameters for the FirewallPoliciesClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - options - FirewallPoliciesClientBeginDeleteOptions contains the optional parameters for the FirewallPoliciesClient.BeginDelete +// method. func (client *FirewallPoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPoliciesClientBeginDeleteOptions) (*runtime.Poller[FirewallPoliciesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, firewallPolicyName, options) @@ -145,6 +148,7 @@ func (client *FirewallPoliciesClient) BeginDelete(ctx context.Context, resourceG // Delete - Deletes the specified Firewall Policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *FirewallPoliciesClient) deleteOperation(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPoliciesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, firewallPolicyName, options) @@ -189,10 +193,11 @@ func (client *FirewallPoliciesClient) deleteCreateRequest(ctx context.Context, r // Get - Gets the specified Firewall Policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// firewallPolicyName - The name of the Firewall Policy. -// options - FirewallPoliciesClientGetOptions contains the optional parameters for the FirewallPoliciesClient.Get method. +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - options - FirewallPoliciesClientGetOptions contains the optional parameters for the FirewallPoliciesClient.Get method. func (client *FirewallPoliciesClient) Get(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPoliciesClientGetOptions) (FirewallPoliciesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, firewallPolicyName, options) if err != nil { @@ -247,9 +252,11 @@ func (client *FirewallPoliciesClient) getHandleResponse(resp *http.Response) (Fi } // NewListPager - Lists all Firewall Policies in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - FirewallPoliciesClientListOptions contains the optional parameters for the FirewallPoliciesClient.List method. +// - resourceGroupName - The name of the resource group. +// - options - FirewallPoliciesClientListOptions contains the optional parameters for the FirewallPoliciesClient.NewListPager +// method. func (client *FirewallPoliciesClient) NewListPager(resourceGroupName string, options *FirewallPoliciesClientListOptions) *runtime.Pager[FirewallPoliciesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[FirewallPoliciesClientListResponse]{ More: func(page FirewallPoliciesClientListResponse) bool { @@ -310,9 +317,10 @@ func (client *FirewallPoliciesClient) listHandleResponse(resp *http.Response) (F } // NewListAllPager - Gets all the Firewall Policies in a subscription. +// // Generated from API version 2022-07-01 -// options - FirewallPoliciesClientListAllOptions contains the optional parameters for the FirewallPoliciesClient.ListAll -// method. +// - options - FirewallPoliciesClientListAllOptions contains the optional parameters for the FirewallPoliciesClient.NewListAllPager +// method. func (client *FirewallPoliciesClient) NewListAllPager(options *FirewallPoliciesClientListAllOptions) *runtime.Pager[FirewallPoliciesClientListAllResponse] { return runtime.NewPager(runtime.PagingHandler[FirewallPoliciesClientListAllResponse]{ More: func(page FirewallPoliciesClientListAllResponse) bool { @@ -370,12 +378,13 @@ func (client *FirewallPoliciesClient) listAllHandleResponse(resp *http.Response) // UpdateTags - Updates tags of a Azure Firewall Policy resource. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// firewallPolicyName - The name of the Firewall Policy. -// parameters - Parameters supplied to update Azure Firewall Policy tags. -// options - FirewallPoliciesClientUpdateTagsOptions contains the optional parameters for the FirewallPoliciesClient.UpdateTags -// method. +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - parameters - Parameters supplied to update Azure Firewall Policy tags. +// - options - FirewallPoliciesClientUpdateTagsOptions contains the optional parameters for the FirewallPoliciesClient.UpdateTags +// method. func (client *FirewallPoliciesClient) UpdateTags(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters TagsObject, options *FirewallPoliciesClientUpdateTagsOptions) (FirewallPoliciesClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, firewallPolicyName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/firewallpolicies_client_example_test.go b/sdk/resourcemanager/network/armnetwork/firewallpolicies_client_example_test.go deleted file mode 100644 index aa3398f4849f..000000000000 --- a/sdk/resourcemanager/network/armnetwork/firewallpolicies_client_example_test.go +++ /dev/null @@ -1,233 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/FirewallPolicyDelete.json -func ExampleFirewallPoliciesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewFirewallPoliciesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "firewallPolicy", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/FirewallPolicyGet.json -func ExampleFirewallPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewFirewallPoliciesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "firewallPolicy", &armnetwork.FirewallPoliciesClientGetOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/FirewallPolicyPut.json -func ExampleFirewallPoliciesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewFirewallPoliciesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "firewallPolicy", armnetwork.FirewallPolicy{ - Location: to.Ptr("West US"), - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - }, - Properties: &armnetwork.FirewallPolicyPropertiesFormat{ - DNSSettings: &armnetwork.DNSSettings{ - EnableProxy: to.Ptr(true), - RequireProxyForNetworkRules: to.Ptr(false), - Servers: []*string{ - to.Ptr("30.3.4.5")}, - }, - Insights: &armnetwork.FirewallPolicyInsights{ - IsEnabled: to.Ptr(true), - LogAnalyticsResources: &armnetwork.FirewallPolicyLogAnalyticsResources{ - DefaultWorkspaceID: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/defaultWorkspace"), - }, - Workspaces: []*armnetwork.FirewallPolicyLogAnalyticsWorkspace{ - { - Region: to.Ptr("westus"), - WorkspaceID: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace1"), - }, - }, - { - Region: to.Ptr("eastus"), - WorkspaceID: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/microsoft.operationalinsights/workspaces/workspace2"), - }, - }}, - }, - RetentionDays: to.Ptr[int32](100), - }, - IntrusionDetection: &armnetwork.FirewallPolicyIntrusionDetection{ - Configuration: &armnetwork.FirewallPolicyIntrusionDetectionConfiguration{ - BypassTrafficSettings: []*armnetwork.FirewallPolicyIntrusionDetectionBypassTrafficSpecifications{ - { - Name: to.Ptr("bypassRule1"), - Description: to.Ptr("Rule 1"), - DestinationAddresses: []*string{ - to.Ptr("5.6.7.8")}, - DestinationPorts: []*string{ - to.Ptr("*")}, - SourceAddresses: []*string{ - to.Ptr("1.2.3.4")}, - Protocol: to.Ptr(armnetwork.FirewallPolicyIntrusionDetectionProtocolTCP), - }}, - SignatureOverrides: []*armnetwork.FirewallPolicyIntrusionDetectionSignatureSpecification{ - { - ID: to.Ptr("2525004"), - Mode: to.Ptr(armnetwork.FirewallPolicyIntrusionDetectionStateTypeDeny), - }}, - }, - Mode: to.Ptr(armnetwork.FirewallPolicyIntrusionDetectionStateTypeAlert), - }, - SKU: &armnetwork.FirewallPolicySKU{ - Tier: to.Ptr(armnetwork.FirewallPolicySKUTierPremium), - }, - Snat: &armnetwork.FirewallPolicySNAT{ - PrivateRanges: []*string{ - to.Ptr("IANAPrivateRanges")}, - }, - SQL: &armnetwork.FirewallPolicySQL{ - AllowSQLRedirect: to.Ptr(true), - }, - ThreatIntelMode: to.Ptr(armnetwork.AzureFirewallThreatIntelModeAlert), - ThreatIntelWhitelist: &armnetwork.FirewallPolicyThreatIntelWhitelist{ - Fqdns: []*string{ - to.Ptr("*.microsoft.com")}, - IPAddresses: []*string{ - to.Ptr("20.3.4.5")}, - }, - TransportSecurity: &armnetwork.FirewallPolicyTransportSecurity{ - CertificateAuthority: &armnetwork.FirewallPolicyCertificateAuthority{ - Name: to.Ptr("clientcert"), - KeyVaultSecretID: to.Ptr("https://kv/secret"), - }, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/FirewallPolicyPatch.json -func ExampleFirewallPoliciesClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewFirewallPoliciesClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, "myResourceGroup", "firewallPolicy", armnetwork.TagsObject{ - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - "key2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/FirewallPolicyListByResourceGroup.json -func ExampleFirewallPoliciesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewFirewallPoliciesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/FirewallPolicyListBySubscription.json -func ExampleFirewallPoliciesClient_NewListAllPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewFirewallPoliciesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListAllPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/firewallpolicyidpssignatures_client.go b/sdk/resourcemanager/network/armnetwork/firewallpolicyidpssignatures_client.go index 3497eaee1583..8b85f75f5524 100644 --- a/sdk/resourcemanager/network/armnetwork/firewallpolicyidpssignatures_client.go +++ b/sdk/resourcemanager/network/armnetwork/firewallpolicyidpssignatures_client.go @@ -32,10 +32,10 @@ type FirewallPolicyIdpsSignaturesClient struct { } // NewFirewallPolicyIdpsSignaturesClient creates a new instance of FirewallPolicyIdpsSignaturesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewFirewallPolicyIdpsSignaturesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallPolicyIdpsSignaturesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,11 +58,12 @@ func NewFirewallPolicyIdpsSignaturesClient(subscriptionID string, credential azc // List - Retrieves the current status of IDPS signatures for the relevant policy // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// firewallPolicyName - The name of the Firewall Policy. -// options - FirewallPolicyIdpsSignaturesClientListOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - options - FirewallPolicyIdpsSignaturesClientListOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesClient.List +// method. func (client *FirewallPolicyIdpsSignaturesClient) List(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters IDPSQueryObject, options *FirewallPolicyIdpsSignaturesClientListOptions) (FirewallPolicyIdpsSignaturesClientListResponse, error) { req, err := client.listCreateRequest(ctx, resourceGroupName, firewallPolicyName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/firewallpolicyidpssignatures_client_example_test.go b/sdk/resourcemanager/network/armnetwork/firewallpolicyidpssignatures_client_example_test.go deleted file mode 100644 index e76f62ab7ae3..000000000000 --- a/sdk/resourcemanager/network/armnetwork/firewallpolicyidpssignatures_client_example_test.go +++ /dev/null @@ -1,51 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/FirewallPolicyQuerySignatureOverrides.json -func ExampleFirewallPolicyIdpsSignaturesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewFirewallPolicyIdpsSignaturesClient("e747cc13-97d4-4a79-b463-42d7f4e558f2", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.List(ctx, "rg1", "firewallPolicy", armnetwork.IDPSQueryObject{ - Filters: []*armnetwork.FilterItems{ - { - Field: to.Ptr("Mode"), - Values: []*string{ - to.Ptr("Deny")}, - }}, - OrderBy: &armnetwork.OrderBy{ - Field: to.Ptr("severity"), - Order: to.Ptr(armnetwork.FirewallPolicyIDPSQuerySortOrderAscending), - }, - ResultsPerPage: to.Ptr[int32](20), - Search: to.Ptr(""), - Skip: to.Ptr[int32](0), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/firewallpolicyidpssignaturesfiltervalues_client.go b/sdk/resourcemanager/network/armnetwork/firewallpolicyidpssignaturesfiltervalues_client.go index e12097bbb5ad..e8e215a0d57b 100644 --- a/sdk/resourcemanager/network/armnetwork/firewallpolicyidpssignaturesfiltervalues_client.go +++ b/sdk/resourcemanager/network/armnetwork/firewallpolicyidpssignaturesfiltervalues_client.go @@ -32,10 +32,10 @@ type FirewallPolicyIdpsSignaturesFilterValuesClient struct { } // NewFirewallPolicyIdpsSignaturesFilterValuesClient creates a new instance of FirewallPolicyIdpsSignaturesFilterValuesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewFirewallPolicyIdpsSignaturesFilterValuesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallPolicyIdpsSignaturesFilterValuesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,11 +58,12 @@ func NewFirewallPolicyIdpsSignaturesFilterValuesClient(subscriptionID string, cr // List - Retrieves the current filter values for the signatures overrides // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// firewallPolicyName - The name of the Firewall Policy. -// options - FirewallPolicyIdpsSignaturesFilterValuesClientListOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesFilterValuesClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - options - FirewallPolicyIdpsSignaturesFilterValuesClientListOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesFilterValuesClient.List +// method. func (client *FirewallPolicyIdpsSignaturesFilterValuesClient) List(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters SignatureOverridesFilterValuesQuery, options *FirewallPolicyIdpsSignaturesFilterValuesClientListOptions) (FirewallPolicyIdpsSignaturesFilterValuesClientListResponse, error) { req, err := client.listCreateRequest(ctx, resourceGroupName, firewallPolicyName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/firewallpolicyidpssignaturesfiltervalues_client_example_test.go b/sdk/resourcemanager/network/armnetwork/firewallpolicyidpssignaturesfiltervalues_client_example_test.go deleted file mode 100644 index 157ca009ac1e..000000000000 --- a/sdk/resourcemanager/network/armnetwork/firewallpolicyidpssignaturesfiltervalues_client_example_test.go +++ /dev/null @@ -1,39 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/FirewallPolicyQuerySignatureOverridesFilterValues.json -func ExampleFirewallPolicyIdpsSignaturesFilterValuesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewFirewallPolicyIdpsSignaturesFilterValuesClient("e747cc13-97d4-4a79-b463-42d7f4e558f2", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.List(ctx, "rg1", "firewallPolicy", armnetwork.SignatureOverridesFilterValuesQuery{ - FilterName: to.Ptr("severity"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/firewallpolicyidpssignaturesoverrides_client.go b/sdk/resourcemanager/network/armnetwork/firewallpolicyidpssignaturesoverrides_client.go index 49cd19ea8b5e..0c9e61a1a3df 100644 --- a/sdk/resourcemanager/network/armnetwork/firewallpolicyidpssignaturesoverrides_client.go +++ b/sdk/resourcemanager/network/armnetwork/firewallpolicyidpssignaturesoverrides_client.go @@ -32,10 +32,10 @@ type FirewallPolicyIdpsSignaturesOverridesClient struct { } // NewFirewallPolicyIdpsSignaturesOverridesClient creates a new instance of FirewallPolicyIdpsSignaturesOverridesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewFirewallPolicyIdpsSignaturesOverridesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallPolicyIdpsSignaturesOverridesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,11 +58,12 @@ func NewFirewallPolicyIdpsSignaturesOverridesClient(subscriptionID string, crede // Get - Returns all signatures overrides for a specific policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// firewallPolicyName - The name of the Firewall Policy. -// options - FirewallPolicyIdpsSignaturesOverridesClientGetOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesOverridesClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - options - FirewallPolicyIdpsSignaturesOverridesClientGetOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesOverridesClient.Get +// method. func (client *FirewallPolicyIdpsSignaturesOverridesClient) Get(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPolicyIdpsSignaturesOverridesClientGetOptions) (FirewallPolicyIdpsSignaturesOverridesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, firewallPolicyName, options) if err != nil { @@ -115,11 +116,12 @@ func (client *FirewallPolicyIdpsSignaturesOverridesClient) getHandleResponse(res // List - Returns all signatures overrides objects for a specific policy as a list containing a single value. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// firewallPolicyName - The name of the Firewall Policy. -// options - FirewallPolicyIdpsSignaturesOverridesClientListOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesOverridesClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - options - FirewallPolicyIdpsSignaturesOverridesClientListOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesOverridesClient.List +// method. func (client *FirewallPolicyIdpsSignaturesOverridesClient) List(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPolicyIdpsSignaturesOverridesClientListOptions) (FirewallPolicyIdpsSignaturesOverridesClientListResponse, error) { req, err := client.listCreateRequest(ctx, resourceGroupName, firewallPolicyName, options) if err != nil { @@ -172,12 +174,13 @@ func (client *FirewallPolicyIdpsSignaturesOverridesClient) listHandleResponse(re // Patch - Will update the status of policy's signature overrides for IDPS // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// firewallPolicyName - The name of the Firewall Policy. -// parameters - Will contain all properties of the object to put -// options - FirewallPolicyIdpsSignaturesOverridesClientPatchOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesOverridesClient.Patch -// method. +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - parameters - Will contain all properties of the object to put +// - options - FirewallPolicyIdpsSignaturesOverridesClientPatchOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesOverridesClient.Patch +// method. func (client *FirewallPolicyIdpsSignaturesOverridesClient) Patch(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters SignaturesOverrides, options *FirewallPolicyIdpsSignaturesOverridesClientPatchOptions) (FirewallPolicyIdpsSignaturesOverridesClientPatchResponse, error) { req, err := client.patchCreateRequest(ctx, resourceGroupName, firewallPolicyName, parameters, options) if err != nil { @@ -230,12 +233,13 @@ func (client *FirewallPolicyIdpsSignaturesOverridesClient) patchHandleResponse(r // Put - Will override/create a new signature overrides for the policy's IDPS // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// firewallPolicyName - The name of the Firewall Policy. -// parameters - Will contain all properties of the object to put -// options - FirewallPolicyIdpsSignaturesOverridesClientPutOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesOverridesClient.Put -// method. +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - parameters - Will contain all properties of the object to put +// - options - FirewallPolicyIdpsSignaturesOverridesClientPutOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesOverridesClient.Put +// method. func (client *FirewallPolicyIdpsSignaturesOverridesClient) Put(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters SignaturesOverrides, options *FirewallPolicyIdpsSignaturesOverridesClientPutOptions) (FirewallPolicyIdpsSignaturesOverridesClientPutResponse, error) { req, err := client.putCreateRequest(ctx, resourceGroupName, firewallPolicyName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/firewallpolicyidpssignaturesoverrides_client_example_test.go b/sdk/resourcemanager/network/armnetwork/firewallpolicyidpssignaturesoverrides_client_example_test.go deleted file mode 100644 index 2cd66edba224..000000000000 --- a/sdk/resourcemanager/network/armnetwork/firewallpolicyidpssignaturesoverrides_client_example_test.go +++ /dev/null @@ -1,114 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/FirewallPolicySignatureOverridesPatch.json -func ExampleFirewallPolicyIdpsSignaturesOverridesClient_Patch() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewFirewallPolicyIdpsSignaturesOverridesClient("e747cc13-97d4-4a79-b463-42d7f4e558f2", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Patch(ctx, "rg1", "firewallPolicy", armnetwork.SignaturesOverrides{ - Name: to.Ptr("default"), - Type: to.Ptr("Microsoft.Network/firewallPolicies/signatureOverrides"), - ID: to.Ptr("/subscriptions/e747cc13-97d4-4a79-b463-42d7f4e558f2/resourceGroups/rg1/providers/Microsoft.Network/firewallPolicies/firewallPolicy/signatureOverrides/default"), - Properties: &armnetwork.SignaturesOverridesProperties{ - Signatures: map[string]*string{ - "2000105": to.Ptr("Off"), - "2000106": to.Ptr("Deny"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/FirewallPolicySignatureOverridesPut.json -func ExampleFirewallPolicyIdpsSignaturesOverridesClient_Put() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewFirewallPolicyIdpsSignaturesOverridesClient("e747cc13-97d4-4a79-b463-42d7f4e558f2", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Put(ctx, "rg1", "firewallPolicy", armnetwork.SignaturesOverrides{ - Name: to.Ptr("default"), - Type: to.Ptr("Microsoft.Network/firewallPolicies/signatureOverrides"), - ID: to.Ptr("/subscriptions/e747cc13-97d4-4a79-b463-42d7f4e558f2/resourceGroups/rg1/providers/Microsoft.Network/firewallPolicies/firewallPolicy/signatureOverrides/default"), - Properties: &armnetwork.SignaturesOverridesProperties{ - Signatures: map[string]*string{ - "2000105": to.Ptr("Off"), - "2000106": to.Ptr("Deny"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/FirewallPolicySignatureOverridesGet.json -func ExampleFirewallPolicyIdpsSignaturesOverridesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewFirewallPolicyIdpsSignaturesOverridesClient("e747cc13-97d4-4a79-b463-42d7f4e558f2", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "firewallPolicy", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/FirewallPolicySignatureOverridesList.json -func ExampleFirewallPolicyIdpsSignaturesOverridesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewFirewallPolicyIdpsSignaturesOverridesClient("e747cc13-97d4-4a79-b463-42d7f4e558f2", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.List(ctx, "rg1", "firewallPolicy", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/firewallpolicyrulecollectiongroups_client.go b/sdk/resourcemanager/network/armnetwork/firewallpolicyrulecollectiongroups_client.go index d1e5986816a3..37200d108de9 100644 --- a/sdk/resourcemanager/network/armnetwork/firewallpolicyrulecollectiongroups_client.go +++ b/sdk/resourcemanager/network/armnetwork/firewallpolicyrulecollectiongroups_client.go @@ -32,10 +32,10 @@ type FirewallPolicyRuleCollectionGroupsClient struct { } // NewFirewallPolicyRuleCollectionGroupsClient creates a new instance of FirewallPolicyRuleCollectionGroupsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewFirewallPolicyRuleCollectionGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallPolicyRuleCollectionGroupsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewFirewallPolicyRuleCollectionGroupsClient(subscriptionID string, credenti // BeginCreateOrUpdate - Creates or updates the specified FirewallPolicyRuleCollectionGroup. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// firewallPolicyName - The name of the Firewall Policy. -// ruleCollectionGroupName - The name of the FirewallPolicyRuleCollectionGroup. -// parameters - Parameters supplied to the create or update FirewallPolicyRuleCollectionGroup operation. -// options - FirewallPolicyRuleCollectionGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - ruleCollectionGroupName - The name of the FirewallPolicyRuleCollectionGroup. +// - parameters - Parameters supplied to the create or update FirewallPolicyRuleCollectionGroup operation. +// - options - FirewallPolicyRuleCollectionGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.BeginCreateOrUpdate +// method. func (client *FirewallPolicyRuleCollectionGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, parameters FirewallPolicyRuleCollectionGroup, options *FirewallPolicyRuleCollectionGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, firewallPolicyName, ruleCollectionGroupName, parameters, options) @@ -81,6 +82,7 @@ func (client *FirewallPolicyRuleCollectionGroupsClient) BeginCreateOrUpdate(ctx // CreateOrUpdate - Creates or updates the specified FirewallPolicyRuleCollectionGroup. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *FirewallPolicyRuleCollectionGroupsClient) createOrUpdate(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, parameters FirewallPolicyRuleCollectionGroup, options *FirewallPolicyRuleCollectionGroupsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, firewallPolicyName, ruleCollectionGroupName, parameters, options) @@ -129,12 +131,13 @@ func (client *FirewallPolicyRuleCollectionGroupsClient) createOrUpdateCreateRequ // BeginDelete - Deletes the specified FirewallPolicyRuleCollectionGroup. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// firewallPolicyName - The name of the Firewall Policy. -// ruleCollectionGroupName - The name of the FirewallPolicyRuleCollectionGroup. -// options - FirewallPolicyRuleCollectionGroupsClientBeginDeleteOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - ruleCollectionGroupName - The name of the FirewallPolicyRuleCollectionGroup. +// - options - FirewallPolicyRuleCollectionGroupsClientBeginDeleteOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.BeginDelete +// method. func (client *FirewallPolicyRuleCollectionGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, options *FirewallPolicyRuleCollectionGroupsClientBeginDeleteOptions) (*runtime.Poller[FirewallPolicyRuleCollectionGroupsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, firewallPolicyName, ruleCollectionGroupName, options) @@ -151,6 +154,7 @@ func (client *FirewallPolicyRuleCollectionGroupsClient) BeginDelete(ctx context. // Delete - Deletes the specified FirewallPolicyRuleCollectionGroup. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *FirewallPolicyRuleCollectionGroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, options *FirewallPolicyRuleCollectionGroupsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, firewallPolicyName, ruleCollectionGroupName, options) @@ -199,12 +203,13 @@ func (client *FirewallPolicyRuleCollectionGroupsClient) deleteCreateRequest(ctx // Get - Gets the specified FirewallPolicyRuleCollectionGroup. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// firewallPolicyName - The name of the Firewall Policy. -// ruleCollectionGroupName - The name of the FirewallPolicyRuleCollectionGroup. -// options - FirewallPolicyRuleCollectionGroupsClientGetOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - ruleCollectionGroupName - The name of the FirewallPolicyRuleCollectionGroup. +// - options - FirewallPolicyRuleCollectionGroupsClientGetOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.Get +// method. func (client *FirewallPolicyRuleCollectionGroupsClient) Get(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, options *FirewallPolicyRuleCollectionGroupsClientGetOptions) (FirewallPolicyRuleCollectionGroupsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, firewallPolicyName, ruleCollectionGroupName, options) if err != nil { @@ -260,11 +265,12 @@ func (client *FirewallPolicyRuleCollectionGroupsClient) getHandleResponse(resp * } // NewListPager - Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// firewallPolicyName - The name of the Firewall Policy. -// options - FirewallPolicyRuleCollectionGroupsClientListOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - firewallPolicyName - The name of the Firewall Policy. +// - options - FirewallPolicyRuleCollectionGroupsClientListOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.NewListPager +// method. func (client *FirewallPolicyRuleCollectionGroupsClient) NewListPager(resourceGroupName string, firewallPolicyName string, options *FirewallPolicyRuleCollectionGroupsClientListOptions) *runtime.Pager[FirewallPolicyRuleCollectionGroupsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[FirewallPolicyRuleCollectionGroupsClientListResponse]{ More: func(page FirewallPolicyRuleCollectionGroupsClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/firewallpolicyrulecollectiongroups_client_example_test.go b/sdk/resourcemanager/network/armnetwork/firewallpolicyrulecollectiongroups_client_example_test.go deleted file mode 100644 index f1066b48b184..000000000000 --- a/sdk/resourcemanager/network/armnetwork/firewallpolicyrulecollectiongroups_client_example_test.go +++ /dev/null @@ -1,388 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/FirewallPolicyRuleCollectionGroupDelete.json -func ExampleFirewallPolicyRuleCollectionGroupsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewFirewallPolicyRuleCollectionGroupsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "firewallPolicy", "ruleCollectionGroup1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json -func ExampleFirewallPolicyRuleCollectionGroupsClient_Get_getFirewallPolicyNatRuleCollectionGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewFirewallPolicyRuleCollectionGroupsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "firewallPolicy", "ruleCollectionGroup1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/FirewallPolicyRuleCollectionGroupGet.json -func ExampleFirewallPolicyRuleCollectionGroupsClient_Get_getFirewallPolicyRuleCollectionGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewFirewallPolicyRuleCollectionGroupsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "firewallPolicy", "ruleCollectionGroup1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json -func ExampleFirewallPolicyRuleCollectionGroupsClient_Get_getFirewallPolicyRuleCollectionGroupWithIpGroups() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewFirewallPolicyRuleCollectionGroupsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "firewallPolicy", "ruleGroup1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json -func ExampleFirewallPolicyRuleCollectionGroupsClient_Get_getFirewallPolicyRuleCollectionGroupWithWebCategories() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewFirewallPolicyRuleCollectionGroupsClient("e747cc13-97d4-4a79-b463-42d7f4e558f2", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "firewallPolicy", "ruleCollectionGroup1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json -func ExampleFirewallPolicyRuleCollectionGroupsClient_BeginCreateOrUpdate_createFirewallPolicyNatRuleCollectionGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewFirewallPolicyRuleCollectionGroupsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "firewallPolicy", "ruleCollectionGroup1", armnetwork.FirewallPolicyRuleCollectionGroup{ - Properties: &armnetwork.FirewallPolicyRuleCollectionGroupProperties{ - Priority: to.Ptr[int32](100), - RuleCollections: []armnetwork.FirewallPolicyRuleCollectionClassification{ - &armnetwork.FirewallPolicyNatRuleCollection{ - Name: to.Ptr("Example-Nat-Rule-Collection"), - Priority: to.Ptr[int32](100), - RuleCollectionType: to.Ptr(armnetwork.FirewallPolicyRuleCollectionTypeFirewallPolicyNatRuleCollection), - Action: &armnetwork.FirewallPolicyNatRuleCollectionAction{ - Type: to.Ptr(armnetwork.FirewallPolicyNatRuleCollectionActionTypeDNAT), - }, - Rules: []armnetwork.FirewallPolicyRuleClassification{ - &armnetwork.NatRule{ - Name: to.Ptr("nat-rule1"), - RuleType: to.Ptr(armnetwork.FirewallPolicyRuleTypeNatRule), - DestinationAddresses: []*string{ - to.Ptr("152.23.32.23")}, - DestinationPorts: []*string{ - to.Ptr("8080")}, - IPProtocols: []*armnetwork.FirewallPolicyRuleNetworkProtocol{ - to.Ptr(armnetwork.FirewallPolicyRuleNetworkProtocolTCP), - to.Ptr(armnetwork.FirewallPolicyRuleNetworkProtocolUDP)}, - SourceAddresses: []*string{ - to.Ptr("2.2.2.2")}, - SourceIPGroups: []*string{}, - TranslatedFqdn: to.Ptr("internalhttp.server.net"), - TranslatedPort: to.Ptr("8080"), - }}, - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/FirewallPolicyRuleCollectionGroupPut.json -func ExampleFirewallPolicyRuleCollectionGroupsClient_BeginCreateOrUpdate_createFirewallPolicyRuleCollectionGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewFirewallPolicyRuleCollectionGroupsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "firewallPolicy", "ruleCollectionGroup1", armnetwork.FirewallPolicyRuleCollectionGroup{ - Properties: &armnetwork.FirewallPolicyRuleCollectionGroupProperties{ - Priority: to.Ptr[int32](100), - RuleCollections: []armnetwork.FirewallPolicyRuleCollectionClassification{ - &armnetwork.FirewallPolicyFilterRuleCollection{ - Name: to.Ptr("Example-Filter-Rule-Collection"), - Priority: to.Ptr[int32](100), - RuleCollectionType: to.Ptr(armnetwork.FirewallPolicyRuleCollectionTypeFirewallPolicyFilterRuleCollection), - Action: &armnetwork.FirewallPolicyFilterRuleCollectionAction{ - Type: to.Ptr(armnetwork.FirewallPolicyFilterRuleCollectionActionTypeDeny), - }, - Rules: []armnetwork.FirewallPolicyRuleClassification{ - &armnetwork.Rule{ - Name: to.Ptr("network-rule1"), - RuleType: to.Ptr(armnetwork.FirewallPolicyRuleTypeNetworkRule), - DestinationAddresses: []*string{ - to.Ptr("*")}, - DestinationPorts: []*string{ - to.Ptr("*")}, - IPProtocols: []*armnetwork.FirewallPolicyRuleNetworkProtocol{ - to.Ptr(armnetwork.FirewallPolicyRuleNetworkProtocolTCP)}, - SourceAddresses: []*string{ - to.Ptr("10.1.25.0/24")}, - }}, - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsPut.json -func ExampleFirewallPolicyRuleCollectionGroupsClient_BeginCreateOrUpdate_createFirewallPolicyRuleCollectionGroupWithIpGroups() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewFirewallPolicyRuleCollectionGroupsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "firewallPolicy", "ruleCollectionGroup1", armnetwork.FirewallPolicyRuleCollectionGroup{ - Properties: &armnetwork.FirewallPolicyRuleCollectionGroupProperties{ - Priority: to.Ptr[int32](110), - RuleCollections: []armnetwork.FirewallPolicyRuleCollectionClassification{ - &armnetwork.FirewallPolicyFilterRuleCollection{ - Name: to.Ptr("Example-Filter-Rule-Collection"), - RuleCollectionType: to.Ptr(armnetwork.FirewallPolicyRuleCollectionTypeFirewallPolicyFilterRuleCollection), - Action: &armnetwork.FirewallPolicyFilterRuleCollectionAction{ - Type: to.Ptr(armnetwork.FirewallPolicyFilterRuleCollectionActionTypeDeny), - }, - Rules: []armnetwork.FirewallPolicyRuleClassification{ - &armnetwork.Rule{ - Name: to.Ptr("network-1"), - RuleType: to.Ptr(armnetwork.FirewallPolicyRuleTypeNetworkRule), - DestinationIPGroups: []*string{ - to.Ptr("/subscriptions/subid/providers/Microsoft.Network/resourceGroup/rg1/ipGroups/ipGroups2")}, - DestinationPorts: []*string{ - to.Ptr("*")}, - IPProtocols: []*armnetwork.FirewallPolicyRuleNetworkProtocol{ - to.Ptr(armnetwork.FirewallPolicyRuleNetworkProtocolTCP)}, - SourceIPGroups: []*string{ - to.Ptr("/subscriptions/subid/providers/Microsoft.Network/resourceGroup/rg1/ipGroups/ipGroups1")}, - }}, - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesPut.json -func ExampleFirewallPolicyRuleCollectionGroupsClient_BeginCreateOrUpdate_createFirewallPolicyRuleCollectionGroupWithWebCategories() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewFirewallPolicyRuleCollectionGroupsClient("e747cc13-97d4-4a79-b463-42d7f4e558f2", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "firewallPolicy", "ruleCollectionGroup1", armnetwork.FirewallPolicyRuleCollectionGroup{ - Properties: &armnetwork.FirewallPolicyRuleCollectionGroupProperties{ - Priority: to.Ptr[int32](110), - RuleCollections: []armnetwork.FirewallPolicyRuleCollectionClassification{ - &armnetwork.FirewallPolicyFilterRuleCollection{ - Name: to.Ptr("Example-Filter-Rule-Collection"), - RuleCollectionType: to.Ptr(armnetwork.FirewallPolicyRuleCollectionTypeFirewallPolicyFilterRuleCollection), - Action: &armnetwork.FirewallPolicyFilterRuleCollectionAction{ - Type: to.Ptr(armnetwork.FirewallPolicyFilterRuleCollectionActionTypeDeny), - }, - Rules: []armnetwork.FirewallPolicyRuleClassification{ - &armnetwork.ApplicationRule{ - Name: to.Ptr("rule1"), - Description: to.Ptr("Deny inbound rule"), - RuleType: to.Ptr(armnetwork.FirewallPolicyRuleTypeApplicationRule), - Protocols: []*armnetwork.FirewallPolicyRuleApplicationProtocol{ - { - Port: to.Ptr[int32](443), - ProtocolType: to.Ptr(armnetwork.FirewallPolicyRuleApplicationProtocolTypeHTTPS), - }}, - SourceAddresses: []*string{ - to.Ptr("216.58.216.164"), - to.Ptr("10.0.0.0/24")}, - WebCategories: []*string{ - to.Ptr("Hacking")}, - }}, - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesList.json -func ExampleFirewallPolicyRuleCollectionGroupsClient_NewListPager_listAllFirewallPolicyRuleCollectionGroupWithWebCategories() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewFirewallPolicyRuleCollectionGroupsClient("e747cc13-97d4-4a79-b463-42d7f4e558f2", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", "firewallPolicy", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/FirewallPolicyRuleCollectionGroupList.json -func ExampleFirewallPolicyRuleCollectionGroupsClient_NewListPager_listAllFirewallPolicyRuleCollectionGroupsForAGivenFirewallPolicy() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewFirewallPolicyRuleCollectionGroupsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", "firewallPolicy", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsList.json -func ExampleFirewallPolicyRuleCollectionGroupsClient_NewListPager_listAllFirewallPolicyRuleCollectionGroupsWithIpGroupsForAGivenFirewallPolicy() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewFirewallPolicyRuleCollectionGroupsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", "firewallPolicy", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/flowlogs_client.go b/sdk/resourcemanager/network/armnetwork/flowlogs_client.go index 93524d9f724b..6ad8dd8f87f7 100644 --- a/sdk/resourcemanager/network/armnetwork/flowlogs_client.go +++ b/sdk/resourcemanager/network/armnetwork/flowlogs_client.go @@ -32,10 +32,10 @@ type FlowLogsClient struct { } // NewFlowLogsClient creates a new instance of FlowLogsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewFlowLogsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FlowLogsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewFlowLogsClient(subscriptionID string, credential azcore.TokenCredential, // BeginCreateOrUpdate - Create or update a flow log for the specified network security group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// flowLogName - The name of the flow log. -// parameters - Parameters that define the create or update flow log resource. -// options - FlowLogsClientBeginCreateOrUpdateOptions contains the optional parameters for the FlowLogsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - flowLogName - The name of the flow log. +// - parameters - Parameters that define the create or update flow log resource. +// - options - FlowLogsClientBeginCreateOrUpdateOptions contains the optional parameters for the FlowLogsClient.BeginCreateOrUpdate +// method. func (client *FlowLogsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, parameters FlowLog, options *FlowLogsClientBeginCreateOrUpdateOptions) (*runtime.Poller[FlowLogsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, networkWatcherName, flowLogName, parameters, options) @@ -81,6 +82,7 @@ func (client *FlowLogsClient) BeginCreateOrUpdate(ctx context.Context, resourceG // CreateOrUpdate - Create or update a flow log for the specified network security group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *FlowLogsClient) createOrUpdate(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, parameters FlowLog, options *FlowLogsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkWatcherName, flowLogName, parameters, options) @@ -129,11 +131,12 @@ func (client *FlowLogsClient) createOrUpdateCreateRequest(ctx context.Context, r // BeginDelete - Deletes the specified flow log resource. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// flowLogName - The name of the flow log resource. -// options - FlowLogsClientBeginDeleteOptions contains the optional parameters for the FlowLogsClient.BeginDelete method. +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - flowLogName - The name of the flow log resource. +// - options - FlowLogsClientBeginDeleteOptions contains the optional parameters for the FlowLogsClient.BeginDelete method. func (client *FlowLogsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, options *FlowLogsClientBeginDeleteOptions) (*runtime.Poller[FlowLogsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, networkWatcherName, flowLogName, options) @@ -150,6 +153,7 @@ func (client *FlowLogsClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Deletes the specified flow log resource. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *FlowLogsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, options *FlowLogsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkWatcherName, flowLogName, options) @@ -198,11 +202,12 @@ func (client *FlowLogsClient) deleteCreateRequest(ctx context.Context, resourceG // Get - Gets a flow log resource by name. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// flowLogName - The name of the flow log resource. -// options - FlowLogsClientGetOptions contains the optional parameters for the FlowLogsClient.Get method. +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - flowLogName - The name of the flow log resource. +// - options - FlowLogsClientGetOptions contains the optional parameters for the FlowLogsClient.Get method. func (client *FlowLogsClient) Get(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, options *FlowLogsClientGetOptions) (FlowLogsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, networkWatcherName, flowLogName, options) if err != nil { @@ -258,10 +263,11 @@ func (client *FlowLogsClient) getHandleResponse(resp *http.Response) (FlowLogsCl } // NewListPager - Lists all flow log resources for the specified Network Watcher. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group containing Network Watcher. -// networkWatcherName - The name of the Network Watcher resource. -// options - FlowLogsClientListOptions contains the optional parameters for the FlowLogsClient.List method. +// - resourceGroupName - The name of the resource group containing Network Watcher. +// - networkWatcherName - The name of the Network Watcher resource. +// - options - FlowLogsClientListOptions contains the optional parameters for the FlowLogsClient.NewListPager method. func (client *FlowLogsClient) NewListPager(resourceGroupName string, networkWatcherName string, options *FlowLogsClientListOptions) *runtime.Pager[FlowLogsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[FlowLogsClientListResponse]{ More: func(page FlowLogsClientListResponse) bool { @@ -327,12 +333,13 @@ func (client *FlowLogsClient) listHandleResponse(resp *http.Response) (FlowLogsC // UpdateTags - Update tags of the specified flow log. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// flowLogName - The name of the flow log. -// parameters - Parameters supplied to update flow log tags. -// options - FlowLogsClientUpdateTagsOptions contains the optional parameters for the FlowLogsClient.UpdateTags method. +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - flowLogName - The name of the flow log. +// - parameters - Parameters supplied to update flow log tags. +// - options - FlowLogsClientUpdateTagsOptions contains the optional parameters for the FlowLogsClient.UpdateTags method. func (client *FlowLogsClient) UpdateTags(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, parameters TagsObject, options *FlowLogsClientUpdateTagsOptions) (FlowLogsClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, networkWatcherName, flowLogName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/flowlogs_client_example_test.go b/sdk/resourcemanager/network/armnetwork/flowlogs_client_example_test.go deleted file mode 100644 index 2e0afaefa3e9..000000000000 --- a/sdk/resourcemanager/network/armnetwork/flowlogs_client_example_test.go +++ /dev/null @@ -1,140 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherFlowLogCreate.json -func ExampleFlowLogsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewFlowLogsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "nw1", "fl", armnetwork.FlowLog{ - Location: to.Ptr("centraluseuap"), - Properties: &armnetwork.FlowLogPropertiesFormat{ - Format: &armnetwork.FlowLogFormatParameters{ - Type: to.Ptr(armnetwork.FlowLogFormatTypeJSON), - Version: to.Ptr[int32](1), - }, - Enabled: to.Ptr(true), - StorageID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/nwtest1mgvbfmqsigdxe"), - TargetResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/desmondcentral-nsg"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherFlowLogUpdateTags.json -func ExampleFlowLogsClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewFlowLogsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, "rg1", "nw", "fl", armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherFlowLogGet.json -func ExampleFlowLogsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewFlowLogsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "nw1", "flowLog1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherFlowLogDelete.json -func ExampleFlowLogsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewFlowLogsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "nw1", "fl", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherFlowLogList.json -func ExampleFlowLogsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewFlowLogsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", "nw1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/go.mod b/sdk/resourcemanager/network/armnetwork/go.mod index 4654777576ba..4be8f4a27774 100644 --- a/sdk/resourcemanager/network/armnetwork/go.mod +++ b/sdk/resourcemanager/network/armnetwork/go.mod @@ -4,12 +4,12 @@ go 1.18 require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.0.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.0.0 github.com/stretchr/testify v1.7.0 ) require ( + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.0.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0 // indirect diff --git a/sdk/resourcemanager/network/armnetwork/groups_client.go b/sdk/resourcemanager/network/armnetwork/groups_client.go index 904fd667f299..6f6c326fda5c 100644 --- a/sdk/resourcemanager/network/armnetwork/groups_client.go +++ b/sdk/resourcemanager/network/armnetwork/groups_client.go @@ -33,10 +33,10 @@ type GroupsClient struct { } // NewGroupsClient creates a new instance of GroupsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GroupsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -59,12 +59,13 @@ func NewGroupsClient(subscriptionID string, credential azcore.TokenCredential, o // CreateOrUpdate - Creates or updates a network group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// networkGroupName - The name of the network group. -// parameters - Parameters supplied to the specify which network group need to create -// options - GroupsClientCreateOrUpdateOptions contains the optional parameters for the GroupsClient.CreateOrUpdate method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - networkGroupName - The name of the network group. +// - parameters - Parameters supplied to the specify which network group need to create +// - options - GroupsClientCreateOrUpdateOptions contains the optional parameters for the GroupsClient.CreateOrUpdate method. func (client *GroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, parameters Group, options *GroupsClientCreateOrUpdateOptions) (GroupsClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkManagerName, networkGroupName, parameters, options) if err != nil { @@ -127,11 +128,12 @@ func (client *GroupsClient) createOrUpdateHandleResponse(resp *http.Response) (G // BeginDelete - Deletes a network group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// networkGroupName - The name of the network group. -// options - GroupsClientBeginDeleteOptions contains the optional parameters for the GroupsClient.BeginDelete method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - networkGroupName - The name of the network group. +// - options - GroupsClientBeginDeleteOptions contains the optional parameters for the GroupsClient.BeginDelete method. func (client *GroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, options *GroupsClientBeginDeleteOptions) (*runtime.Poller[GroupsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, networkManagerName, networkGroupName, options) @@ -148,6 +150,7 @@ func (client *GroupsClient) BeginDelete(ctx context.Context, resourceGroupName s // Delete - Deletes a network group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *GroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, options *GroupsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, networkGroupName, options) @@ -199,11 +202,12 @@ func (client *GroupsClient) deleteCreateRequest(ctx context.Context, resourceGro // Get - Gets the specified network group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// networkGroupName - The name of the network group. -// options - GroupsClientGetOptions contains the optional parameters for the GroupsClient.Get method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - networkGroupName - The name of the network group. +// - options - GroupsClientGetOptions contains the optional parameters for the GroupsClient.Get method. func (client *GroupsClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, options *GroupsClientGetOptions) (GroupsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, networkGroupName, options) if err != nil { @@ -259,10 +263,11 @@ func (client *GroupsClient) getHandleResponse(resp *http.Response) (GroupsClient } // NewListPager - Lists the specified network group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// options - GroupsClientListOptions contains the optional parameters for the GroupsClient.List method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - options - GroupsClientListOptions contains the optional parameters for the GroupsClient.NewListPager method. func (client *GroupsClient) NewListPager(resourceGroupName string, networkManagerName string, options *GroupsClientListOptions) *runtime.Pager[GroupsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[GroupsClientListResponse]{ More: func(page GroupsClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/groups_client_example_test.go b/sdk/resourcemanager/network/armnetwork/groups_client_example_test.go deleted file mode 100644 index f60952924baa..000000000000 --- a/sdk/resourcemanager/network/armnetwork/groups_client_example_test.go +++ /dev/null @@ -1,107 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerGroupGet.json -func ExampleGroupsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewGroupsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "testNetworkManager", "testNetworkGroup", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerGroupPut.json -func ExampleGroupsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewGroupsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, "rg1", "testNetworkManager", "testNetworkGroup", armnetwork.Group{ - Properties: &armnetwork.GroupProperties{ - Description: to.Ptr("A sample group"), - }, - }, &armnetwork.GroupsClientCreateOrUpdateOptions{IfMatch: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerGroupDelete.json -func ExampleGroupsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewGroupsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "testNetworkManager", "testNetworkGroup", &armnetwork.GroupsClientBeginDeleteOptions{Force: to.Ptr(false)}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerGroupList.json -func ExampleGroupsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewGroupsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", "testNetworkManager", &armnetwork.GroupsClientListOptions{Top: nil, - SkipToken: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/hubroutetables_client.go b/sdk/resourcemanager/network/armnetwork/hubroutetables_client.go index 29999934bd38..b0aca7a2d1c7 100644 --- a/sdk/resourcemanager/network/armnetwork/hubroutetables_client.go +++ b/sdk/resourcemanager/network/armnetwork/hubroutetables_client.go @@ -32,10 +32,10 @@ type HubRouteTablesClient struct { } // NewHubRouteTablesClient creates a new instance of HubRouteTablesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewHubRouteTablesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*HubRouteTablesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewHubRouteTablesClient(subscriptionID string, credential azcore.TokenCrede // BeginCreateOrUpdate - Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// routeTableName - The name of the RouteTable. -// routeTableParameters - Parameters supplied to create or update RouteTable. -// options - HubRouteTablesClientBeginCreateOrUpdateOptions contains the optional parameters for the HubRouteTablesClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - routeTableName - The name of the RouteTable. +// - routeTableParameters - Parameters supplied to create or update RouteTable. +// - options - HubRouteTablesClientBeginCreateOrUpdateOptions contains the optional parameters for the HubRouteTablesClient.BeginCreateOrUpdate +// method. func (client *HubRouteTablesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, routeTableParameters HubRouteTable, options *HubRouteTablesClientBeginCreateOrUpdateOptions) (*runtime.Poller[HubRouteTablesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, routeTableName, routeTableParameters, options) @@ -81,6 +82,7 @@ func (client *HubRouteTablesClient) BeginCreateOrUpdate(ctx context.Context, res // CreateOrUpdate - Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *HubRouteTablesClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, routeTableParameters HubRouteTable, options *HubRouteTablesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualHubName, routeTableName, routeTableParameters, options) @@ -129,12 +131,13 @@ func (client *HubRouteTablesClient) createOrUpdateCreateRequest(ctx context.Cont // BeginDelete - Deletes a RouteTable. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the RouteTable. -// virtualHubName - The name of the VirtualHub. -// routeTableName - The name of the RouteTable. -// options - HubRouteTablesClientBeginDeleteOptions contains the optional parameters for the HubRouteTablesClient.BeginDelete -// method. +// - resourceGroupName - The resource group name of the RouteTable. +// - virtualHubName - The name of the VirtualHub. +// - routeTableName - The name of the RouteTable. +// - options - HubRouteTablesClientBeginDeleteOptions contains the optional parameters for the HubRouteTablesClient.BeginDelete +// method. func (client *HubRouteTablesClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, options *HubRouteTablesClientBeginDeleteOptions) (*runtime.Poller[HubRouteTablesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, routeTableName, options) @@ -151,6 +154,7 @@ func (client *HubRouteTablesClient) BeginDelete(ctx context.Context, resourceGro // Delete - Deletes a RouteTable. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *HubRouteTablesClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, options *HubRouteTablesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualHubName, routeTableName, options) @@ -199,11 +203,12 @@ func (client *HubRouteTablesClient) deleteCreateRequest(ctx context.Context, res // Get - Retrieves the details of a RouteTable. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// routeTableName - The name of the RouteTable. -// options - HubRouteTablesClientGetOptions contains the optional parameters for the HubRouteTablesClient.Get method. +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - routeTableName - The name of the RouteTable. +// - options - HubRouteTablesClientGetOptions contains the optional parameters for the HubRouteTablesClient.Get method. func (client *HubRouteTablesClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, options *HubRouteTablesClientGetOptions) (HubRouteTablesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, virtualHubName, routeTableName, options) if err != nil { @@ -259,10 +264,11 @@ func (client *HubRouteTablesClient) getHandleResponse(resp *http.Response) (HubR } // NewListPager - Retrieves the details of all RouteTables. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// options - HubRouteTablesClientListOptions contains the optional parameters for the HubRouteTablesClient.List method. +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - options - HubRouteTablesClientListOptions contains the optional parameters for the HubRouteTablesClient.NewListPager method. func (client *HubRouteTablesClient) NewListPager(resourceGroupName string, virtualHubName string, options *HubRouteTablesClientListOptions) *runtime.Pager[HubRouteTablesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[HubRouteTablesClientListResponse]{ More: func(page HubRouteTablesClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/hubroutetables_client_example_test.go b/sdk/resourcemanager/network/armnetwork/hubroutetables_client_example_test.go deleted file mode 100644 index 78991ac98586..000000000000 --- a/sdk/resourcemanager/network/armnetwork/hubroutetables_client_example_test.go +++ /dev/null @@ -1,122 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/HubRouteTablePut.json -func ExampleHubRouteTablesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewHubRouteTablesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "virtualHub1", "hubRouteTable1", armnetwork.HubRouteTable{ - Properties: &armnetwork.HubRouteTableProperties{ - Labels: []*string{ - to.Ptr("label1"), - to.Ptr("label2")}, - Routes: []*armnetwork.HubRoute{ - { - Name: to.Ptr("route1"), - DestinationType: to.Ptr("CIDR"), - Destinations: []*string{ - to.Ptr("10.0.0.0/8"), - to.Ptr("20.0.0.0/8"), - to.Ptr("30.0.0.0/8")}, - NextHop: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azureFirewall1"), - NextHopType: to.Ptr("ResourceId"), - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/HubRouteTableGet.json -func ExampleHubRouteTablesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewHubRouteTablesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "virtualHub1", "hubRouteTable1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/HubRouteTableDelete.json -func ExampleHubRouteTablesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewHubRouteTablesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "virtualHub1", "hubRouteTable1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/HubRouteTableList.json -func ExampleHubRouteTablesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewHubRouteTablesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", "virtualHub1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/hubvirtualnetworkconnections_client.go b/sdk/resourcemanager/network/armnetwork/hubvirtualnetworkconnections_client.go index 441fce4b96f6..b9c3514e083b 100644 --- a/sdk/resourcemanager/network/armnetwork/hubvirtualnetworkconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/hubvirtualnetworkconnections_client.go @@ -32,10 +32,10 @@ type HubVirtualNetworkConnectionsClient struct { } // NewHubVirtualNetworkConnectionsClient creates a new instance of HubVirtualNetworkConnectionsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewHubVirtualNetworkConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*HubVirtualNetworkConnectionsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewHubVirtualNetworkConnectionsClient(subscriptionID string, credential azc // BeginCreateOrUpdate - Creates a hub virtual network connection if it doesn't exist else updates the existing one. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the HubVirtualNetworkConnection. -// virtualHubName - The name of the VirtualHub. -// connectionName - The name of the HubVirtualNetworkConnection. -// hubVirtualNetworkConnectionParameters - Parameters supplied to create or update a hub virtual network connection. -// options - HubVirtualNetworkConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The resource group name of the HubVirtualNetworkConnection. +// - virtualHubName - The name of the VirtualHub. +// - connectionName - The name of the HubVirtualNetworkConnection. +// - hubVirtualNetworkConnectionParameters - Parameters supplied to create or update a hub virtual network connection. +// - options - HubVirtualNetworkConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.BeginCreateOrUpdate +// method. func (client *HubVirtualNetworkConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, hubVirtualNetworkConnectionParameters HubVirtualNetworkConnection, options *HubVirtualNetworkConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[HubVirtualNetworkConnectionsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, connectionName, hubVirtualNetworkConnectionParameters, options) @@ -81,6 +82,7 @@ func (client *HubVirtualNetworkConnectionsClient) BeginCreateOrUpdate(ctx contex // CreateOrUpdate - Creates a hub virtual network connection if it doesn't exist else updates the existing one. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *HubVirtualNetworkConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, hubVirtualNetworkConnectionParameters HubVirtualNetworkConnection, options *HubVirtualNetworkConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualHubName, connectionName, hubVirtualNetworkConnectionParameters, options) @@ -129,12 +131,13 @@ func (client *HubVirtualNetworkConnectionsClient) createOrUpdateCreateRequest(ct // BeginDelete - Deletes a HubVirtualNetworkConnection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// connectionName - The name of the HubVirtualNetworkConnection. -// options - HubVirtualNetworkConnectionsClientBeginDeleteOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.BeginDelete -// method. +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - connectionName - The name of the HubVirtualNetworkConnection. +// - options - HubVirtualNetworkConnectionsClientBeginDeleteOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.BeginDelete +// method. func (client *HubVirtualNetworkConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, options *HubVirtualNetworkConnectionsClientBeginDeleteOptions) (*runtime.Poller[HubVirtualNetworkConnectionsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, connectionName, options) @@ -151,6 +154,7 @@ func (client *HubVirtualNetworkConnectionsClient) BeginDelete(ctx context.Contex // Delete - Deletes a HubVirtualNetworkConnection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *HubVirtualNetworkConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, options *HubVirtualNetworkConnectionsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualHubName, connectionName, options) @@ -199,12 +203,13 @@ func (client *HubVirtualNetworkConnectionsClient) deleteCreateRequest(ctx contex // Get - Retrieves the details of a HubVirtualNetworkConnection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// connectionName - The name of the vpn connection. -// options - HubVirtualNetworkConnectionsClientGetOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.Get -// method. +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - connectionName - The name of the vpn connection. +// - options - HubVirtualNetworkConnectionsClientGetOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.Get +// method. func (client *HubVirtualNetworkConnectionsClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, options *HubVirtualNetworkConnectionsClientGetOptions) (HubVirtualNetworkConnectionsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, virtualHubName, connectionName, options) if err != nil { @@ -260,11 +265,12 @@ func (client *HubVirtualNetworkConnectionsClient) getHandleResponse(resp *http.R } // NewListPager - Retrieves the details of all HubVirtualNetworkConnections. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// options - HubVirtualNetworkConnectionsClientListOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.List -// method. +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - options - HubVirtualNetworkConnectionsClientListOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.NewListPager +// method. func (client *HubVirtualNetworkConnectionsClient) NewListPager(resourceGroupName string, virtualHubName string, options *HubVirtualNetworkConnectionsClientListOptions) *runtime.Pager[HubVirtualNetworkConnectionsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[HubVirtualNetworkConnectionsClientListResponse]{ More: func(page HubVirtualNetworkConnectionsClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/hubvirtualnetworkconnections_client_example_test.go b/sdk/resourcemanager/network/armnetwork/hubvirtualnetworkconnections_client_example_test.go deleted file mode 100644 index dcdc3dffb496..000000000000 --- a/sdk/resourcemanager/network/armnetwork/hubvirtualnetworkconnections_client_example_test.go +++ /dev/null @@ -1,152 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/HubVirtualNetworkConnectionPut.json -func ExampleHubVirtualNetworkConnectionsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewHubVirtualNetworkConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "virtualHub1", "connection1", armnetwork.HubVirtualNetworkConnection{ - Properties: &armnetwork.HubVirtualNetworkConnectionProperties{ - EnableInternetSecurity: to.Ptr(false), - RemoteVirtualNetwork: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/SpokeVnet1"), - }, - RoutingConfiguration: &armnetwork.RoutingConfiguration{ - AssociatedRouteTable: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1"), - }, - InboundRouteMap: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1"), - }, - OutboundRouteMap: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2"), - }, - PropagatedRouteTables: &armnetwork.PropagatedRouteTable{ - IDs: []*armnetwork.SubResource{ - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1"), - }}, - Labels: []*string{ - to.Ptr("label1"), - to.Ptr("label2")}, - }, - VnetRoutes: &armnetwork.VnetRoute{ - StaticRoutes: []*armnetwork.StaticRoute{ - { - Name: to.Ptr("route1"), - AddressPrefixes: []*string{ - to.Ptr("10.1.0.0/16"), - to.Ptr("10.2.0.0/16")}, - NextHopIPAddress: to.Ptr("10.0.0.68"), - }, - { - Name: to.Ptr("route2"), - AddressPrefixes: []*string{ - to.Ptr("10.3.0.0/16"), - to.Ptr("10.4.0.0/16")}, - NextHopIPAddress: to.Ptr("10.0.0.65"), - }}, - StaticRoutesConfig: &armnetwork.StaticRoutesConfig{ - VnetLocalRouteOverrideCriteria: to.Ptr(armnetwork.VnetLocalRouteOverrideCriteriaEqual), - }, - }, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/HubVirtualNetworkConnectionDelete.json -func ExampleHubVirtualNetworkConnectionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewHubVirtualNetworkConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "virtualHub1", "connection1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/HubVirtualNetworkConnectionGet.json -func ExampleHubVirtualNetworkConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewHubVirtualNetworkConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "virtualHub1", "connection1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/HubVirtualNetworkConnectionList.json -func ExampleHubVirtualNetworkConnectionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewHubVirtualNetworkConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", "virtualHub1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/inboundnatrules_client.go b/sdk/resourcemanager/network/armnetwork/inboundnatrules_client.go index 85adc94f804c..8f170a5b597d 100644 --- a/sdk/resourcemanager/network/armnetwork/inboundnatrules_client.go +++ b/sdk/resourcemanager/network/armnetwork/inboundnatrules_client.go @@ -32,10 +32,10 @@ type InboundNatRulesClient struct { } // NewInboundNatRulesClient creates a new instance of InboundNatRulesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewInboundNatRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InboundNatRulesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewInboundNatRulesClient(subscriptionID string, credential azcore.TokenCred // BeginCreateOrUpdate - Creates or updates a load balancer inbound NAT rule. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// inboundNatRuleName - The name of the inbound NAT rule. -// inboundNatRuleParameters - Parameters supplied to the create or update inbound NAT rule operation. -// options - InboundNatRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the InboundNatRulesClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - inboundNatRuleName - The name of the inbound NAT rule. +// - inboundNatRuleParameters - Parameters supplied to the create or update inbound NAT rule operation. +// - options - InboundNatRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the InboundNatRulesClient.BeginCreateOrUpdate +// method. func (client *InboundNatRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, inboundNatRuleParameters InboundNatRule, options *InboundNatRulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[InboundNatRulesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, loadBalancerName, inboundNatRuleName, inboundNatRuleParameters, options) @@ -81,6 +82,7 @@ func (client *InboundNatRulesClient) BeginCreateOrUpdate(ctx context.Context, re // CreateOrUpdate - Creates or updates a load balancer inbound NAT rule. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *InboundNatRulesClient) createOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, inboundNatRuleParameters InboundNatRule, options *InboundNatRulesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, loadBalancerName, inboundNatRuleName, inboundNatRuleParameters, options) @@ -129,12 +131,13 @@ func (client *InboundNatRulesClient) createOrUpdateCreateRequest(ctx context.Con // BeginDelete - Deletes the specified load balancer inbound NAT rule. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// inboundNatRuleName - The name of the inbound NAT rule. -// options - InboundNatRulesClientBeginDeleteOptions contains the optional parameters for the InboundNatRulesClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - inboundNatRuleName - The name of the inbound NAT rule. +// - options - InboundNatRulesClientBeginDeleteOptions contains the optional parameters for the InboundNatRulesClient.BeginDelete +// method. func (client *InboundNatRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, options *InboundNatRulesClientBeginDeleteOptions) (*runtime.Poller[InboundNatRulesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, loadBalancerName, inboundNatRuleName, options) @@ -151,6 +154,7 @@ func (client *InboundNatRulesClient) BeginDelete(ctx context.Context, resourceGr // Delete - Deletes the specified load balancer inbound NAT rule. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *InboundNatRulesClient) deleteOperation(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, options *InboundNatRulesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, loadBalancerName, inboundNatRuleName, options) @@ -199,11 +203,12 @@ func (client *InboundNatRulesClient) deleteCreateRequest(ctx context.Context, re // Get - Gets the specified load balancer inbound NAT rule. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// inboundNatRuleName - The name of the inbound NAT rule. -// options - InboundNatRulesClientGetOptions contains the optional parameters for the InboundNatRulesClient.Get method. +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - inboundNatRuleName - The name of the inbound NAT rule. +// - options - InboundNatRulesClientGetOptions contains the optional parameters for the InboundNatRulesClient.Get method. func (client *InboundNatRulesClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, options *InboundNatRulesClientGetOptions) (InboundNatRulesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, loadBalancerName, inboundNatRuleName, options) if err != nil { @@ -262,10 +267,12 @@ func (client *InboundNatRulesClient) getHandleResponse(resp *http.Response) (Inb } // NewListPager - Gets all the inbound NAT rules in a load balancer. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// options - InboundNatRulesClientListOptions contains the optional parameters for the InboundNatRulesClient.List method. +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - options - InboundNatRulesClientListOptions contains the optional parameters for the InboundNatRulesClient.NewListPager +// method. func (client *InboundNatRulesClient) NewListPager(resourceGroupName string, loadBalancerName string, options *InboundNatRulesClientListOptions) *runtime.Pager[InboundNatRulesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[InboundNatRulesClientListResponse]{ More: func(page InboundNatRulesClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/inboundnatrules_client_example_test.go b/sdk/resourcemanager/network/armnetwork/inboundnatrules_client_example_test.go deleted file mode 100644 index 544120353f7f..000000000000 --- a/sdk/resourcemanager/network/armnetwork/inboundnatrules_client_example_test.go +++ /dev/null @@ -1,117 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/InboundNatRuleList.json -func ExampleInboundNatRulesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewInboundNatRulesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("testrg", "lb1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/InboundNatRuleDelete.json -func ExampleInboundNatRulesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewInboundNatRulesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "testrg", "lb1", "natRule1.1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/InboundNatRuleGet.json -func ExampleInboundNatRulesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewInboundNatRulesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "testrg", "lb1", "natRule1.1", &armnetwork.InboundNatRulesClientGetOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/InboundNatRuleCreate.json -func ExampleInboundNatRulesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewInboundNatRulesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "testrg", "lb1", "natRule1.1", armnetwork.InboundNatRule{ - Properties: &armnetwork.InboundNatRulePropertiesFormat{ - BackendPort: to.Ptr[int32](3389), - EnableFloatingIP: to.Ptr(false), - EnableTCPReset: to.Ptr(false), - FrontendIPConfiguration: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/testrg/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/ip1"), - }, - FrontendPort: to.Ptr[int32](3390), - IdleTimeoutInMinutes: to.Ptr[int32](4), - Protocol: to.Ptr(armnetwork.TransportProtocolTCP), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/inboundsecurityrule_client.go b/sdk/resourcemanager/network/armnetwork/inboundsecurityrule_client.go index eca2f91b753a..787823200c38 100644 --- a/sdk/resourcemanager/network/armnetwork/inboundsecurityrule_client.go +++ b/sdk/resourcemanager/network/armnetwork/inboundsecurityrule_client.go @@ -32,10 +32,10 @@ type InboundSecurityRuleClient struct { } // NewInboundSecurityRuleClient creates a new instance of InboundSecurityRuleClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewInboundSecurityRuleClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InboundSecurityRuleClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewInboundSecurityRuleClient(subscriptionID string, credential azcore.Token // BeginCreateOrUpdate - Creates or updates the specified Network Virtual Appliance Inbound Security Rules. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkVirtualApplianceName - The name of the Network Virtual Appliance. -// ruleCollectionName - The name of security rule collection. -// parameters - Parameters supplied to the create or update Network Virtual Appliance Inbound Security Rules operation. -// options - InboundSecurityRuleClientBeginCreateOrUpdateOptions contains the optional parameters for the InboundSecurityRuleClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - networkVirtualApplianceName - The name of the Network Virtual Appliance. +// - ruleCollectionName - The name of security rule collection. +// - parameters - Parameters supplied to the create or update Network Virtual Appliance Inbound Security Rules operation. +// - options - InboundSecurityRuleClientBeginCreateOrUpdateOptions contains the optional parameters for the InboundSecurityRuleClient.BeginCreateOrUpdate +// method. func (client *InboundSecurityRuleClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, ruleCollectionName string, parameters InboundSecurityRule, options *InboundSecurityRuleClientBeginCreateOrUpdateOptions) (*runtime.Poller[InboundSecurityRuleClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, networkVirtualApplianceName, ruleCollectionName, parameters, options) @@ -81,6 +82,7 @@ func (client *InboundSecurityRuleClient) BeginCreateOrUpdate(ctx context.Context // CreateOrUpdate - Creates or updates the specified Network Virtual Appliance Inbound Security Rules. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *InboundSecurityRuleClient) createOrUpdate(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, ruleCollectionName string, parameters InboundSecurityRule, options *InboundSecurityRuleClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, ruleCollectionName, parameters, options) diff --git a/sdk/resourcemanager/network/armnetwork/inboundsecurityrule_client_example_test.go b/sdk/resourcemanager/network/armnetwork/inboundsecurityrule_client_example_test.go deleted file mode 100644 index 3c39d789733a..000000000000 --- a/sdk/resourcemanager/network/armnetwork/inboundsecurityrule_client_example_test.go +++ /dev/null @@ -1,50 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/InboundSecurityRulePut.json -func ExampleInboundSecurityRuleClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewInboundSecurityRuleClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "nva", "rule1", armnetwork.InboundSecurityRule{ - Properties: &armnetwork.InboundSecurityRuleProperties{ - Rules: []*armnetwork.InboundSecurityRules{ - { - DestinationPortRange: to.Ptr[int32](22), - SourceAddressPrefix: to.Ptr("50.20.121.5/32"), - Protocol: to.Ptr(armnetwork.InboundSecurityRulesProtocolTCP), - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/interfaceipconfigurations_client.go b/sdk/resourcemanager/network/armnetwork/interfaceipconfigurations_client.go index bd4d80532a32..b74b94faa632 100644 --- a/sdk/resourcemanager/network/armnetwork/interfaceipconfigurations_client.go +++ b/sdk/resourcemanager/network/armnetwork/interfaceipconfigurations_client.go @@ -32,10 +32,10 @@ type InterfaceIPConfigurationsClient struct { } // NewInterfaceIPConfigurationsClient creates a new instance of InterfaceIPConfigurationsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewInterfaceIPConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InterfaceIPConfigurationsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewInterfaceIPConfigurationsClient(subscriptionID string, credential azcore // Get - Gets the specified network interface ip configuration. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkInterfaceName - The name of the network interface. -// ipConfigurationName - The name of the ip configuration name. -// options - InterfaceIPConfigurationsClientGetOptions contains the optional parameters for the InterfaceIPConfigurationsClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - networkInterfaceName - The name of the network interface. +// - ipConfigurationName - The name of the ip configuration name. +// - options - InterfaceIPConfigurationsClientGetOptions contains the optional parameters for the InterfaceIPConfigurationsClient.Get +// method. func (client *InterfaceIPConfigurationsClient) Get(ctx context.Context, resourceGroupName string, networkInterfaceName string, ipConfigurationName string, options *InterfaceIPConfigurationsClientGetOptions) (InterfaceIPConfigurationsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, networkInterfaceName, ipConfigurationName, options) if err != nil { @@ -119,11 +120,12 @@ func (client *InterfaceIPConfigurationsClient) getHandleResponse(resp *http.Resp } // NewListPager - Get all ip configurations in a network interface. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkInterfaceName - The name of the network interface. -// options - InterfaceIPConfigurationsClientListOptions contains the optional parameters for the InterfaceIPConfigurationsClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - networkInterfaceName - The name of the network interface. +// - options - InterfaceIPConfigurationsClientListOptions contains the optional parameters for the InterfaceIPConfigurationsClient.NewListPager +// method. func (client *InterfaceIPConfigurationsClient) NewListPager(resourceGroupName string, networkInterfaceName string, options *InterfaceIPConfigurationsClientListOptions) *runtime.Pager[InterfaceIPConfigurationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[InterfaceIPConfigurationsClientListResponse]{ More: func(page InterfaceIPConfigurationsClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/interfaceipconfigurations_client_example_test.go b/sdk/resourcemanager/network/armnetwork/interfaceipconfigurations_client_example_test.go deleted file mode 100644 index 9dd717ae56de..000000000000 --- a/sdk/resourcemanager/network/armnetwork/interfaceipconfigurations_client_example_test.go +++ /dev/null @@ -1,60 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkInterfaceIPConfigurationList.json -func ExampleInterfaceIPConfigurationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewInterfaceIPConfigurationsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("testrg", "nic1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkInterfaceIPConfigurationGet.json -func ExampleInterfaceIPConfigurationsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewInterfaceIPConfigurationsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "testrg", "mynic", "ipconfig1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/interfaceloadbalancers_client.go b/sdk/resourcemanager/network/armnetwork/interfaceloadbalancers_client.go index 4f51cefeed7b..ae0c9a84fd64 100644 --- a/sdk/resourcemanager/network/armnetwork/interfaceloadbalancers_client.go +++ b/sdk/resourcemanager/network/armnetwork/interfaceloadbalancers_client.go @@ -32,10 +32,10 @@ type InterfaceLoadBalancersClient struct { } // NewInterfaceLoadBalancersClient creates a new instance of InterfaceLoadBalancersClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewInterfaceLoadBalancersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InterfaceLoadBalancersClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,11 +57,12 @@ func NewInterfaceLoadBalancersClient(subscriptionID string, credential azcore.To } // NewListPager - List all load balancers in a network interface. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkInterfaceName - The name of the network interface. -// options - InterfaceLoadBalancersClientListOptions contains the optional parameters for the InterfaceLoadBalancersClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - networkInterfaceName - The name of the network interface. +// - options - InterfaceLoadBalancersClientListOptions contains the optional parameters for the InterfaceLoadBalancersClient.NewListPager +// method. func (client *InterfaceLoadBalancersClient) NewListPager(resourceGroupName string, networkInterfaceName string, options *InterfaceLoadBalancersClientListOptions) *runtime.Pager[InterfaceLoadBalancersClientListResponse] { return runtime.NewPager(runtime.PagingHandler[InterfaceLoadBalancersClientListResponse]{ More: func(page InterfaceLoadBalancersClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/interfaceloadbalancers_client_example_test.go b/sdk/resourcemanager/network/armnetwork/interfaceloadbalancers_client_example_test.go deleted file mode 100644 index b02f822da3d8..000000000000 --- a/sdk/resourcemanager/network/armnetwork/interfaceloadbalancers_client_example_test.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkInterfaceLoadBalancerList.json -func ExampleInterfaceLoadBalancersClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewInterfaceLoadBalancersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("testrg", "nic1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/interfaces_client.go b/sdk/resourcemanager/network/armnetwork/interfaces_client.go index 6085da1d0052..a7b544d31ba2 100644 --- a/sdk/resourcemanager/network/armnetwork/interfaces_client.go +++ b/sdk/resourcemanager/network/armnetwork/interfaces_client.go @@ -32,10 +32,10 @@ type InterfacesClient struct { } // NewInterfacesClient creates a new instance of InterfacesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewInterfacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InterfacesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewInterfacesClient(subscriptionID string, credential azcore.TokenCredentia // BeginCreateOrUpdate - Creates or updates a network interface. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkInterfaceName - The name of the network interface. -// parameters - Parameters supplied to the create or update network interface operation. -// options - InterfacesClientBeginCreateOrUpdateOptions contains the optional parameters for the InterfacesClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - networkInterfaceName - The name of the network interface. +// - parameters - Parameters supplied to the create or update network interface operation. +// - options - InterfacesClientBeginCreateOrUpdateOptions contains the optional parameters for the InterfacesClient.BeginCreateOrUpdate +// method. func (client *InterfacesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters Interface, options *InterfacesClientBeginCreateOrUpdateOptions) (*runtime.Poller[InterfacesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, networkInterfaceName, parameters, options) @@ -80,6 +81,7 @@ func (client *InterfacesClient) BeginCreateOrUpdate(ctx context.Context, resourc // CreateOrUpdate - Creates or updates a network interface. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *InterfacesClient) createOrUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters Interface, options *InterfacesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkInterfaceName, parameters, options) @@ -124,10 +126,11 @@ func (client *InterfacesClient) createOrUpdateCreateRequest(ctx context.Context, // BeginDelete - Deletes the specified network interface. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkInterfaceName - The name of the network interface. -// options - InterfacesClientBeginDeleteOptions contains the optional parameters for the InterfacesClient.BeginDelete method. +// - resourceGroupName - The name of the resource group. +// - networkInterfaceName - The name of the network interface. +// - options - InterfacesClientBeginDeleteOptions contains the optional parameters for the InterfacesClient.BeginDelete method. func (client *InterfacesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientBeginDeleteOptions) (*runtime.Poller[InterfacesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, networkInterfaceName, options) @@ -144,6 +147,7 @@ func (client *InterfacesClient) BeginDelete(ctx context.Context, resourceGroupNa // Delete - Deletes the specified network interface. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *InterfacesClient) deleteOperation(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkInterfaceName, options) @@ -188,10 +192,11 @@ func (client *InterfacesClient) deleteCreateRequest(ctx context.Context, resourc // Get - Gets information about the specified network interface. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkInterfaceName - The name of the network interface. -// options - InterfacesClientGetOptions contains the optional parameters for the InterfacesClient.Get method. +// - resourceGroupName - The name of the resource group. +// - networkInterfaceName - The name of the network interface. +// - options - InterfacesClientGetOptions contains the optional parameters for the InterfacesClient.Get method. func (client *InterfacesClient) Get(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientGetOptions) (InterfacesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, networkInterfaceName, options) if err != nil { @@ -247,13 +252,14 @@ func (client *InterfacesClient) getHandleResponse(resp *http.Response) (Interfac // GetCloudServiceNetworkInterface - Get the specified network interface in a cloud service. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// cloudServiceName - The name of the cloud service. -// roleInstanceName - The name of role instance. -// networkInterfaceName - The name of the network interface. -// options - InterfacesClientGetCloudServiceNetworkInterfaceOptions contains the optional parameters for the InterfacesClient.GetCloudServiceNetworkInterface -// method. +// - resourceGroupName - The name of the resource group. +// - cloudServiceName - The name of the cloud service. +// - roleInstanceName - The name of role instance. +// - networkInterfaceName - The name of the network interface. +// - options - InterfacesClientGetCloudServiceNetworkInterfaceOptions contains the optional parameters for the InterfacesClient.GetCloudServiceNetworkInterface +// method. func (client *InterfacesClient) GetCloudServiceNetworkInterface(ctx context.Context, resourceGroupName string, cloudServiceName string, roleInstanceName string, networkInterfaceName string, options *InterfacesClientGetCloudServiceNetworkInterfaceOptions) (InterfacesClientGetCloudServiceNetworkInterfaceResponse, error) { req, err := client.getCloudServiceNetworkInterfaceCreateRequest(ctx, resourceGroupName, cloudServiceName, roleInstanceName, networkInterfaceName, options) if err != nil { @@ -317,11 +323,12 @@ func (client *InterfacesClient) getCloudServiceNetworkInterfaceHandleResponse(re // BeginGetEffectiveRouteTable - Gets all route tables applied to a network interface. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkInterfaceName - The name of the network interface. -// options - InterfacesClientBeginGetEffectiveRouteTableOptions contains the optional parameters for the InterfacesClient.BeginGetEffectiveRouteTable -// method. +// - resourceGroupName - The name of the resource group. +// - networkInterfaceName - The name of the network interface. +// - options - InterfacesClientBeginGetEffectiveRouteTableOptions contains the optional parameters for the InterfacesClient.BeginGetEffectiveRouteTable +// method. func (client *InterfacesClient) BeginGetEffectiveRouteTable(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientBeginGetEffectiveRouteTableOptions) (*runtime.Poller[InterfacesClientGetEffectiveRouteTableResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.getEffectiveRouteTable(ctx, resourceGroupName, networkInterfaceName, options) @@ -338,6 +345,7 @@ func (client *InterfacesClient) BeginGetEffectiveRouteTable(ctx context.Context, // GetEffectiveRouteTable - Gets all route tables applied to a network interface. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *InterfacesClient) getEffectiveRouteTable(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientBeginGetEffectiveRouteTableOptions) (*http.Response, error) { req, err := client.getEffectiveRouteTableCreateRequest(ctx, resourceGroupName, networkInterfaceName, options) @@ -383,14 +391,15 @@ func (client *InterfacesClient) getEffectiveRouteTableCreateRequest(ctx context. // GetVirtualMachineScaleSetIPConfiguration - Get the specified network interface ip configuration in a virtual machine scale // set. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2018-10-01 -// resourceGroupName - The name of the resource group. -// virtualMachineScaleSetName - The name of the virtual machine scale set. -// virtualmachineIndex - The virtual machine index. -// networkInterfaceName - The name of the network interface. -// ipConfigurationName - The name of the ip configuration. -// options - InterfacesClientGetVirtualMachineScaleSetIPConfigurationOptions contains the optional parameters for the InterfacesClient.GetVirtualMachineScaleSetIPConfiguration -// method. +// - resourceGroupName - The name of the resource group. +// - virtualMachineScaleSetName - The name of the virtual machine scale set. +// - virtualmachineIndex - The virtual machine index. +// - networkInterfaceName - The name of the network interface. +// - ipConfigurationName - The name of the ip configuration. +// - options - InterfacesClientGetVirtualMachineScaleSetIPConfigurationOptions contains the optional parameters for the InterfacesClient.GetVirtualMachineScaleSetIPConfiguration +// method. func (client *InterfacesClient) GetVirtualMachineScaleSetIPConfiguration(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, ipConfigurationName string, options *InterfacesClientGetVirtualMachineScaleSetIPConfigurationOptions) (InterfacesClientGetVirtualMachineScaleSetIPConfigurationResponse, error) { req, err := client.getVirtualMachineScaleSetIPConfigurationCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, options) if err != nil { @@ -458,13 +467,14 @@ func (client *InterfacesClient) getVirtualMachineScaleSetIPConfigurationHandleRe // GetVirtualMachineScaleSetNetworkInterface - Get the specified network interface in a virtual machine scale set. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2018-10-01 -// resourceGroupName - The name of the resource group. -// virtualMachineScaleSetName - The name of the virtual machine scale set. -// virtualmachineIndex - The virtual machine index. -// networkInterfaceName - The name of the network interface. -// options - InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceOptions contains the optional parameters for the InterfacesClient.GetVirtualMachineScaleSetNetworkInterface -// method. +// - resourceGroupName - The name of the resource group. +// - virtualMachineScaleSetName - The name of the virtual machine scale set. +// - virtualmachineIndex - The virtual machine index. +// - networkInterfaceName - The name of the network interface. +// - options - InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceOptions contains the optional parameters for the InterfacesClient.GetVirtualMachineScaleSetNetworkInterface +// method. func (client *InterfacesClient) GetVirtualMachineScaleSetNetworkInterface(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, options *InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceOptions) (InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResponse, error) { req, err := client.getVirtualMachineScaleSetNetworkInterfaceCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, options) if err != nil { @@ -527,9 +537,10 @@ func (client *InterfacesClient) getVirtualMachineScaleSetNetworkInterfaceHandleR } // NewListPager - Gets all network interfaces in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - InterfacesClientListOptions contains the optional parameters for the InterfacesClient.List method. +// - resourceGroupName - The name of the resource group. +// - options - InterfacesClientListOptions contains the optional parameters for the InterfacesClient.NewListPager method. func (client *InterfacesClient) NewListPager(resourceGroupName string, options *InterfacesClientListOptions) *runtime.Pager[InterfacesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[InterfacesClientListResponse]{ More: func(page InterfacesClientListResponse) bool { @@ -590,8 +601,9 @@ func (client *InterfacesClient) listHandleResponse(resp *http.Response) (Interfa } // NewListAllPager - Gets all network interfaces in a subscription. +// // Generated from API version 2022-07-01 -// options - InterfacesClientListAllOptions contains the optional parameters for the InterfacesClient.ListAll method. +// - options - InterfacesClientListAllOptions contains the optional parameters for the InterfacesClient.NewListAllPager method. func (client *InterfacesClient) NewListAllPager(options *InterfacesClientListAllOptions) *runtime.Pager[InterfacesClientListAllResponse] { return runtime.NewPager(runtime.PagingHandler[InterfacesClientListAllResponse]{ More: func(page InterfacesClientListAllResponse) bool { @@ -648,11 +660,12 @@ func (client *InterfacesClient) listAllHandleResponse(resp *http.Response) (Inte } // NewListCloudServiceNetworkInterfacesPager - Gets all network interfaces in a cloud service. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// cloudServiceName - The name of the cloud service. -// options - InterfacesClientListCloudServiceNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.ListCloudServiceNetworkInterfaces -// method. +// - resourceGroupName - The name of the resource group. +// - cloudServiceName - The name of the cloud service. +// - options - InterfacesClientListCloudServiceNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.NewListCloudServiceNetworkInterfacesPager +// method. func (client *InterfacesClient) NewListCloudServiceNetworkInterfacesPager(resourceGroupName string, cloudServiceName string, options *InterfacesClientListCloudServiceNetworkInterfacesOptions) *runtime.Pager[InterfacesClientListCloudServiceNetworkInterfacesResponse] { return runtime.NewPager(runtime.PagingHandler[InterfacesClientListCloudServiceNetworkInterfacesResponse]{ More: func(page InterfacesClientListCloudServiceNetworkInterfacesResponse) bool { @@ -718,12 +731,13 @@ func (client *InterfacesClient) listCloudServiceNetworkInterfacesHandleResponse( // NewListCloudServiceRoleInstanceNetworkInterfacesPager - Gets information about all network interfaces in a role instance // in a cloud service. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// cloudServiceName - The name of the cloud service. -// roleInstanceName - The name of role instance. -// options - InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesOptions contains the optional parameters for the -// InterfacesClient.ListCloudServiceRoleInstanceNetworkInterfaces method. +// - resourceGroupName - The name of the resource group. +// - cloudServiceName - The name of the cloud service. +// - roleInstanceName - The name of role instance. +// - options - InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesOptions contains the optional parameters for the +// InterfacesClient.NewListCloudServiceRoleInstanceNetworkInterfacesPager method. func (client *InterfacesClient) NewListCloudServiceRoleInstanceNetworkInterfacesPager(resourceGroupName string, cloudServiceName string, roleInstanceName string, options *InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesOptions) *runtime.Pager[InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse] { return runtime.NewPager(runtime.PagingHandler[InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse]{ More: func(page InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse) bool { @@ -793,11 +807,12 @@ func (client *InterfacesClient) listCloudServiceRoleInstanceNetworkInterfacesHan // BeginListEffectiveNetworkSecurityGroups - Gets all network security groups applied to a network interface. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkInterfaceName - The name of the network interface. -// options - InterfacesClientBeginListEffectiveNetworkSecurityGroupsOptions contains the optional parameters for the InterfacesClient.BeginListEffectiveNetworkSecurityGroups -// method. +// - resourceGroupName - The name of the resource group. +// - networkInterfaceName - The name of the network interface. +// - options - InterfacesClientBeginListEffectiveNetworkSecurityGroupsOptions contains the optional parameters for the InterfacesClient.BeginListEffectiveNetworkSecurityGroups +// method. func (client *InterfacesClient) BeginListEffectiveNetworkSecurityGroups(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientBeginListEffectiveNetworkSecurityGroupsOptions) (*runtime.Poller[InterfacesClientListEffectiveNetworkSecurityGroupsResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.listEffectiveNetworkSecurityGroups(ctx, resourceGroupName, networkInterfaceName, options) @@ -814,6 +829,7 @@ func (client *InterfacesClient) BeginListEffectiveNetworkSecurityGroups(ctx cont // ListEffectiveNetworkSecurityGroups - Gets all network security groups applied to a network interface. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *InterfacesClient) listEffectiveNetworkSecurityGroups(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientBeginListEffectiveNetworkSecurityGroupsOptions) (*http.Response, error) { req, err := client.listEffectiveNetworkSecurityGroupsCreateRequest(ctx, resourceGroupName, networkInterfaceName, options) @@ -858,13 +874,14 @@ func (client *InterfacesClient) listEffectiveNetworkSecurityGroupsCreateRequest( // NewListVirtualMachineScaleSetIPConfigurationsPager - Get the specified network interface ip configuration in a virtual // machine scale set. +// // Generated from API version 2018-10-01 -// resourceGroupName - The name of the resource group. -// virtualMachineScaleSetName - The name of the virtual machine scale set. -// virtualmachineIndex - The virtual machine index. -// networkInterfaceName - The name of the network interface. -// options - InterfacesClientListVirtualMachineScaleSetIPConfigurationsOptions contains the optional parameters for the InterfacesClient.ListVirtualMachineScaleSetIPConfigurations -// method. +// - resourceGroupName - The name of the resource group. +// - virtualMachineScaleSetName - The name of the virtual machine scale set. +// - virtualmachineIndex - The virtual machine index. +// - networkInterfaceName - The name of the network interface. +// - options - InterfacesClientListVirtualMachineScaleSetIPConfigurationsOptions contains the optional parameters for the InterfacesClient.NewListVirtualMachineScaleSetIPConfigurationsPager +// method. func (client *InterfacesClient) NewListVirtualMachineScaleSetIPConfigurationsPager(resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, options *InterfacesClientListVirtualMachineScaleSetIPConfigurationsOptions) *runtime.Pager[InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse] { return runtime.NewPager(runtime.PagingHandler[InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse]{ More: func(page InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse) bool { @@ -940,11 +957,12 @@ func (client *InterfacesClient) listVirtualMachineScaleSetIPConfigurationsHandle } // NewListVirtualMachineScaleSetNetworkInterfacesPager - Gets all network interfaces in a virtual machine scale set. +// // Generated from API version 2018-10-01 -// resourceGroupName - The name of the resource group. -// virtualMachineScaleSetName - The name of the virtual machine scale set. -// options - InterfacesClientListVirtualMachineScaleSetNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.ListVirtualMachineScaleSetNetworkInterfaces -// method. +// - resourceGroupName - The name of the resource group. +// - virtualMachineScaleSetName - The name of the virtual machine scale set. +// - options - InterfacesClientListVirtualMachineScaleSetNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.NewListVirtualMachineScaleSetNetworkInterfacesPager +// method. func (client *InterfacesClient) NewListVirtualMachineScaleSetNetworkInterfacesPager(resourceGroupName string, virtualMachineScaleSetName string, options *InterfacesClientListVirtualMachineScaleSetNetworkInterfacesOptions) *runtime.Pager[InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse] { return runtime.NewPager(runtime.PagingHandler[InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse]{ More: func(page InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse) bool { @@ -1010,12 +1028,13 @@ func (client *InterfacesClient) listVirtualMachineScaleSetNetworkInterfacesHandl // NewListVirtualMachineScaleSetVMNetworkInterfacesPager - Gets information about all network interfaces in a virtual machine // in a virtual machine scale set. +// // Generated from API version 2018-10-01 -// resourceGroupName - The name of the resource group. -// virtualMachineScaleSetName - The name of the virtual machine scale set. -// virtualmachineIndex - The virtual machine index. -// options - InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesOptions contains the optional parameters for the -// InterfacesClient.ListVirtualMachineScaleSetVMNetworkInterfaces method. +// - resourceGroupName - The name of the resource group. +// - virtualMachineScaleSetName - The name of the virtual machine scale set. +// - virtualmachineIndex - The virtual machine index. +// - options - InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesOptions contains the optional parameters for the +// InterfacesClient.NewListVirtualMachineScaleSetVMNetworkInterfacesPager method. func (client *InterfacesClient) NewListVirtualMachineScaleSetVMNetworkInterfacesPager(resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, options *InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesOptions) *runtime.Pager[InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse] { return runtime.NewPager(runtime.PagingHandler[InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse]{ More: func(page InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse) bool { @@ -1085,11 +1104,12 @@ func (client *InterfacesClient) listVirtualMachineScaleSetVMNetworkInterfacesHan // UpdateTags - Updates a network interface tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkInterfaceName - The name of the network interface. -// parameters - Parameters supplied to update network interface tags. -// options - InterfacesClientUpdateTagsOptions contains the optional parameters for the InterfacesClient.UpdateTags method. +// - resourceGroupName - The name of the resource group. +// - networkInterfaceName - The name of the network interface. +// - parameters - Parameters supplied to update network interface tags. +// - options - InterfacesClientUpdateTagsOptions contains the optional parameters for the InterfacesClient.UpdateTags method. func (client *InterfacesClient) UpdateTags(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters TagsObject, options *InterfacesClientUpdateTagsOptions) (InterfacesClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, networkInterfaceName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/interfaces_client_example_test.go b/sdk/resourcemanager/network/armnetwork/interfaces_client_example_test.go deleted file mode 100644 index 8683c3e3c2f9..000000000000 --- a/sdk/resourcemanager/network/armnetwork/interfaces_client_example_test.go +++ /dev/null @@ -1,437 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/CloudServiceRoleInstanceNetworkInterfaceList.json -func ExampleInterfacesClient_NewListCloudServiceRoleInstanceNetworkInterfacesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewInterfacesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListCloudServiceRoleInstanceNetworkInterfacesPager("rg1", "cs1", "TestVMRole_IN_0", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/CloudServiceNetworkInterfaceList.json -func ExampleInterfacesClient_NewListCloudServiceNetworkInterfacesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewInterfacesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListCloudServiceNetworkInterfacesPager("rg1", "cs1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/CloudServiceNetworkInterfaceGet.json -func ExampleInterfacesClient_GetCloudServiceNetworkInterface() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewInterfacesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetCloudServiceNetworkInterface(ctx, "rg1", "cs1", "TestVMRole_IN_0", "nic1", &armnetwork.InterfacesClientGetCloudServiceNetworkInterfaceOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkInterfaceDelete.json -func ExampleInterfacesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewInterfacesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "test-nic", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkInterfaceGet.json -func ExampleInterfacesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewInterfacesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "test-nic", &armnetwork.InterfacesClientGetOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkInterfaceCreate.json -func ExampleInterfacesClient_BeginCreateOrUpdate_createNetworkInterface() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewInterfacesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "test-nic", armnetwork.Interface{ - Location: to.Ptr("eastus"), - Properties: &armnetwork.InterfacePropertiesFormat{ - DisableTCPStateTracking: to.Ptr(true), - EnableAcceleratedNetworking: to.Ptr(true), - IPConfigurations: []*armnetwork.InterfaceIPConfiguration{ - { - Name: to.Ptr("ipconfig1"), - Properties: &armnetwork.InterfaceIPConfigurationPropertiesFormat{ - PublicIPAddress: &armnetwork.PublicIPAddress{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip"), - }, - Subnet: &armnetwork.Subnet{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/rg1-vnet/subnets/default"), - }, - }, - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkInterfaceCreateGatewayLoadBalancerConsumer.json -func ExampleInterfacesClient_BeginCreateOrUpdate_createNetworkInterfaceWithGatewayLoadBalancerConsumerConfigured() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewInterfacesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "test-nic", armnetwork.Interface{ - Location: to.Ptr("eastus"), - Properties: &armnetwork.InterfacePropertiesFormat{ - EnableAcceleratedNetworking: to.Ptr(true), - IPConfigurations: []*armnetwork.InterfaceIPConfiguration{ - { - Name: to.Ptr("ipconfig1"), - Properties: &armnetwork.InterfaceIPConfigurationPropertiesFormat{ - GatewayLoadBalancer: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb-provider"), - }, - PublicIPAddress: &armnetwork.PublicIPAddress{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip"), - }, - Subnet: &armnetwork.Subnet{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/rg1-vnet/subnets/default"), - }, - }, - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkInterfaceUpdateTags.json -func ExampleInterfacesClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewInterfacesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, "rg1", "test-nic", armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkInterfaceListAll.json -func ExampleInterfacesClient_NewListAllPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewInterfacesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListAllPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkInterfaceList.json -func ExampleInterfacesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewInterfacesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkInterfaceEffectiveRouteTableList.json -func ExampleInterfacesClient_BeginGetEffectiveRouteTable() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewInterfacesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGetEffectiveRouteTable(ctx, "rg1", "nic1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkInterfaceEffectiveNSGList.json -func ExampleInterfacesClient_BeginListEffectiveNetworkSecurityGroups() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewInterfacesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginListEffectiveNetworkSecurityGroups(ctx, "rg1", "nic1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VmssVmNetworkInterfaceList.json -func ExampleInterfacesClient_NewListVirtualMachineScaleSetVMNetworkInterfacesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewInterfacesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListVirtualMachineScaleSetVMNetworkInterfacesPager("rg1", "vmss1", "1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VmssNetworkInterfaceList.json -func ExampleInterfacesClient_NewListVirtualMachineScaleSetNetworkInterfacesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewInterfacesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListVirtualMachineScaleSetNetworkInterfacesPager("rg1", "vmss1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VmssNetworkInterfaceGet.json -func ExampleInterfacesClient_GetVirtualMachineScaleSetNetworkInterface() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewInterfacesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetVirtualMachineScaleSetNetworkInterface(ctx, "rg1", "vmss1", "1", "nic1", &armnetwork.InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VmssNetworkInterfaceIpConfigList.json -func ExampleInterfacesClient_NewListVirtualMachineScaleSetIPConfigurationsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewInterfacesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListVirtualMachineScaleSetIPConfigurationsPager("rg1", "vmss1", "2", "nic1", &armnetwork.InterfacesClientListVirtualMachineScaleSetIPConfigurationsOptions{Expand: nil}) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VmssNetworkInterfaceIpConfigGet.json -func ExampleInterfacesClient_GetVirtualMachineScaleSetIPConfiguration() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewInterfacesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetVirtualMachineScaleSetIPConfiguration(ctx, "rg1", "vmss1", "2", "nic1", "ip1", &armnetwork.InterfacesClientGetVirtualMachineScaleSetIPConfigurationOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/interfacetapconfigurations_client.go b/sdk/resourcemanager/network/armnetwork/interfacetapconfigurations_client.go index 964261a0eda0..0a6c08690b84 100644 --- a/sdk/resourcemanager/network/armnetwork/interfacetapconfigurations_client.go +++ b/sdk/resourcemanager/network/armnetwork/interfacetapconfigurations_client.go @@ -32,10 +32,10 @@ type InterfaceTapConfigurationsClient struct { } // NewInterfaceTapConfigurationsClient creates a new instance of InterfaceTapConfigurationsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewInterfaceTapConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InterfaceTapConfigurationsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewInterfaceTapConfigurationsClient(subscriptionID string, credential azcor // BeginCreateOrUpdate - Creates or updates a Tap configuration in the specified NetworkInterface. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkInterfaceName - The name of the network interface. -// tapConfigurationName - The name of the tap configuration. -// tapConfigurationParameters - Parameters supplied to the create or update tap configuration operation. -// options - InterfaceTapConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the InterfaceTapConfigurationsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - networkInterfaceName - The name of the network interface. +// - tapConfigurationName - The name of the tap configuration. +// - tapConfigurationParameters - Parameters supplied to the create or update tap configuration operation. +// - options - InterfaceTapConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the InterfaceTapConfigurationsClient.BeginCreateOrUpdate +// method. func (client *InterfaceTapConfigurationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, tapConfigurationParameters InterfaceTapConfiguration, options *InterfaceTapConfigurationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[InterfaceTapConfigurationsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, networkInterfaceName, tapConfigurationName, tapConfigurationParameters, options) @@ -81,6 +82,7 @@ func (client *InterfaceTapConfigurationsClient) BeginCreateOrUpdate(ctx context. // CreateOrUpdate - Creates or updates a Tap configuration in the specified NetworkInterface. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *InterfaceTapConfigurationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, tapConfigurationParameters InterfaceTapConfiguration, options *InterfaceTapConfigurationsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkInterfaceName, tapConfigurationName, tapConfigurationParameters, options) @@ -129,12 +131,13 @@ func (client *InterfaceTapConfigurationsClient) createOrUpdateCreateRequest(ctx // BeginDelete - Deletes the specified tap configuration from the NetworkInterface. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkInterfaceName - The name of the network interface. -// tapConfigurationName - The name of the tap configuration. -// options - InterfaceTapConfigurationsClientBeginDeleteOptions contains the optional parameters for the InterfaceTapConfigurationsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - networkInterfaceName - The name of the network interface. +// - tapConfigurationName - The name of the tap configuration. +// - options - InterfaceTapConfigurationsClientBeginDeleteOptions contains the optional parameters for the InterfaceTapConfigurationsClient.BeginDelete +// method. func (client *InterfaceTapConfigurationsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, options *InterfaceTapConfigurationsClientBeginDeleteOptions) (*runtime.Poller[InterfaceTapConfigurationsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, networkInterfaceName, tapConfigurationName, options) @@ -151,6 +154,7 @@ func (client *InterfaceTapConfigurationsClient) BeginDelete(ctx context.Context, // Delete - Deletes the specified tap configuration from the NetworkInterface. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *InterfaceTapConfigurationsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, options *InterfaceTapConfigurationsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkInterfaceName, tapConfigurationName, options) @@ -199,12 +203,13 @@ func (client *InterfaceTapConfigurationsClient) deleteCreateRequest(ctx context. // Get - Get the specified tap configuration on a network interface. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkInterfaceName - The name of the network interface. -// tapConfigurationName - The name of the tap configuration. -// options - InterfaceTapConfigurationsClientGetOptions contains the optional parameters for the InterfaceTapConfigurationsClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - networkInterfaceName - The name of the network interface. +// - tapConfigurationName - The name of the tap configuration. +// - options - InterfaceTapConfigurationsClientGetOptions contains the optional parameters for the InterfaceTapConfigurationsClient.Get +// method. func (client *InterfaceTapConfigurationsClient) Get(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, options *InterfaceTapConfigurationsClientGetOptions) (InterfaceTapConfigurationsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, networkInterfaceName, tapConfigurationName, options) if err != nil { @@ -260,11 +265,12 @@ func (client *InterfaceTapConfigurationsClient) getHandleResponse(resp *http.Res } // NewListPager - Get all Tap configurations in a network interface. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkInterfaceName - The name of the network interface. -// options - InterfaceTapConfigurationsClientListOptions contains the optional parameters for the InterfaceTapConfigurationsClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - networkInterfaceName - The name of the network interface. +// - options - InterfaceTapConfigurationsClientListOptions contains the optional parameters for the InterfaceTapConfigurationsClient.NewListPager +// method. func (client *InterfaceTapConfigurationsClient) NewListPager(resourceGroupName string, networkInterfaceName string, options *InterfaceTapConfigurationsClientListOptions) *runtime.Pager[InterfaceTapConfigurationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[InterfaceTapConfigurationsClientListResponse]{ More: func(page InterfaceTapConfigurationsClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/interfacetapconfigurations_client_example_test.go b/sdk/resourcemanager/network/armnetwork/interfacetapconfigurations_client_example_test.go deleted file mode 100644 index 0eaa0d41a0a1..000000000000 --- a/sdk/resourcemanager/network/armnetwork/interfacetapconfigurations_client_example_test.go +++ /dev/null @@ -1,111 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkInterfaceTapConfigurationDelete.json -func ExampleInterfaceTapConfigurationsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewInterfaceTapConfigurationsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "test-networkinterface", "test-tapconfiguration", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkInterfaceTapConfigurationGet.json -func ExampleInterfaceTapConfigurationsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewInterfaceTapConfigurationsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "testrg", "mynic", "tapconfiguration1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkInterfaceTapConfigurationCreate.json -func ExampleInterfaceTapConfigurationsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewInterfaceTapConfigurationsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "testrg", "mynic", "tapconfiguration1", armnetwork.InterfaceTapConfiguration{ - Properties: &armnetwork.InterfaceTapConfigurationPropertiesFormat{ - VirtualNetworkTap: &armnetwork.VirtualNetworkTap{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworkTaps/testvtap"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkInterfaceTapConfigurationList.json -func ExampleInterfaceTapConfigurationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewInterfaceTapConfigurationsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", "mynic", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ipallocations_client.go b/sdk/resourcemanager/network/armnetwork/ipallocations_client.go index eb146ddc3549..2d4922fe30ab 100644 --- a/sdk/resourcemanager/network/armnetwork/ipallocations_client.go +++ b/sdk/resourcemanager/network/armnetwork/ipallocations_client.go @@ -32,10 +32,10 @@ type IPAllocationsClient struct { } // NewIPAllocationsClient creates a new instance of IPAllocationsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewIPAllocationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IPAllocationsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewIPAllocationsClient(subscriptionID string, credential azcore.TokenCreden // BeginCreateOrUpdate - Creates or updates an IpAllocation in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// ipAllocationName - The name of the IpAllocation. -// parameters - Parameters supplied to the create or update virtual network operation. -// options - IPAllocationsClientBeginCreateOrUpdateOptions contains the optional parameters for the IPAllocationsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - ipAllocationName - The name of the IpAllocation. +// - parameters - Parameters supplied to the create or update virtual network operation. +// - options - IPAllocationsClientBeginCreateOrUpdateOptions contains the optional parameters for the IPAllocationsClient.BeginCreateOrUpdate +// method. func (client *IPAllocationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, ipAllocationName string, parameters IPAllocation, options *IPAllocationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[IPAllocationsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, ipAllocationName, parameters, options) @@ -80,6 +81,7 @@ func (client *IPAllocationsClient) BeginCreateOrUpdate(ctx context.Context, reso // CreateOrUpdate - Creates or updates an IpAllocation in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *IPAllocationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, ipAllocationName string, parameters IPAllocation, options *IPAllocationsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, ipAllocationName, parameters, options) @@ -124,11 +126,12 @@ func (client *IPAllocationsClient) createOrUpdateCreateRequest(ctx context.Conte // BeginDelete - Deletes the specified IpAllocation. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// ipAllocationName - The name of the IpAllocation. -// options - IPAllocationsClientBeginDeleteOptions contains the optional parameters for the IPAllocationsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - ipAllocationName - The name of the IpAllocation. +// - options - IPAllocationsClientBeginDeleteOptions contains the optional parameters for the IPAllocationsClient.BeginDelete +// method. func (client *IPAllocationsClient) BeginDelete(ctx context.Context, resourceGroupName string, ipAllocationName string, options *IPAllocationsClientBeginDeleteOptions) (*runtime.Poller[IPAllocationsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, ipAllocationName, options) @@ -145,6 +148,7 @@ func (client *IPAllocationsClient) BeginDelete(ctx context.Context, resourceGrou // Delete - Deletes the specified IpAllocation. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *IPAllocationsClient) deleteOperation(ctx context.Context, resourceGroupName string, ipAllocationName string, options *IPAllocationsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, ipAllocationName, options) @@ -189,10 +193,11 @@ func (client *IPAllocationsClient) deleteCreateRequest(ctx context.Context, reso // Get - Gets the specified IpAllocation by resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// ipAllocationName - The name of the IpAllocation. -// options - IPAllocationsClientGetOptions contains the optional parameters for the IPAllocationsClient.Get method. +// - resourceGroupName - The name of the resource group. +// - ipAllocationName - The name of the IpAllocation. +// - options - IPAllocationsClientGetOptions contains the optional parameters for the IPAllocationsClient.Get method. func (client *IPAllocationsClient) Get(ctx context.Context, resourceGroupName string, ipAllocationName string, options *IPAllocationsClientGetOptions) (IPAllocationsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, ipAllocationName, options) if err != nil { @@ -247,8 +252,9 @@ func (client *IPAllocationsClient) getHandleResponse(resp *http.Response) (IPAll } // NewListPager - Gets all IpAllocations in a subscription. +// // Generated from API version 2022-07-01 -// options - IPAllocationsClientListOptions contains the optional parameters for the IPAllocationsClient.List method. +// - options - IPAllocationsClientListOptions contains the optional parameters for the IPAllocationsClient.NewListPager method. func (client *IPAllocationsClient) NewListPager(options *IPAllocationsClientListOptions) *runtime.Pager[IPAllocationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[IPAllocationsClientListResponse]{ More: func(page IPAllocationsClientListResponse) bool { @@ -305,10 +311,11 @@ func (client *IPAllocationsClient) listHandleResponse(resp *http.Response) (IPAl } // NewListByResourceGroupPager - Gets all IpAllocations in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - IPAllocationsClientListByResourceGroupOptions contains the optional parameters for the IPAllocationsClient.ListByResourceGroup -// method. +// - resourceGroupName - The name of the resource group. +// - options - IPAllocationsClientListByResourceGroupOptions contains the optional parameters for the IPAllocationsClient.NewListByResourceGroupPager +// method. func (client *IPAllocationsClient) NewListByResourceGroupPager(resourceGroupName string, options *IPAllocationsClientListByResourceGroupOptions) *runtime.Pager[IPAllocationsClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[IPAllocationsClientListByResourceGroupResponse]{ More: func(page IPAllocationsClientListByResourceGroupResponse) bool { @@ -370,12 +377,13 @@ func (client *IPAllocationsClient) listByResourceGroupHandleResponse(resp *http. // UpdateTags - Updates a IpAllocation tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// ipAllocationName - The name of the IpAllocation. -// parameters - Parameters supplied to update IpAllocation tags. -// options - IPAllocationsClientUpdateTagsOptions contains the optional parameters for the IPAllocationsClient.UpdateTags -// method. +// - resourceGroupName - The name of the resource group. +// - ipAllocationName - The name of the IpAllocation. +// - parameters - Parameters supplied to update IpAllocation tags. +// - options - IPAllocationsClientUpdateTagsOptions contains the optional parameters for the IPAllocationsClient.UpdateTags +// method. func (client *IPAllocationsClient) UpdateTags(ctx context.Context, resourceGroupName string, ipAllocationName string, parameters TagsObject, options *IPAllocationsClientUpdateTagsOptions) (IPAllocationsClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, ipAllocationName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/ipallocations_client_example_test.go b/sdk/resourcemanager/network/armnetwork/ipallocations_client_example_test.go deleted file mode 100644 index c3a5f10a8c47..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ipallocations_client_example_test.go +++ /dev/null @@ -1,162 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/IpAllocationDelete.json -func ExampleIPAllocationsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewIPAllocationsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "test-ipallocation", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/IpAllocationGet.json -func ExampleIPAllocationsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewIPAllocationsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "test-ipallocation", &armnetwork.IPAllocationsClientGetOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/IpAllocationCreate.json -func ExampleIPAllocationsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewIPAllocationsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "test-ipallocation", armnetwork.IPAllocation{ - Location: to.Ptr("centraluseuap"), - Properties: &armnetwork.IPAllocationPropertiesFormat{ - Type: to.Ptr(armnetwork.IPAllocationTypeHypernet), - AllocationTags: map[string]*string{ - "VNetID": to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/HypernetVnet1"), - }, - Prefix: to.Ptr("3.2.5.0/24"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/IpAllocationUpdateTags.json -func ExampleIPAllocationsClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewIPAllocationsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, "rg1", "test-ipallocation", armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/IpAllocationList.json -func ExampleIPAllocationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewIPAllocationsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/IpAllocationListByResourceGroup.json -func ExampleIPAllocationsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewIPAllocationsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ipgroups_client.go b/sdk/resourcemanager/network/armnetwork/ipgroups_client.go index bd77e1d084e1..e4fd5dc73ffb 100644 --- a/sdk/resourcemanager/network/armnetwork/ipgroups_client.go +++ b/sdk/resourcemanager/network/armnetwork/ipgroups_client.go @@ -32,10 +32,10 @@ type IPGroupsClient struct { } // NewIPGroupsClient creates a new instance of IPGroupsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewIPGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IPGroupsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewIPGroupsClient(subscriptionID string, credential azcore.TokenCredential, // BeginCreateOrUpdate - Creates or updates an ipGroups in a specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// ipGroupsName - The name of the ipGroups. -// parameters - Parameters supplied to the create or update IpGroups operation. -// options - IPGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the IPGroupsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - ipGroupsName - The name of the ipGroups. +// - parameters - Parameters supplied to the create or update IpGroups operation. +// - options - IPGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the IPGroupsClient.BeginCreateOrUpdate +// method. func (client *IPGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, ipGroupsName string, parameters IPGroup, options *IPGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[IPGroupsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, ipGroupsName, parameters, options) @@ -80,6 +81,7 @@ func (client *IPGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceG // CreateOrUpdate - Creates or updates an ipGroups in a specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *IPGroupsClient) createOrUpdate(ctx context.Context, resourceGroupName string, ipGroupsName string, parameters IPGroup, options *IPGroupsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, ipGroupsName, parameters, options) @@ -124,10 +126,11 @@ func (client *IPGroupsClient) createOrUpdateCreateRequest(ctx context.Context, r // BeginDelete - Deletes the specified ipGroups. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// ipGroupsName - The name of the ipGroups. -// options - IPGroupsClientBeginDeleteOptions contains the optional parameters for the IPGroupsClient.BeginDelete method. +// - resourceGroupName - The name of the resource group. +// - ipGroupsName - The name of the ipGroups. +// - options - IPGroupsClientBeginDeleteOptions contains the optional parameters for the IPGroupsClient.BeginDelete method. func (client *IPGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, ipGroupsName string, options *IPGroupsClientBeginDeleteOptions) (*runtime.Poller[IPGroupsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, ipGroupsName, options) @@ -144,6 +147,7 @@ func (client *IPGroupsClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Deletes the specified ipGroups. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *IPGroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, ipGroupsName string, options *IPGroupsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, ipGroupsName, options) @@ -188,10 +192,11 @@ func (client *IPGroupsClient) deleteCreateRequest(ctx context.Context, resourceG // Get - Gets the specified ipGroups. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// ipGroupsName - The name of the ipGroups. -// options - IPGroupsClientGetOptions contains the optional parameters for the IPGroupsClient.Get method. +// - resourceGroupName - The name of the resource group. +// - ipGroupsName - The name of the ipGroups. +// - options - IPGroupsClientGetOptions contains the optional parameters for the IPGroupsClient.Get method. func (client *IPGroupsClient) Get(ctx context.Context, resourceGroupName string, ipGroupsName string, options *IPGroupsClientGetOptions) (IPGroupsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, ipGroupsName, options) if err != nil { @@ -246,8 +251,9 @@ func (client *IPGroupsClient) getHandleResponse(resp *http.Response) (IPGroupsCl } // NewListPager - Gets all IpGroups in a subscription. +// // Generated from API version 2022-07-01 -// options - IPGroupsClientListOptions contains the optional parameters for the IPGroupsClient.List method. +// - options - IPGroupsClientListOptions contains the optional parameters for the IPGroupsClient.NewListPager method. func (client *IPGroupsClient) NewListPager(options *IPGroupsClientListOptions) *runtime.Pager[IPGroupsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[IPGroupsClientListResponse]{ More: func(page IPGroupsClientListResponse) bool { @@ -304,10 +310,11 @@ func (client *IPGroupsClient) listHandleResponse(resp *http.Response) (IPGroupsC } // NewListByResourceGroupPager - Gets all IpGroups in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - IPGroupsClientListByResourceGroupOptions contains the optional parameters for the IPGroupsClient.ListByResourceGroup -// method. +// - resourceGroupName - The name of the resource group. +// - options - IPGroupsClientListByResourceGroupOptions contains the optional parameters for the IPGroupsClient.NewListByResourceGroupPager +// method. func (client *IPGroupsClient) NewListByResourceGroupPager(resourceGroupName string, options *IPGroupsClientListByResourceGroupOptions) *runtime.Pager[IPGroupsClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[IPGroupsClientListByResourceGroupResponse]{ More: func(page IPGroupsClientListByResourceGroupResponse) bool { @@ -369,11 +376,12 @@ func (client *IPGroupsClient) listByResourceGroupHandleResponse(resp *http.Respo // UpdateGroups - Updates tags of an IpGroups resource. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// ipGroupsName - The name of the ipGroups. -// parameters - Parameters supplied to the update ipGroups operation. -// options - IPGroupsClientUpdateGroupsOptions contains the optional parameters for the IPGroupsClient.UpdateGroups method. +// - resourceGroupName - The name of the resource group. +// - ipGroupsName - The name of the ipGroups. +// - parameters - Parameters supplied to the update ipGroups operation. +// - options - IPGroupsClientUpdateGroupsOptions contains the optional parameters for the IPGroupsClient.UpdateGroups method. func (client *IPGroupsClient) UpdateGroups(ctx context.Context, resourceGroupName string, ipGroupsName string, parameters TagsObject, options *IPGroupsClientUpdateGroupsOptions) (IPGroupsClientUpdateGroupsResponse, error) { req, err := client.updateGroupsCreateRequest(ctx, resourceGroupName, ipGroupsName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/ipgroups_client_example_test.go b/sdk/resourcemanager/network/armnetwork/ipgroups_client_example_test.go deleted file mode 100644 index 57edc1e96822..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ipgroups_client_example_test.go +++ /dev/null @@ -1,164 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/IpGroupsGet.json -func ExampleIPGroupsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewIPGroupsClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "myResourceGroup", "ipGroups1", &armnetwork.IPGroupsClientGetOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/IpGroupsCreate.json -func ExampleIPGroupsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewIPGroupsClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "myResourceGroup", "ipGroups1", armnetwork.IPGroup{ - Location: to.Ptr("West US"), - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - }, - Properties: &armnetwork.IPGroupPropertiesFormat{ - IPAddresses: []*string{ - to.Ptr("13.64.39.16/32"), - to.Ptr("40.74.146.80/31"), - to.Ptr("40.74.147.32/28")}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/IpGroupsUpdateTags.json -func ExampleIPGroupsClient_UpdateGroups() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewIPGroupsClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateGroups(ctx, "myResourceGroup", "ipGroups1", armnetwork.TagsObject{ - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - "key2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/IpGroupsDelete.json -func ExampleIPGroupsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewIPGroupsClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "myResourceGroup", "ipGroups1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/IpGroupsListByResourceGroup.json -func ExampleIPGroupsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewIPGroupsClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("myResourceGroup", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/IpGroupsListBySubscription.json -func ExampleIPGroupsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewIPGroupsClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/loadbalancerbackendaddresspools_client.go b/sdk/resourcemanager/network/armnetwork/loadbalancerbackendaddresspools_client.go index e195b8e14e55..24e8a33ab76d 100644 --- a/sdk/resourcemanager/network/armnetwork/loadbalancerbackendaddresspools_client.go +++ b/sdk/resourcemanager/network/armnetwork/loadbalancerbackendaddresspools_client.go @@ -32,10 +32,10 @@ type LoadBalancerBackendAddressPoolsClient struct { } // NewLoadBalancerBackendAddressPoolsClient creates a new instance of LoadBalancerBackendAddressPoolsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancerBackendAddressPoolsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string, credential // BeginCreateOrUpdate - Creates or updates a load balancer backend address pool. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// backendAddressPoolName - The name of the backend address pool. -// parameters - Parameters supplied to the create or update load balancer backend address pool operation. -// options - LoadBalancerBackendAddressPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - backendAddressPoolName - The name of the backend address pool. +// - parameters - Parameters supplied to the create or update load balancer backend address pool operation. +// - options - LoadBalancerBackendAddressPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.BeginCreateOrUpdate +// method. func (client *LoadBalancerBackendAddressPoolsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string, parameters BackendAddressPool, options *LoadBalancerBackendAddressPoolsClientBeginCreateOrUpdateOptions) (*runtime.Poller[LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, loadBalancerName, backendAddressPoolName, parameters, options) @@ -81,6 +82,7 @@ func (client *LoadBalancerBackendAddressPoolsClient) BeginCreateOrUpdate(ctx con // CreateOrUpdate - Creates or updates a load balancer backend address pool. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *LoadBalancerBackendAddressPoolsClient) createOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string, parameters BackendAddressPool, options *LoadBalancerBackendAddressPoolsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, loadBalancerName, backendAddressPoolName, parameters, options) @@ -129,12 +131,13 @@ func (client *LoadBalancerBackendAddressPoolsClient) createOrUpdateCreateRequest // BeginDelete - Deletes the specified load balancer backend address pool. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// backendAddressPoolName - The name of the backend address pool. -// options - LoadBalancerBackendAddressPoolsClientBeginDeleteOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - backendAddressPoolName - The name of the backend address pool. +// - options - LoadBalancerBackendAddressPoolsClientBeginDeleteOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.BeginDelete +// method. func (client *LoadBalancerBackendAddressPoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string, options *LoadBalancerBackendAddressPoolsClientBeginDeleteOptions) (*runtime.Poller[LoadBalancerBackendAddressPoolsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, loadBalancerName, backendAddressPoolName, options) @@ -151,6 +154,7 @@ func (client *LoadBalancerBackendAddressPoolsClient) BeginDelete(ctx context.Con // Delete - Deletes the specified load balancer backend address pool. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *LoadBalancerBackendAddressPoolsClient) deleteOperation(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string, options *LoadBalancerBackendAddressPoolsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, loadBalancerName, backendAddressPoolName, options) @@ -199,12 +203,13 @@ func (client *LoadBalancerBackendAddressPoolsClient) deleteCreateRequest(ctx con // Get - Gets load balancer backend address pool. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// backendAddressPoolName - The name of the backend address pool. -// options - LoadBalancerBackendAddressPoolsClientGetOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - backendAddressPoolName - The name of the backend address pool. +// - options - LoadBalancerBackendAddressPoolsClientGetOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.Get +// method. func (client *LoadBalancerBackendAddressPoolsClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string, options *LoadBalancerBackendAddressPoolsClientGetOptions) (LoadBalancerBackendAddressPoolsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, loadBalancerName, backendAddressPoolName, options) if err != nil { @@ -260,11 +265,12 @@ func (client *LoadBalancerBackendAddressPoolsClient) getHandleResponse(resp *htt } // NewListPager - Gets all the load balancer backed address pools. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// options - LoadBalancerBackendAddressPoolsClientListOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - options - LoadBalancerBackendAddressPoolsClientListOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.NewListPager +// method. func (client *LoadBalancerBackendAddressPoolsClient) NewListPager(resourceGroupName string, loadBalancerName string, options *LoadBalancerBackendAddressPoolsClientListOptions) *runtime.Pager[LoadBalancerBackendAddressPoolsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[LoadBalancerBackendAddressPoolsClientListResponse]{ More: func(page LoadBalancerBackendAddressPoolsClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/loadbalancerbackendaddresspools_client_example_test.go b/sdk/resourcemanager/network/armnetwork/loadbalancerbackendaddresspools_client_example_test.go deleted file mode 100644 index 2a1d6fa93f15..000000000000 --- a/sdk/resourcemanager/network/armnetwork/loadbalancerbackendaddresspools_client_example_test.go +++ /dev/null @@ -1,170 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LBBackendAddressPoolListWithBackendAddressesPoolType.json -func ExampleLoadBalancerBackendAddressPoolsClient_NewListPager_loadBalancerWithBackendAddressPoolContainingBackendAddresses() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancerBackendAddressPoolsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("testrg", "lb", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LoadBalancerBackendAddressPoolList.json -func ExampleLoadBalancerBackendAddressPoolsClient_NewListPager_loadBalancerBackendAddressPoolList() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancerBackendAddressPoolsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("testrg", "lb", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json -func ExampleLoadBalancerBackendAddressPoolsClient_Get_loadBalancerWithBackendAddressPoolWithBackendAddresses() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancerBackendAddressPoolsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "testrg", "lb", "backend", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LoadBalancerBackendAddressPoolGet.json -func ExampleLoadBalancerBackendAddressPoolsClient_Get_loadBalancerBackendAddressPoolGet() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancerBackendAddressPoolsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "testrg", "lb", "backend", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LBBackendAddressPoolWithBackendAddressesPut.json -func ExampleLoadBalancerBackendAddressPoolsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancerBackendAddressPoolsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "testrg", "lb", "backend", armnetwork.BackendAddressPool{ - Properties: &armnetwork.BackendAddressPoolPropertiesFormat{ - LoadBalancerBackendAddresses: []*armnetwork.LoadBalancerBackendAddress{ - { - Name: to.Ptr("address1"), - Properties: &armnetwork.LoadBalancerBackendAddressPropertiesFormat{ - IPAddress: to.Ptr("10.0.0.4"), - VirtualNetwork: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb"), - }, - }, - }, - { - Name: to.Ptr("address2"), - Properties: &armnetwork.LoadBalancerBackendAddressPropertiesFormat{ - IPAddress: to.Ptr("10.0.0.5"), - VirtualNetwork: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb"), - }, - }, - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LoadBalancerBackendAddressPoolDelete.json -func ExampleLoadBalancerBackendAddressPoolsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancerBackendAddressPoolsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "testrg", "lb", "backend", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/network/armnetwork/loadbalancerfrontendipconfigurations_client.go b/sdk/resourcemanager/network/armnetwork/loadbalancerfrontendipconfigurations_client.go index 3df12e0e63f4..463648b3943e 100644 --- a/sdk/resourcemanager/network/armnetwork/loadbalancerfrontendipconfigurations_client.go +++ b/sdk/resourcemanager/network/armnetwork/loadbalancerfrontendipconfigurations_client.go @@ -32,10 +32,10 @@ type LoadBalancerFrontendIPConfigurationsClient struct { } // NewLoadBalancerFrontendIPConfigurationsClient creates a new instance of LoadBalancerFrontendIPConfigurationsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancerFrontendIPConfigurationsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string, creden // Get - Gets load balancer frontend IP configuration. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// frontendIPConfigurationName - The name of the frontend IP configuration. -// options - LoadBalancerFrontendIPConfigurationsClientGetOptions contains the optional parameters for the LoadBalancerFrontendIPConfigurationsClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - frontendIPConfigurationName - The name of the frontend IP configuration. +// - options - LoadBalancerFrontendIPConfigurationsClientGetOptions contains the optional parameters for the LoadBalancerFrontendIPConfigurationsClient.Get +// method. func (client *LoadBalancerFrontendIPConfigurationsClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, frontendIPConfigurationName string, options *LoadBalancerFrontendIPConfigurationsClientGetOptions) (LoadBalancerFrontendIPConfigurationsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, loadBalancerName, frontendIPConfigurationName, options) if err != nil { @@ -119,11 +120,12 @@ func (client *LoadBalancerFrontendIPConfigurationsClient) getHandleResponse(resp } // NewListPager - Gets all the load balancer frontend IP configurations. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// options - LoadBalancerFrontendIPConfigurationsClientListOptions contains the optional parameters for the LoadBalancerFrontendIPConfigurationsClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - options - LoadBalancerFrontendIPConfigurationsClientListOptions contains the optional parameters for the LoadBalancerFrontendIPConfigurationsClient.NewListPager +// method. func (client *LoadBalancerFrontendIPConfigurationsClient) NewListPager(resourceGroupName string, loadBalancerName string, options *LoadBalancerFrontendIPConfigurationsClientListOptions) *runtime.Pager[LoadBalancerFrontendIPConfigurationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[LoadBalancerFrontendIPConfigurationsClientListResponse]{ More: func(page LoadBalancerFrontendIPConfigurationsClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/loadbalancerfrontendipconfigurations_client_example_test.go b/sdk/resourcemanager/network/armnetwork/loadbalancerfrontendipconfigurations_client_example_test.go deleted file mode 100644 index ae2c016b1add..000000000000 --- a/sdk/resourcemanager/network/armnetwork/loadbalancerfrontendipconfigurations_client_example_test.go +++ /dev/null @@ -1,60 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LoadBalancerFrontendIPConfigurationList.json -func ExampleLoadBalancerFrontendIPConfigurationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancerFrontendIPConfigurationsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("testrg", "lb", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LoadBalancerFrontendIPConfigurationGet.json -func ExampleLoadBalancerFrontendIPConfigurationsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancerFrontendIPConfigurationsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "testrg", "lb", "frontend", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/loadbalancerloadbalancingrules_client.go b/sdk/resourcemanager/network/armnetwork/loadbalancerloadbalancingrules_client.go index cd2c608b0d95..f67d2d3fecf1 100644 --- a/sdk/resourcemanager/network/armnetwork/loadbalancerloadbalancingrules_client.go +++ b/sdk/resourcemanager/network/armnetwork/loadbalancerloadbalancingrules_client.go @@ -32,10 +32,10 @@ type LoadBalancerLoadBalancingRulesClient struct { } // NewLoadBalancerLoadBalancingRulesClient creates a new instance of LoadBalancerLoadBalancingRulesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancerLoadBalancingRulesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string, credential a // Get - Gets the specified load balancer load balancing rule. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// loadBalancingRuleName - The name of the load balancing rule. -// options - LoadBalancerLoadBalancingRulesClientGetOptions contains the optional parameters for the LoadBalancerLoadBalancingRulesClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - loadBalancingRuleName - The name of the load balancing rule. +// - options - LoadBalancerLoadBalancingRulesClientGetOptions contains the optional parameters for the LoadBalancerLoadBalancingRulesClient.Get +// method. func (client *LoadBalancerLoadBalancingRulesClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, loadBalancingRuleName string, options *LoadBalancerLoadBalancingRulesClientGetOptions) (LoadBalancerLoadBalancingRulesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, loadBalancerName, loadBalancingRuleName, options) if err != nil { @@ -119,11 +120,12 @@ func (client *LoadBalancerLoadBalancingRulesClient) getHandleResponse(resp *http } // NewListPager - Gets all the load balancing rules in a load balancer. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// options - LoadBalancerLoadBalancingRulesClientListOptions contains the optional parameters for the LoadBalancerLoadBalancingRulesClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - options - LoadBalancerLoadBalancingRulesClientListOptions contains the optional parameters for the LoadBalancerLoadBalancingRulesClient.NewListPager +// method. func (client *LoadBalancerLoadBalancingRulesClient) NewListPager(resourceGroupName string, loadBalancerName string, options *LoadBalancerLoadBalancingRulesClientListOptions) *runtime.Pager[LoadBalancerLoadBalancingRulesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[LoadBalancerLoadBalancingRulesClientListResponse]{ More: func(page LoadBalancerLoadBalancingRulesClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/loadbalancerloadbalancingrules_client_example_test.go b/sdk/resourcemanager/network/armnetwork/loadbalancerloadbalancingrules_client_example_test.go deleted file mode 100644 index fc3aaba8fb73..000000000000 --- a/sdk/resourcemanager/network/armnetwork/loadbalancerloadbalancingrules_client_example_test.go +++ /dev/null @@ -1,60 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LoadBalancerLoadBalancingRuleList.json -func ExampleLoadBalancerLoadBalancingRulesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancerLoadBalancingRulesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("testrg", "lb1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LoadBalancerLoadBalancingRuleGet.json -func ExampleLoadBalancerLoadBalancingRulesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancerLoadBalancingRulesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "testrg", "lb1", "rule1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/loadbalancernetworkinterfaces_client.go b/sdk/resourcemanager/network/armnetwork/loadbalancernetworkinterfaces_client.go index 4f2b02b9c64e..bf405d5632bb 100644 --- a/sdk/resourcemanager/network/armnetwork/loadbalancernetworkinterfaces_client.go +++ b/sdk/resourcemanager/network/armnetwork/loadbalancernetworkinterfaces_client.go @@ -32,10 +32,10 @@ type LoadBalancerNetworkInterfacesClient struct { } // NewLoadBalancerNetworkInterfacesClient creates a new instance of LoadBalancerNetworkInterfacesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewLoadBalancerNetworkInterfacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancerNetworkInterfacesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,11 +57,12 @@ func NewLoadBalancerNetworkInterfacesClient(subscriptionID string, credential az } // NewListPager - Gets associated load balancer network interfaces. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// options - LoadBalancerNetworkInterfacesClientListOptions contains the optional parameters for the LoadBalancerNetworkInterfacesClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - options - LoadBalancerNetworkInterfacesClientListOptions contains the optional parameters for the LoadBalancerNetworkInterfacesClient.NewListPager +// method. func (client *LoadBalancerNetworkInterfacesClient) NewListPager(resourceGroupName string, loadBalancerName string, options *LoadBalancerNetworkInterfacesClientListOptions) *runtime.Pager[LoadBalancerNetworkInterfacesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[LoadBalancerNetworkInterfacesClientListResponse]{ More: func(page LoadBalancerNetworkInterfacesClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/loadbalancernetworkinterfaces_client_example_test.go b/sdk/resourcemanager/network/armnetwork/loadbalancernetworkinterfaces_client_example_test.go deleted file mode 100644 index afc5e3ed8215..000000000000 --- a/sdk/resourcemanager/network/armnetwork/loadbalancernetworkinterfaces_client_example_test.go +++ /dev/null @@ -1,65 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LoadBalancerNetworkInterfaceListSimple.json -func ExampleLoadBalancerNetworkInterfacesClient_NewListPager_loadBalancerNetworkInterfaceListSimple() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancerNetworkInterfacesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("testrg", "lb", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LoadBalancerNetworkInterfaceListVmss.json -func ExampleLoadBalancerNetworkInterfacesClient_NewListPager_loadBalancerNetworkInterfaceListVmss() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancerNetworkInterfacesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("testrg", "lb", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/loadbalanceroutboundrules_client.go b/sdk/resourcemanager/network/armnetwork/loadbalanceroutboundrules_client.go index 7c029db3b044..88d4288b3fc0 100644 --- a/sdk/resourcemanager/network/armnetwork/loadbalanceroutboundrules_client.go +++ b/sdk/resourcemanager/network/armnetwork/loadbalanceroutboundrules_client.go @@ -32,10 +32,10 @@ type LoadBalancerOutboundRulesClient struct { } // NewLoadBalancerOutboundRulesClient creates a new instance of LoadBalancerOutboundRulesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewLoadBalancerOutboundRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancerOutboundRulesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewLoadBalancerOutboundRulesClient(subscriptionID string, credential azcore // Get - Gets the specified load balancer outbound rule. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// outboundRuleName - The name of the outbound rule. -// options - LoadBalancerOutboundRulesClientGetOptions contains the optional parameters for the LoadBalancerOutboundRulesClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - outboundRuleName - The name of the outbound rule. +// - options - LoadBalancerOutboundRulesClientGetOptions contains the optional parameters for the LoadBalancerOutboundRulesClient.Get +// method. func (client *LoadBalancerOutboundRulesClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, outboundRuleName string, options *LoadBalancerOutboundRulesClientGetOptions) (LoadBalancerOutboundRulesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, loadBalancerName, outboundRuleName, options) if err != nil { @@ -119,11 +120,12 @@ func (client *LoadBalancerOutboundRulesClient) getHandleResponse(resp *http.Resp } // NewListPager - Gets all the outbound rules in a load balancer. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// options - LoadBalancerOutboundRulesClientListOptions contains the optional parameters for the LoadBalancerOutboundRulesClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - options - LoadBalancerOutboundRulesClientListOptions contains the optional parameters for the LoadBalancerOutboundRulesClient.NewListPager +// method. func (client *LoadBalancerOutboundRulesClient) NewListPager(resourceGroupName string, loadBalancerName string, options *LoadBalancerOutboundRulesClientListOptions) *runtime.Pager[LoadBalancerOutboundRulesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[LoadBalancerOutboundRulesClientListResponse]{ More: func(page LoadBalancerOutboundRulesClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/loadbalanceroutboundrules_client_example_test.go b/sdk/resourcemanager/network/armnetwork/loadbalanceroutboundrules_client_example_test.go deleted file mode 100644 index 2b9e3d2ce555..000000000000 --- a/sdk/resourcemanager/network/armnetwork/loadbalanceroutboundrules_client_example_test.go +++ /dev/null @@ -1,60 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LoadBalancerOutboundRuleList.json -func ExampleLoadBalancerOutboundRulesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancerOutboundRulesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("testrg", "lb1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LoadBalancerOutboundRuleGet.json -func ExampleLoadBalancerOutboundRulesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancerOutboundRulesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "testrg", "lb1", "rule1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/loadbalancerprobes_client.go b/sdk/resourcemanager/network/armnetwork/loadbalancerprobes_client.go index 6f872ee7856d..1c812c927165 100644 --- a/sdk/resourcemanager/network/armnetwork/loadbalancerprobes_client.go +++ b/sdk/resourcemanager/network/armnetwork/loadbalancerprobes_client.go @@ -32,10 +32,10 @@ type LoadBalancerProbesClient struct { } // NewLoadBalancerProbesClient creates a new instance of LoadBalancerProbesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewLoadBalancerProbesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancerProbesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,11 +58,12 @@ func NewLoadBalancerProbesClient(subscriptionID string, credential azcore.TokenC // Get - Gets load balancer probe. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// probeName - The name of the probe. -// options - LoadBalancerProbesClientGetOptions contains the optional parameters for the LoadBalancerProbesClient.Get method. +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - probeName - The name of the probe. +// - options - LoadBalancerProbesClientGetOptions contains the optional parameters for the LoadBalancerProbesClient.Get method. func (client *LoadBalancerProbesClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, probeName string, options *LoadBalancerProbesClientGetOptions) (LoadBalancerProbesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, loadBalancerName, probeName, options) if err != nil { @@ -118,10 +119,12 @@ func (client *LoadBalancerProbesClient) getHandleResponse(resp *http.Response) ( } // NewListPager - Gets all the load balancer probes. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// options - LoadBalancerProbesClientListOptions contains the optional parameters for the LoadBalancerProbesClient.List method. +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - options - LoadBalancerProbesClientListOptions contains the optional parameters for the LoadBalancerProbesClient.NewListPager +// method. func (client *LoadBalancerProbesClient) NewListPager(resourceGroupName string, loadBalancerName string, options *LoadBalancerProbesClientListOptions) *runtime.Pager[LoadBalancerProbesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[LoadBalancerProbesClientListResponse]{ More: func(page LoadBalancerProbesClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/loadbalancerprobes_client_example_test.go b/sdk/resourcemanager/network/armnetwork/loadbalancerprobes_client_example_test.go deleted file mode 100644 index 9db2d87586f7..000000000000 --- a/sdk/resourcemanager/network/armnetwork/loadbalancerprobes_client_example_test.go +++ /dev/null @@ -1,60 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LoadBalancerProbeList.json -func ExampleLoadBalancerProbesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancerProbesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("testrg", "lb", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LoadBalancerProbeGet.json -func ExampleLoadBalancerProbesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancerProbesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "testrg", "lb", "probe1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/loadbalancers_client.go b/sdk/resourcemanager/network/armnetwork/loadbalancers_client.go index 432fbdb21295..f9ff2fec24cd 100644 --- a/sdk/resourcemanager/network/armnetwork/loadbalancers_client.go +++ b/sdk/resourcemanager/network/armnetwork/loadbalancers_client.go @@ -32,10 +32,10 @@ type LoadBalancersClient struct { } // NewLoadBalancersClient creates a new instance of LoadBalancersClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewLoadBalancersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancersClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewLoadBalancersClient(subscriptionID string, credential azcore.TokenCreden // BeginCreateOrUpdate - Creates or updates a load balancer. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// parameters - Parameters supplied to the create or update load balancer operation. -// options - LoadBalancersClientBeginCreateOrUpdateOptions contains the optional parameters for the LoadBalancersClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - parameters - Parameters supplied to the create or update load balancer operation. +// - options - LoadBalancersClientBeginCreateOrUpdateOptions contains the optional parameters for the LoadBalancersClient.BeginCreateOrUpdate +// method. func (client *LoadBalancersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters LoadBalancer, options *LoadBalancersClientBeginCreateOrUpdateOptions) (*runtime.Poller[LoadBalancersClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, loadBalancerName, parameters, options) @@ -80,6 +81,7 @@ func (client *LoadBalancersClient) BeginCreateOrUpdate(ctx context.Context, reso // CreateOrUpdate - Creates or updates a load balancer. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *LoadBalancersClient) createOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters LoadBalancer, options *LoadBalancersClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, loadBalancerName, parameters, options) @@ -124,11 +126,12 @@ func (client *LoadBalancersClient) createOrUpdateCreateRequest(ctx context.Conte // BeginDelete - Deletes the specified load balancer. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// options - LoadBalancersClientBeginDeleteOptions contains the optional parameters for the LoadBalancersClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - options - LoadBalancersClientBeginDeleteOptions contains the optional parameters for the LoadBalancersClient.BeginDelete +// method. func (client *LoadBalancersClient) BeginDelete(ctx context.Context, resourceGroupName string, loadBalancerName string, options *LoadBalancersClientBeginDeleteOptions) (*runtime.Poller[LoadBalancersClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, loadBalancerName, options) @@ -145,6 +148,7 @@ func (client *LoadBalancersClient) BeginDelete(ctx context.Context, resourceGrou // Delete - Deletes the specified load balancer. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *LoadBalancersClient) deleteOperation(ctx context.Context, resourceGroupName string, loadBalancerName string, options *LoadBalancersClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, loadBalancerName, options) @@ -189,10 +193,11 @@ func (client *LoadBalancersClient) deleteCreateRequest(ctx context.Context, reso // Get - Gets the specified load balancer. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// options - LoadBalancersClientGetOptions contains the optional parameters for the LoadBalancersClient.Get method. +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - options - LoadBalancersClientGetOptions contains the optional parameters for the LoadBalancersClient.Get method. func (client *LoadBalancersClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, options *LoadBalancersClientGetOptions) (LoadBalancersClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, loadBalancerName, options) if err != nil { @@ -247,9 +252,10 @@ func (client *LoadBalancersClient) getHandleResponse(resp *http.Response) (LoadB } // NewListPager - Gets all the load balancers in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - LoadBalancersClientListOptions contains the optional parameters for the LoadBalancersClient.List method. +// - resourceGroupName - The name of the resource group. +// - options - LoadBalancersClientListOptions contains the optional parameters for the LoadBalancersClient.NewListPager method. func (client *LoadBalancersClient) NewListPager(resourceGroupName string, options *LoadBalancersClientListOptions) *runtime.Pager[LoadBalancersClientListResponse] { return runtime.NewPager(runtime.PagingHandler[LoadBalancersClientListResponse]{ More: func(page LoadBalancersClientListResponse) bool { @@ -310,8 +316,10 @@ func (client *LoadBalancersClient) listHandleResponse(resp *http.Response) (Load } // NewListAllPager - Gets all the load balancers in a subscription. +// // Generated from API version 2022-07-01 -// options - LoadBalancersClientListAllOptions contains the optional parameters for the LoadBalancersClient.ListAll method. +// - options - LoadBalancersClientListAllOptions contains the optional parameters for the LoadBalancersClient.NewListAllPager +// method. func (client *LoadBalancersClient) NewListAllPager(options *LoadBalancersClientListAllOptions) *runtime.Pager[LoadBalancersClientListAllResponse] { return runtime.NewPager(runtime.PagingHandler[LoadBalancersClientListAllResponse]{ More: func(page LoadBalancersClientListAllResponse) bool { @@ -369,13 +377,14 @@ func (client *LoadBalancersClient) listAllHandleResponse(resp *http.Response) (L // BeginListInboundNatRulePortMappings - List of inbound NAT rule port mappings. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// groupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// backendPoolName - The name of the load balancer backend address pool. -// parameters - Query inbound NAT rule port mapping request. -// options - LoadBalancersClientBeginListInboundNatRulePortMappingsOptions contains the optional parameters for the LoadBalancersClient.BeginListInboundNatRulePortMappings -// method. +// - groupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - backendPoolName - The name of the load balancer backend address pool. +// - parameters - Query inbound NAT rule port mapping request. +// - options - LoadBalancersClientBeginListInboundNatRulePortMappingsOptions contains the optional parameters for the LoadBalancersClient.BeginListInboundNatRulePortMappings +// method. func (client *LoadBalancersClient) BeginListInboundNatRulePortMappings(ctx context.Context, groupName string, loadBalancerName string, backendPoolName string, parameters QueryInboundNatRulePortMappingRequest, options *LoadBalancersClientBeginListInboundNatRulePortMappingsOptions) (*runtime.Poller[LoadBalancersClientListInboundNatRulePortMappingsResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.listInboundNatRulePortMappings(ctx, groupName, loadBalancerName, backendPoolName, parameters, options) @@ -392,6 +401,7 @@ func (client *LoadBalancersClient) BeginListInboundNatRulePortMappings(ctx conte // ListInboundNatRulePortMappings - List of inbound NAT rule port mappings. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *LoadBalancersClient) listInboundNatRulePortMappings(ctx context.Context, groupName string, loadBalancerName string, backendPoolName string, parameters QueryInboundNatRulePortMappingRequest, options *LoadBalancersClientBeginListInboundNatRulePortMappingsOptions) (*http.Response, error) { req, err := client.listInboundNatRulePortMappingsCreateRequest(ctx, groupName, loadBalancerName, backendPoolName, parameters, options) @@ -440,11 +450,12 @@ func (client *LoadBalancersClient) listInboundNatRulePortMappingsCreateRequest(c // BeginSwapPublicIPAddresses - Swaps VIPs between two load balancers. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// location - The region where load balancers are located at. -// parameters - Parameters that define which VIPs should be swapped. -// options - LoadBalancersClientBeginSwapPublicIPAddressesOptions contains the optional parameters for the LoadBalancersClient.BeginSwapPublicIPAddresses -// method. +// - location - The region where load balancers are located at. +// - parameters - Parameters that define which VIPs should be swapped. +// - options - LoadBalancersClientBeginSwapPublicIPAddressesOptions contains the optional parameters for the LoadBalancersClient.BeginSwapPublicIPAddresses +// method. func (client *LoadBalancersClient) BeginSwapPublicIPAddresses(ctx context.Context, location string, parameters LoadBalancerVipSwapRequest, options *LoadBalancersClientBeginSwapPublicIPAddressesOptions) (*runtime.Poller[LoadBalancersClientSwapPublicIPAddressesResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.swapPublicIPAddresses(ctx, location, parameters, options) @@ -461,6 +472,7 @@ func (client *LoadBalancersClient) BeginSwapPublicIPAddresses(ctx context.Contex // SwapPublicIPAddresses - Swaps VIPs between two load balancers. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *LoadBalancersClient) swapPublicIPAddresses(ctx context.Context, location string, parameters LoadBalancerVipSwapRequest, options *LoadBalancersClientBeginSwapPublicIPAddressesOptions) (*http.Response, error) { req, err := client.swapPublicIPAddressesCreateRequest(ctx, location, parameters, options) @@ -501,12 +513,13 @@ func (client *LoadBalancersClient) swapPublicIPAddressesCreateRequest(ctx contex // UpdateTags - Updates a load balancer tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// loadBalancerName - The name of the load balancer. -// parameters - Parameters supplied to update load balancer tags. -// options - LoadBalancersClientUpdateTagsOptions contains the optional parameters for the LoadBalancersClient.UpdateTags -// method. +// - resourceGroupName - The name of the resource group. +// - loadBalancerName - The name of the load balancer. +// - parameters - Parameters supplied to update load balancer tags. +// - options - LoadBalancersClientUpdateTagsOptions contains the optional parameters for the LoadBalancersClient.UpdateTags +// method. func (client *LoadBalancersClient) UpdateTags(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters TagsObject, options *LoadBalancersClientUpdateTagsOptions) (LoadBalancersClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, loadBalancerName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/loadbalancers_client_example_test.go b/sdk/resourcemanager/network/armnetwork/loadbalancers_client_example_test.go deleted file mode 100644 index bd47a24655f6..000000000000 --- a/sdk/resourcemanager/network/armnetwork/loadbalancers_client_example_test.go +++ /dev/null @@ -1,1029 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LoadBalancerDelete.json -func ExampleLoadBalancersClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "lb", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LoadBalancerGet.json -func ExampleLoadBalancersClient_Get_getLoadBalancer() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "lb", &armnetwork.LoadBalancersClientGetOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LoadBalancerGetInboundNatRulePortMapping.json -func ExampleLoadBalancersClient_Get_getLoadBalancerWithInboundNatRulePortMapping() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "lb", &armnetwork.LoadBalancersClientGetOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LoadBalancerCreate.json -func ExampleLoadBalancersClient_BeginCreateOrUpdate_createLoadBalancer() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "lb", armnetwork.LoadBalancer{ - Location: to.Ptr("eastus"), - Properties: &armnetwork.LoadBalancerPropertiesFormat{ - BackendAddressPools: []*armnetwork.BackendAddressPool{ - { - Name: to.Ptr("be-lb"), - Properties: &armnetwork.BackendAddressPoolPropertiesFormat{}, - }}, - FrontendIPConfigurations: []*armnetwork.FrontendIPConfiguration{ - { - Name: to.Ptr("fe-lb"), - Properties: &armnetwork.FrontendIPConfigurationPropertiesFormat{ - Subnet: &armnetwork.Subnet{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb"), - }, - }, - }}, - InboundNatPools: []*armnetwork.InboundNatPool{}, - InboundNatRules: []*armnetwork.InboundNatRule{ - { - Name: to.Ptr("in-nat-rule"), - Properties: &armnetwork.InboundNatRulePropertiesFormat{ - BackendPort: to.Ptr[int32](3389), - EnableFloatingIP: to.Ptr(true), - EnableTCPReset: to.Ptr(false), - FrontendIPConfiguration: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb"), - }, - FrontendPort: to.Ptr[int32](3389), - IdleTimeoutInMinutes: to.Ptr[int32](15), - Protocol: to.Ptr(armnetwork.TransportProtocolTCP), - }, - }}, - LoadBalancingRules: []*armnetwork.LoadBalancingRule{ - { - Name: to.Ptr("rulelb"), - Properties: &armnetwork.LoadBalancingRulePropertiesFormat{ - BackendAddressPool: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb"), - }, - BackendPort: to.Ptr[int32](80), - EnableFloatingIP: to.Ptr(true), - EnableTCPReset: to.Ptr(false), - FrontendIPConfiguration: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb"), - }, - FrontendPort: to.Ptr[int32](80), - IdleTimeoutInMinutes: to.Ptr[int32](15), - LoadDistribution: to.Ptr(armnetwork.LoadDistributionDefault), - Probe: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb"), - }, - Protocol: to.Ptr(armnetwork.TransportProtocolTCP), - }, - }}, - Probes: []*armnetwork.Probe{ - { - Name: to.Ptr("probe-lb"), - Properties: &armnetwork.ProbePropertiesFormat{ - IntervalInSeconds: to.Ptr[int32](15), - NumberOfProbes: to.Ptr[int32](2), - Port: to.Ptr[int32](80), - ProbeThreshold: to.Ptr[int32](1), - RequestPath: to.Ptr("healthcheck.aspx"), - Protocol: to.Ptr(armnetwork.ProbeProtocolHTTP), - }, - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LoadBalancerCreateWithZones.json -func ExampleLoadBalancersClient_BeginCreateOrUpdate_createLoadBalancerWithFrontendIpInZone1() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "lb", armnetwork.LoadBalancer{ - Location: to.Ptr("eastus"), - Properties: &armnetwork.LoadBalancerPropertiesFormat{ - BackendAddressPools: []*armnetwork.BackendAddressPool{ - { - Name: to.Ptr("be-lb"), - Properties: &armnetwork.BackendAddressPoolPropertiesFormat{}, - }}, - FrontendIPConfigurations: []*armnetwork.FrontendIPConfiguration{ - { - Name: to.Ptr("fe-lb"), - Properties: &armnetwork.FrontendIPConfigurationPropertiesFormat{ - Subnet: &armnetwork.Subnet{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb"), - }, - }, - Zones: []*string{ - to.Ptr("1")}, - }}, - InboundNatPools: []*armnetwork.InboundNatPool{}, - InboundNatRules: []*armnetwork.InboundNatRule{ - { - Name: to.Ptr("in-nat-rule"), - Properties: &armnetwork.InboundNatRulePropertiesFormat{ - BackendPort: to.Ptr[int32](3389), - EnableFloatingIP: to.Ptr(true), - FrontendIPConfiguration: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb"), - }, - FrontendPort: to.Ptr[int32](3389), - IdleTimeoutInMinutes: to.Ptr[int32](15), - Protocol: to.Ptr(armnetwork.TransportProtocolTCP), - }, - }}, - LoadBalancingRules: []*armnetwork.LoadBalancingRule{ - { - Name: to.Ptr("rulelb"), - Properties: &armnetwork.LoadBalancingRulePropertiesFormat{ - BackendAddressPool: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb"), - }, - BackendPort: to.Ptr[int32](80), - EnableFloatingIP: to.Ptr(true), - FrontendIPConfiguration: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb"), - }, - FrontendPort: to.Ptr[int32](80), - IdleTimeoutInMinutes: to.Ptr[int32](15), - LoadDistribution: to.Ptr(armnetwork.LoadDistributionDefault), - Probe: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb"), - }, - Protocol: to.Ptr(armnetwork.TransportProtocolTCP), - }, - }}, - OutboundRules: []*armnetwork.OutboundRule{}, - Probes: []*armnetwork.Probe{ - { - Name: to.Ptr("probe-lb"), - Properties: &armnetwork.ProbePropertiesFormat{ - IntervalInSeconds: to.Ptr[int32](15), - NumberOfProbes: to.Ptr[int32](2), - Port: to.Ptr[int32](80), - ProbeThreshold: to.Ptr[int32](1), - RequestPath: to.Ptr("healthcheck.aspx"), - Protocol: to.Ptr(armnetwork.ProbeProtocolHTTP), - }, - }}, - }, - SKU: &armnetwork.LoadBalancerSKU{ - Name: to.Ptr(armnetwork.LoadBalancerSKUNameStandard), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LoadBalancerCreateGatewayLoadBalancerConsumer.json -func ExampleLoadBalancersClient_BeginCreateOrUpdate_createLoadBalancerWithGatewayLoadBalancerConsumerConfigured() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "lb", armnetwork.LoadBalancer{ - Location: to.Ptr("eastus"), - Properties: &armnetwork.LoadBalancerPropertiesFormat{ - BackendAddressPools: []*armnetwork.BackendAddressPool{ - { - Name: to.Ptr("be-lb"), - Properties: &armnetwork.BackendAddressPoolPropertiesFormat{}, - }}, - FrontendIPConfigurations: []*armnetwork.FrontendIPConfiguration{ - { - Name: to.Ptr("fe-lb"), - Properties: &armnetwork.FrontendIPConfigurationPropertiesFormat{ - GatewayLoadBalancer: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb-provider"), - }, - Subnet: &armnetwork.Subnet{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb"), - }, - }, - }}, - InboundNatPools: []*armnetwork.InboundNatPool{}, - InboundNatRules: []*armnetwork.InboundNatRule{ - { - Name: to.Ptr("in-nat-rule"), - Properties: &armnetwork.InboundNatRulePropertiesFormat{ - BackendPort: to.Ptr[int32](3389), - EnableFloatingIP: to.Ptr(true), - FrontendIPConfiguration: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb"), - }, - FrontendPort: to.Ptr[int32](3389), - IdleTimeoutInMinutes: to.Ptr[int32](15), - Protocol: to.Ptr(armnetwork.TransportProtocolTCP), - }, - }}, - LoadBalancingRules: []*armnetwork.LoadBalancingRule{ - { - Name: to.Ptr("rulelb"), - Properties: &armnetwork.LoadBalancingRulePropertiesFormat{ - BackendAddressPool: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb"), - }, - BackendPort: to.Ptr[int32](80), - EnableFloatingIP: to.Ptr(true), - FrontendIPConfiguration: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb"), - }, - FrontendPort: to.Ptr[int32](80), - IdleTimeoutInMinutes: to.Ptr[int32](15), - LoadDistribution: to.Ptr(armnetwork.LoadDistributionDefault), - Probe: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb"), - }, - Protocol: to.Ptr(armnetwork.TransportProtocolTCP), - }, - }}, - OutboundRules: []*armnetwork.OutboundRule{}, - Probes: []*armnetwork.Probe{ - { - Name: to.Ptr("probe-lb"), - Properties: &armnetwork.ProbePropertiesFormat{ - IntervalInSeconds: to.Ptr[int32](15), - NumberOfProbes: to.Ptr[int32](2), - Port: to.Ptr[int32](80), - ProbeThreshold: to.Ptr[int32](1), - RequestPath: to.Ptr("healthcheck.aspx"), - Protocol: to.Ptr(armnetwork.ProbeProtocolHTTP), - }, - }}, - }, - SKU: &armnetwork.LoadBalancerSKU{ - Name: to.Ptr(armnetwork.LoadBalancerSKUNameStandard), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithOneBackendPool.json -func ExampleLoadBalancersClient_BeginCreateOrUpdate_createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithOneBackendPool() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "lb", armnetwork.LoadBalancer{ - Location: to.Ptr("eastus"), - Properties: &armnetwork.LoadBalancerPropertiesFormat{ - BackendAddressPools: []*armnetwork.BackendAddressPool{ - { - Name: to.Ptr("be-lb"), - Properties: &armnetwork.BackendAddressPoolPropertiesFormat{ - TunnelInterfaces: []*armnetwork.GatewayLoadBalancerTunnelInterface{ - { - Type: to.Ptr(armnetwork.GatewayLoadBalancerTunnelInterfaceTypeInternal), - Identifier: to.Ptr[int32](900), - Port: to.Ptr[int32](15000), - Protocol: to.Ptr(armnetwork.GatewayLoadBalancerTunnelProtocolVXLAN), - }, - { - Type: to.Ptr(armnetwork.GatewayLoadBalancerTunnelInterfaceTypeInternal), - Identifier: to.Ptr[int32](901), - Port: to.Ptr[int32](15001), - Protocol: to.Ptr(armnetwork.GatewayLoadBalancerTunnelProtocolVXLAN), - }}, - }, - }}, - FrontendIPConfigurations: []*armnetwork.FrontendIPConfiguration{ - { - Name: to.Ptr("fe-lb"), - Properties: &armnetwork.FrontendIPConfigurationPropertiesFormat{ - Subnet: &armnetwork.Subnet{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb"), - }, - }, - }}, - InboundNatPools: []*armnetwork.InboundNatPool{}, - LoadBalancingRules: []*armnetwork.LoadBalancingRule{ - { - Name: to.Ptr("rulelb"), - Properties: &armnetwork.LoadBalancingRulePropertiesFormat{ - BackendAddressPools: []*armnetwork.SubResource{ - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb"), - }}, - BackendPort: to.Ptr[int32](0), - EnableFloatingIP: to.Ptr(true), - FrontendIPConfiguration: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb"), - }, - FrontendPort: to.Ptr[int32](0), - IdleTimeoutInMinutes: to.Ptr[int32](15), - LoadDistribution: to.Ptr(armnetwork.LoadDistributionDefault), - Probe: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb"), - }, - Protocol: to.Ptr(armnetwork.TransportProtocolAll), - }, - }}, - OutboundRules: []*armnetwork.OutboundRule{}, - Probes: []*armnetwork.Probe{ - { - Name: to.Ptr("probe-lb"), - Properties: &armnetwork.ProbePropertiesFormat{ - IntervalInSeconds: to.Ptr[int32](15), - NumberOfProbes: to.Ptr[int32](2), - Port: to.Ptr[int32](80), - ProbeThreshold: to.Ptr[int32](1), - RequestPath: to.Ptr("healthcheck.aspx"), - Protocol: to.Ptr(armnetwork.ProbeProtocolHTTP), - }, - }}, - }, - SKU: &armnetwork.LoadBalancerSKU{ - Name: to.Ptr(armnetwork.LoadBalancerSKUName("Premium")), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithTwoBackendPool.json -func ExampleLoadBalancersClient_BeginCreateOrUpdate_createLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithTwoBackendPool() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "lb", armnetwork.LoadBalancer{ - Location: to.Ptr("eastus"), - Properties: &armnetwork.LoadBalancerPropertiesFormat{ - BackendAddressPools: []*armnetwork.BackendAddressPool{ - { - Name: to.Ptr("be-lb1"), - Properties: &armnetwork.BackendAddressPoolPropertiesFormat{}, - }, - { - Name: to.Ptr("be-lb2"), - Properties: &armnetwork.BackendAddressPoolPropertiesFormat{}, - }}, - FrontendIPConfigurations: []*armnetwork.FrontendIPConfiguration{ - { - Name: to.Ptr("fe-lb"), - Properties: &armnetwork.FrontendIPConfigurationPropertiesFormat{ - Subnet: &armnetwork.Subnet{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb"), - }, - }, - }}, - InboundNatPools: []*armnetwork.InboundNatPool{}, - LoadBalancingRules: []*armnetwork.LoadBalancingRule{ - { - Name: to.Ptr("rulelb"), - Properties: &armnetwork.LoadBalancingRulePropertiesFormat{ - BackendAddressPool: &armnetwork.SubResource{}, - BackendAddressPools: []*armnetwork.SubResource{ - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb1"), - }, - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb2"), - }}, - BackendPort: to.Ptr[int32](0), - EnableFloatingIP: to.Ptr(true), - FrontendIPConfiguration: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb"), - }, - FrontendPort: to.Ptr[int32](0), - IdleTimeoutInMinutes: to.Ptr[int32](15), - LoadDistribution: to.Ptr(armnetwork.LoadDistributionDefault), - Probe: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb"), - }, - Protocol: to.Ptr(armnetwork.TransportProtocolAll), - }, - }}, - OutboundRules: []*armnetwork.OutboundRule{}, - Probes: []*armnetwork.Probe{ - { - Name: to.Ptr("probe-lb"), - Properties: &armnetwork.ProbePropertiesFormat{ - IntervalInSeconds: to.Ptr[int32](15), - NumberOfProbes: to.Ptr[int32](2), - Port: to.Ptr[int32](80), - ProbeThreshold: to.Ptr[int32](1), - RequestPath: to.Ptr("healthcheck.aspx"), - Protocol: to.Ptr(armnetwork.ProbeProtocolHTTP), - }, - }}, - }, - SKU: &armnetwork.LoadBalancerSKU{ - Name: to.Ptr(armnetwork.LoadBalancerSKUName("Premium")), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LoadBalancerCreateGlobalTier.json -func ExampleLoadBalancersClient_BeginCreateOrUpdate_createLoadBalancerWithGlobalTierAndOneRegionalLoadBalancerInItsBackendPool() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "lb", armnetwork.LoadBalancer{ - Location: to.Ptr("eastus"), - Properties: &armnetwork.LoadBalancerPropertiesFormat{ - BackendAddressPools: []*armnetwork.BackendAddressPool{ - { - Name: to.Ptr("be-lb"), - Properties: &armnetwork.BackendAddressPoolPropertiesFormat{ - LoadBalancerBackendAddresses: []*armnetwork.LoadBalancerBackendAddress{ - { - Name: to.Ptr("regional-lb1-address"), - Properties: &armnetwork.LoadBalancerBackendAddressPropertiesFormat{ - LoadBalancerFrontendIPConfiguration: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/regional-lb-rg1/providers/Microsoft.Network/loadBalancers/regional-lb/frontendIPConfigurations/fe-rlb"), - }, - }, - }}, - }, - }}, - FrontendIPConfigurations: []*armnetwork.FrontendIPConfiguration{ - { - Name: to.Ptr("fe-lb"), - Properties: &armnetwork.FrontendIPConfigurationPropertiesFormat{ - Subnet: &armnetwork.Subnet{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb"), - }, - }, - }}, - LoadBalancingRules: []*armnetwork.LoadBalancingRule{ - { - Name: to.Ptr("rulelb"), - Properties: &armnetwork.LoadBalancingRulePropertiesFormat{ - BackendAddressPool: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb"), - }, - BackendPort: to.Ptr[int32](80), - EnableFloatingIP: to.Ptr(false), - FrontendIPConfiguration: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb"), - }, - FrontendPort: to.Ptr[int32](80), - IdleTimeoutInMinutes: to.Ptr[int32](15), - LoadDistribution: to.Ptr(armnetwork.LoadDistributionDefault), - Probe: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb"), - }, - Protocol: to.Ptr(armnetwork.TransportProtocolTCP), - }, - }}, - Probes: []*armnetwork.Probe{ - { - Name: to.Ptr("probe-lb"), - Properties: &armnetwork.ProbePropertiesFormat{ - IntervalInSeconds: to.Ptr[int32](15), - NumberOfProbes: to.Ptr[int32](2), - Port: to.Ptr[int32](80), - ProbeThreshold: to.Ptr[int32](1), - RequestPath: to.Ptr("healthcheck.aspx"), - Protocol: to.Ptr(armnetwork.ProbeProtocolHTTP), - }, - }}, - }, - SKU: &armnetwork.LoadBalancerSKU{ - Name: to.Ptr(armnetwork.LoadBalancerSKUNameStandard), - Tier: to.Ptr(armnetwork.LoadBalancerSKUTierGlobal), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LoadBalancerCreateStandardSku.json -func ExampleLoadBalancersClient_BeginCreateOrUpdate_createLoadBalancerWithStandardSku() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "lb", armnetwork.LoadBalancer{ - Location: to.Ptr("eastus"), - Properties: &armnetwork.LoadBalancerPropertiesFormat{ - BackendAddressPools: []*armnetwork.BackendAddressPool{ - { - Name: to.Ptr("be-lb"), - Properties: &armnetwork.BackendAddressPoolPropertiesFormat{}, - }}, - FrontendIPConfigurations: []*armnetwork.FrontendIPConfiguration{ - { - Name: to.Ptr("fe-lb"), - Properties: &armnetwork.FrontendIPConfigurationPropertiesFormat{ - Subnet: &armnetwork.Subnet{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb"), - }, - }, - }}, - InboundNatPools: []*armnetwork.InboundNatPool{}, - InboundNatRules: []*armnetwork.InboundNatRule{ - { - Name: to.Ptr("in-nat-rule"), - Properties: &armnetwork.InboundNatRulePropertiesFormat{ - BackendPort: to.Ptr[int32](3389), - EnableFloatingIP: to.Ptr(true), - FrontendIPConfiguration: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb"), - }, - FrontendPort: to.Ptr[int32](3389), - IdleTimeoutInMinutes: to.Ptr[int32](15), - Protocol: to.Ptr(armnetwork.TransportProtocolTCP), - }, - }}, - LoadBalancingRules: []*armnetwork.LoadBalancingRule{ - { - Name: to.Ptr("rulelb"), - Properties: &armnetwork.LoadBalancingRulePropertiesFormat{ - BackendAddressPool: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb"), - }, - BackendPort: to.Ptr[int32](80), - EnableFloatingIP: to.Ptr(true), - FrontendIPConfiguration: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb"), - }, - FrontendPort: to.Ptr[int32](80), - IdleTimeoutInMinutes: to.Ptr[int32](15), - LoadDistribution: to.Ptr(armnetwork.LoadDistributionDefault), - Probe: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb"), - }, - Protocol: to.Ptr(armnetwork.TransportProtocolTCP), - }, - }}, - OutboundRules: []*armnetwork.OutboundRule{}, - Probes: []*armnetwork.Probe{ - { - Name: to.Ptr("probe-lb"), - Properties: &armnetwork.ProbePropertiesFormat{ - IntervalInSeconds: to.Ptr[int32](15), - NumberOfProbes: to.Ptr[int32](2), - Port: to.Ptr[int32](80), - ProbeThreshold: to.Ptr[int32](1), - RequestPath: to.Ptr("healthcheck.aspx"), - Protocol: to.Ptr(armnetwork.ProbeProtocolHTTP), - }, - }}, - }, - SKU: &armnetwork.LoadBalancerSKU{ - Name: to.Ptr(armnetwork.LoadBalancerSKUNameStandard), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LoadBalancerCreateWithInboundNatPool.json -func ExampleLoadBalancersClient_BeginCreateOrUpdate_createLoadBalancerWithInboundNatPool() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "lb", armnetwork.LoadBalancer{ - Location: to.Ptr("eastus"), - Properties: &armnetwork.LoadBalancerPropertiesFormat{ - BackendAddressPools: []*armnetwork.BackendAddressPool{}, - FrontendIPConfigurations: []*armnetwork.FrontendIPConfiguration{ - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/test"), - Name: to.Ptr("test"), - Properties: &armnetwork.FrontendIPConfigurationPropertiesFormat{ - PrivateIPAllocationMethod: to.Ptr(armnetwork.IPAllocationMethodDynamic), - Subnet: &armnetwork.Subnet{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/lbvnet/subnets/lbsubnet"), - }, - }, - Zones: []*string{}, - }}, - InboundNatPools: []*armnetwork.InboundNatPool{ - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/inboundNatPools/test"), - Name: to.Ptr("test"), - Properties: &armnetwork.InboundNatPoolPropertiesFormat{ - BackendPort: to.Ptr[int32](8888), - EnableFloatingIP: to.Ptr(true), - EnableTCPReset: to.Ptr(true), - FrontendIPConfiguration: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/test"), - }, - FrontendPortRangeEnd: to.Ptr[int32](8085), - FrontendPortRangeStart: to.Ptr[int32](8080), - IdleTimeoutInMinutes: to.Ptr[int32](10), - Protocol: to.Ptr(armnetwork.TransportProtocolTCP), - }, - }}, - InboundNatRules: []*armnetwork.InboundNatRule{}, - LoadBalancingRules: []*armnetwork.LoadBalancingRule{}, - OutboundRules: []*armnetwork.OutboundRule{}, - Probes: []*armnetwork.Probe{}, - }, - SKU: &armnetwork.LoadBalancerSKU{ - Name: to.Ptr(armnetwork.LoadBalancerSKUNameStandard), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LoadBalancerCreateWithOutboundRules.json -func ExampleLoadBalancersClient_BeginCreateOrUpdate_createLoadBalancerWithOutboundRules() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "lb", armnetwork.LoadBalancer{ - Location: to.Ptr("eastus"), - Properties: &armnetwork.LoadBalancerPropertiesFormat{ - BackendAddressPools: []*armnetwork.BackendAddressPool{ - { - Name: to.Ptr("be-lb"), - Properties: &armnetwork.BackendAddressPoolPropertiesFormat{}, - }}, - FrontendIPConfigurations: []*armnetwork.FrontendIPConfiguration{ - { - Name: to.Ptr("fe-lb"), - Properties: &armnetwork.FrontendIPConfigurationPropertiesFormat{ - PublicIPAddress: &armnetwork.PublicIPAddress{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pip"), - }, - }, - }}, - InboundNatPools: []*armnetwork.InboundNatPool{}, - InboundNatRules: []*armnetwork.InboundNatRule{ - { - Name: to.Ptr("in-nat-rule"), - Properties: &armnetwork.InboundNatRulePropertiesFormat{ - BackendPort: to.Ptr[int32](3389), - EnableFloatingIP: to.Ptr(true), - FrontendIPConfiguration: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb"), - }, - FrontendPort: to.Ptr[int32](3389), - IdleTimeoutInMinutes: to.Ptr[int32](15), - Protocol: to.Ptr(armnetwork.TransportProtocolTCP), - }, - }}, - LoadBalancingRules: []*armnetwork.LoadBalancingRule{ - { - Name: to.Ptr("rulelb"), - Properties: &armnetwork.LoadBalancingRulePropertiesFormat{ - BackendAddressPool: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb"), - }, - BackendPort: to.Ptr[int32](80), - DisableOutboundSnat: to.Ptr(true), - EnableFloatingIP: to.Ptr(true), - FrontendIPConfiguration: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb"), - }, - FrontendPort: to.Ptr[int32](80), - IdleTimeoutInMinutes: to.Ptr[int32](15), - LoadDistribution: to.Ptr(armnetwork.LoadDistributionDefault), - Probe: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/probes/probe-lb"), - }, - Protocol: to.Ptr(armnetwork.TransportProtocolTCP), - }, - }}, - OutboundRules: []*armnetwork.OutboundRule{ - { - Name: to.Ptr("rule1"), - Properties: &armnetwork.OutboundRulePropertiesFormat{ - BackendAddressPool: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/backendAddressPools/be-lb"), - }, - FrontendIPConfigurations: []*armnetwork.SubResource{ - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb"), - }}, - Protocol: to.Ptr(armnetwork.LoadBalancerOutboundRuleProtocolAll), - }, - }}, - Probes: []*armnetwork.Probe{ - { - Name: to.Ptr("probe-lb"), - Properties: &armnetwork.ProbePropertiesFormat{ - IntervalInSeconds: to.Ptr[int32](15), - NumberOfProbes: to.Ptr[int32](2), - Port: to.Ptr[int32](80), - ProbeThreshold: to.Ptr[int32](1), - RequestPath: to.Ptr("healthcheck.aspx"), - Protocol: to.Ptr(armnetwork.ProbeProtocolHTTP), - }, - }}, - }, - SKU: &armnetwork.LoadBalancerSKU{ - Name: to.Ptr(armnetwork.LoadBalancerSKUNameStandard), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LoadBalancerUpdateTags.json -func ExampleLoadBalancersClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, "rg1", "lb", armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LoadBalancerListAll.json -func ExampleLoadBalancersClient_NewListAllPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListAllPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LoadBalancerList.json -func ExampleLoadBalancersClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LoadBalancersSwapPublicIpAddresses.json -func ExampleLoadBalancersClient_BeginSwapPublicIPAddresses() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginSwapPublicIPAddresses(ctx, "westus", armnetwork.LoadBalancerVipSwapRequest{ - FrontendIPConfigurations: []*armnetwork.LoadBalancerVipSwapRequestFrontendIPConfiguration{ - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb1/frontendIPConfigurations/lbfe1"), - Properties: &armnetwork.LoadBalancerVipSwapRequestFrontendIPConfigurationProperties{ - PublicIPAddress: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/publicIPAddresses/pip2"), - }, - }, - }, - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/loadBalancers/lb2/frontendIPConfigurations/lbfe2"), - Properties: &armnetwork.LoadBalancerVipSwapRequestFrontendIPConfigurationProperties{ - PublicIPAddress: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pip1"), - }, - }, - }}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/QueryInboundNatRulePortMapping.json -func ExampleLoadBalancersClient_BeginListInboundNatRulePortMappings() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLoadBalancersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginListInboundNatRulePortMappings(ctx, "rg1", "lb1", "bp1", armnetwork.QueryInboundNatRulePortMappingRequest{ - IPAddress: to.Ptr("10.0.0.4"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/localnetworkgateways_client.go b/sdk/resourcemanager/network/armnetwork/localnetworkgateways_client.go index 1c5390deca53..62161dc558d9 100644 --- a/sdk/resourcemanager/network/armnetwork/localnetworkgateways_client.go +++ b/sdk/resourcemanager/network/armnetwork/localnetworkgateways_client.go @@ -32,10 +32,10 @@ type LocalNetworkGatewaysClient struct { } // NewLocalNetworkGatewaysClient creates a new instance of LocalNetworkGatewaysClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewLocalNetworkGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LocalNetworkGatewaysClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewLocalNetworkGatewaysClient(subscriptionID string, credential azcore.Toke // BeginCreateOrUpdate - Creates or updates a local network gateway in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// localNetworkGatewayName - The name of the local network gateway. -// parameters - Parameters supplied to the create or update local network gateway operation. -// options - LocalNetworkGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the LocalNetworkGatewaysClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - localNetworkGatewayName - The name of the local network gateway. +// - parameters - Parameters supplied to the create or update local network gateway operation. +// - options - LocalNetworkGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the LocalNetworkGatewaysClient.BeginCreateOrUpdate +// method. func (client *LocalNetworkGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters LocalNetworkGateway, options *LocalNetworkGatewaysClientBeginCreateOrUpdateOptions) (*runtime.Poller[LocalNetworkGatewaysClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, localNetworkGatewayName, parameters, options) @@ -80,6 +81,7 @@ func (client *LocalNetworkGatewaysClient) BeginCreateOrUpdate(ctx context.Contex // CreateOrUpdate - Creates or updates a local network gateway in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *LocalNetworkGatewaysClient) createOrUpdate(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters LocalNetworkGateway, options *LocalNetworkGatewaysClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, localNetworkGatewayName, parameters, options) @@ -124,11 +126,12 @@ func (client *LocalNetworkGatewaysClient) createOrUpdateCreateRequest(ctx contex // BeginDelete - Deletes the specified local network gateway. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// localNetworkGatewayName - The name of the local network gateway. -// options - LocalNetworkGatewaysClientBeginDeleteOptions contains the optional parameters for the LocalNetworkGatewaysClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - localNetworkGatewayName - The name of the local network gateway. +// - options - LocalNetworkGatewaysClientBeginDeleteOptions contains the optional parameters for the LocalNetworkGatewaysClient.BeginDelete +// method. func (client *LocalNetworkGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, options *LocalNetworkGatewaysClientBeginDeleteOptions) (*runtime.Poller[LocalNetworkGatewaysClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, localNetworkGatewayName, options) @@ -145,6 +148,7 @@ func (client *LocalNetworkGatewaysClient) BeginDelete(ctx context.Context, resou // Delete - Deletes the specified local network gateway. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *LocalNetworkGatewaysClient) deleteOperation(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, options *LocalNetworkGatewaysClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, localNetworkGatewayName, options) @@ -189,11 +193,12 @@ func (client *LocalNetworkGatewaysClient) deleteCreateRequest(ctx context.Contex // Get - Gets the specified local network gateway in a resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// localNetworkGatewayName - The name of the local network gateway. -// options - LocalNetworkGatewaysClientGetOptions contains the optional parameters for the LocalNetworkGatewaysClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - localNetworkGatewayName - The name of the local network gateway. +// - options - LocalNetworkGatewaysClientGetOptions contains the optional parameters for the LocalNetworkGatewaysClient.Get +// method. func (client *LocalNetworkGatewaysClient) Get(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, options *LocalNetworkGatewaysClientGetOptions) (LocalNetworkGatewaysClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, localNetworkGatewayName, options) if err != nil { @@ -245,10 +250,11 @@ func (client *LocalNetworkGatewaysClient) getHandleResponse(resp *http.Response) } // NewListPager - Gets all the local network gateways in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - LocalNetworkGatewaysClientListOptions contains the optional parameters for the LocalNetworkGatewaysClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - options - LocalNetworkGatewaysClientListOptions contains the optional parameters for the LocalNetworkGatewaysClient.NewListPager +// method. func (client *LocalNetworkGatewaysClient) NewListPager(resourceGroupName string, options *LocalNetworkGatewaysClientListOptions) *runtime.Pager[LocalNetworkGatewaysClientListResponse] { return runtime.NewPager(runtime.PagingHandler[LocalNetworkGatewaysClientListResponse]{ More: func(page LocalNetworkGatewaysClientListResponse) bool { @@ -310,12 +316,13 @@ func (client *LocalNetworkGatewaysClient) listHandleResponse(resp *http.Response // UpdateTags - Updates a local network gateway tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// localNetworkGatewayName - The name of the local network gateway. -// parameters - Parameters supplied to update local network gateway tags. -// options - LocalNetworkGatewaysClientUpdateTagsOptions contains the optional parameters for the LocalNetworkGatewaysClient.UpdateTags -// method. +// - resourceGroupName - The name of the resource group. +// - localNetworkGatewayName - The name of the local network gateway. +// - parameters - Parameters supplied to update local network gateway tags. +// - options - LocalNetworkGatewaysClientUpdateTagsOptions contains the optional parameters for the LocalNetworkGatewaysClient.UpdateTags +// method. func (client *LocalNetworkGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters TagsObject, options *LocalNetworkGatewaysClientUpdateTagsOptions) (LocalNetworkGatewaysClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, localNetworkGatewayName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/localnetworkgateways_client_example_test.go b/sdk/resourcemanager/network/armnetwork/localnetworkgateways_client_example_test.go deleted file mode 100644 index adc77f0570bb..000000000000 --- a/sdk/resourcemanager/network/armnetwork/localnetworkgateways_client_example_test.go +++ /dev/null @@ -1,139 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LocalNetworkGatewayCreate.json -func ExampleLocalNetworkGatewaysClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLocalNetworkGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "localgw", armnetwork.LocalNetworkGateway{ - Location: to.Ptr("Central US"), - Properties: &armnetwork.LocalNetworkGatewayPropertiesFormat{ - Fqdn: to.Ptr("site1.contoso.com"), - GatewayIPAddress: to.Ptr("11.12.13.14"), - LocalNetworkAddressSpace: &armnetwork.AddressSpace{ - AddressPrefixes: []*string{ - to.Ptr("10.1.0.0/16")}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LocalNetworkGatewayGet.json -func ExampleLocalNetworkGatewaysClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLocalNetworkGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "localgw", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LocalNetworkGatewayDelete.json -func ExampleLocalNetworkGatewaysClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLocalNetworkGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "localgw", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LocalNetworkGatewayUpdateTags.json -func ExampleLocalNetworkGatewaysClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLocalNetworkGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, "rg1", "lgw", armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/LocalNetworkGatewayList.json -func ExampleLocalNetworkGatewaysClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewLocalNetworkGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/management_client.go b/sdk/resourcemanager/network/armnetwork/management_client.go index 030c29407859..90d426ac3e8f 100644 --- a/sdk/resourcemanager/network/armnetwork/management_client.go +++ b/sdk/resourcemanager/network/armnetwork/management_client.go @@ -33,10 +33,10 @@ type ManagementClient struct { } // NewManagementClient creates a new instance of ManagementClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewManagementClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagementClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -59,11 +59,12 @@ func NewManagementClient(subscriptionID string, credential azcore.TokenCredentia // CheckDNSNameAvailability - Checks whether a domain name in the cloudapp.azure.com zone is available for use. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// location - The location of the domain name. -// domainNameLabel - The domain name to be verified. It must conform to the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. -// options - ManagementClientCheckDNSNameAvailabilityOptions contains the optional parameters for the ManagementClient.CheckDNSNameAvailability -// method. +// - location - The location of the domain name. +// - domainNameLabel - The domain name to be verified. It must conform to the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. +// - options - ManagementClientCheckDNSNameAvailabilityOptions contains the optional parameters for the ManagementClient.CheckDNSNameAvailability +// method. func (client *ManagementClient) CheckDNSNameAvailability(ctx context.Context, location string, domainNameLabel string, options *ManagementClientCheckDNSNameAvailabilityOptions) (ManagementClientCheckDNSNameAvailabilityResponse, error) { req, err := client.checkDNSNameAvailabilityCreateRequest(ctx, location, domainNameLabel, options) if err != nil { @@ -113,12 +114,13 @@ func (client *ManagementClient) checkDNSNameAvailabilityHandleResponse(resp *htt // BeginDeleteBastionShareableLink - Deletes the Bastion Shareable Links for all the VMs specified in the request. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// bastionHostName - The name of the Bastion Host. -// bslRequest - Post request for all the Bastion Shareable Link endpoints. -// options - ManagementClientBeginDeleteBastionShareableLinkOptions contains the optional parameters for the ManagementClient.BeginDeleteBastionShareableLink -// method. +// - resourceGroupName - The name of the resource group. +// - bastionHostName - The name of the Bastion Host. +// - bslRequest - Post request for all the Bastion Shareable Link endpoints. +// - options - ManagementClientBeginDeleteBastionShareableLinkOptions contains the optional parameters for the ManagementClient.BeginDeleteBastionShareableLink +// method. func (client *ManagementClient) BeginDeleteBastionShareableLink(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest, options *ManagementClientBeginDeleteBastionShareableLinkOptions) (*runtime.Poller[ManagementClientDeleteBastionShareableLinkResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteBastionShareableLink(ctx, resourceGroupName, bastionHostName, bslRequest, options) @@ -135,6 +137,7 @@ func (client *ManagementClient) BeginDeleteBastionShareableLink(ctx context.Cont // DeleteBastionShareableLink - Deletes the Bastion Shareable Links for all the VMs specified in the request. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ManagementClient) deleteBastionShareableLink(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest, options *ManagementClientBeginDeleteBastionShareableLinkOptions) (*http.Response, error) { req, err := client.deleteBastionShareableLinkCreateRequest(ctx, resourceGroupName, bastionHostName, bslRequest, options) @@ -178,12 +181,13 @@ func (client *ManagementClient) deleteBastionShareableLinkCreateRequest(ctx cont } // NewDisconnectActiveSessionsPager - Returns the list of currently active sessions on the Bastion. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// bastionHostName - The name of the Bastion Host. -// sessionIDs - The list of sessionids to disconnect. -// options - ManagementClientDisconnectActiveSessionsOptions contains the optional parameters for the ManagementClient.DisconnectActiveSessions -// method. +// - resourceGroupName - The name of the resource group. +// - bastionHostName - The name of the Bastion Host. +// - sessionIDs - The list of sessionids to disconnect. +// - options - ManagementClientDisconnectActiveSessionsOptions contains the optional parameters for the ManagementClient.NewDisconnectActiveSessionsPager +// method. func (client *ManagementClient) NewDisconnectActiveSessionsPager(resourceGroupName string, bastionHostName string, sessionIDs SessionIDs, options *ManagementClientDisconnectActiveSessionsOptions) *runtime.Pager[ManagementClientDisconnectActiveSessionsResponse] { return runtime.NewPager(runtime.PagingHandler[ManagementClientDisconnectActiveSessionsResponse]{ More: func(page ManagementClientDisconnectActiveSessionsResponse) bool { @@ -249,10 +253,11 @@ func (client *ManagementClient) disconnectActiveSessionsHandleResponse(resp *htt // ExpressRouteProviderPort - Retrieves detail of a provider port. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// providerport - The name of the provider port. -// options - ManagementClientExpressRouteProviderPortOptions contains the optional parameters for the ManagementClient.ExpressRouteProviderPort -// method. +// - providerport - The name of the provider port. +// - options - ManagementClientExpressRouteProviderPortOptions contains the optional parameters for the ManagementClient.ExpressRouteProviderPort +// method. func (client *ManagementClient) ExpressRouteProviderPort(ctx context.Context, providerport string, options *ManagementClientExpressRouteProviderPortOptions) (ManagementClientExpressRouteProviderPortResponse, error) { req, err := client.expressRouteProviderPortCreateRequest(ctx, providerport, options) if err != nil { @@ -302,12 +307,13 @@ func (client *ManagementClient) expressRouteProviderPortHandleResponse(resp *htt // BeginGeneratevirtualwanvpnserverconfigurationvpnprofile - Generates a unique VPN profile for P2S clients for VirtualWan // and associated VpnServerConfiguration combination in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name. -// virtualWANName - The name of the VirtualWAN whose associated VpnServerConfigurations is needed. -// vpnClientParams - Parameters supplied to the generate VirtualWan VPN profile generation operation. -// options - ManagementClientBeginGeneratevirtualwanvpnserverconfigurationvpnprofileOptions contains the optional parameters -// for the ManagementClient.BeginGeneratevirtualwanvpnserverconfigurationvpnprofile method. +// - resourceGroupName - The resource group name. +// - virtualWANName - The name of the VirtualWAN whose associated VpnServerConfigurations is needed. +// - vpnClientParams - Parameters supplied to the generate VirtualWan VPN profile generation operation. +// - options - ManagementClientBeginGeneratevirtualwanvpnserverconfigurationvpnprofileOptions contains the optional parameters +// for the ManagementClient.BeginGeneratevirtualwanvpnserverconfigurationvpnprofile method. func (client *ManagementClient) BeginGeneratevirtualwanvpnserverconfigurationvpnprofile(ctx context.Context, resourceGroupName string, virtualWANName string, vpnClientParams VirtualWanVPNProfileParameters, options *ManagementClientBeginGeneratevirtualwanvpnserverconfigurationvpnprofileOptions) (*runtime.Poller[ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.generatevirtualwanvpnserverconfigurationvpnprofile(ctx, resourceGroupName, virtualWANName, vpnClientParams, options) @@ -325,6 +331,7 @@ func (client *ManagementClient) BeginGeneratevirtualwanvpnserverconfigurationvpn // Generatevirtualwanvpnserverconfigurationvpnprofile - Generates a unique VPN profile for P2S clients for VirtualWan and // associated VpnServerConfiguration combination in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ManagementClient) generatevirtualwanvpnserverconfigurationvpnprofile(ctx context.Context, resourceGroupName string, virtualWANName string, vpnClientParams VirtualWanVPNProfileParameters, options *ManagementClientBeginGeneratevirtualwanvpnserverconfigurationvpnprofileOptions) (*http.Response, error) { req, err := client.generatevirtualwanvpnserverconfigurationvpnprofileCreateRequest(ctx, resourceGroupName, virtualWANName, vpnClientParams, options) @@ -368,11 +375,12 @@ func (client *ManagementClient) generatevirtualwanvpnserverconfigurationvpnprofi } // BeginGetActiveSessions - Returns the list of currently active sessions on the Bastion. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// bastionHostName - The name of the Bastion Host. -// options - ManagementClientBeginGetActiveSessionsOptions contains the optional parameters for the ManagementClient.BeginGetActiveSessions -// method. +// - resourceGroupName - The name of the resource group. +// - bastionHostName - The name of the Bastion Host. +// - options - ManagementClientBeginGetActiveSessionsOptions contains the optional parameters for the ManagementClient.BeginGetActiveSessions +// method. func (client *ManagementClient) BeginGetActiveSessions(ctx context.Context, resourceGroupName string, bastionHostName string, options *ManagementClientBeginGetActiveSessionsOptions) (*runtime.Poller[*runtime.Pager[ManagementClientGetActiveSessionsResponse]], error) { pager := runtime.NewPager(runtime.PagingHandler[ManagementClientGetActiveSessionsResponse]{ More: func(page ManagementClientGetActiveSessionsResponse) bool { @@ -410,6 +418,7 @@ func (client *ManagementClient) BeginGetActiveSessions(ctx context.Context, reso } // GetActiveSessions - Returns the list of currently active sessions on the Bastion. +// // Generated from API version 2022-07-01 func (client *ManagementClient) getActiveSessions(ctx context.Context, resourceGroupName string, bastionHostName string, options *ManagementClientBeginGetActiveSessionsOptions) (*http.Response, error) { req, err := client.getActiveSessionsCreateRequest(ctx, resourceGroupName, bastionHostName, options) @@ -462,12 +471,13 @@ func (client *ManagementClient) getActiveSessionsHandleResponse(resp *http.Respo } // NewGetBastionShareableLinkPager - Return the Bastion Shareable Links for all the VMs specified in the request. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// bastionHostName - The name of the Bastion Host. -// bslRequest - Post request for all the Bastion Shareable Link endpoints. -// options - ManagementClientGetBastionShareableLinkOptions contains the optional parameters for the ManagementClient.GetBastionShareableLink -// method. +// - resourceGroupName - The name of the resource group. +// - bastionHostName - The name of the Bastion Host. +// - bslRequest - Post request for all the Bastion Shareable Link endpoints. +// - options - ManagementClientGetBastionShareableLinkOptions contains the optional parameters for the ManagementClient.NewGetBastionShareableLinkPager +// method. func (client *ManagementClient) NewGetBastionShareableLinkPager(resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest, options *ManagementClientGetBastionShareableLinkOptions) *runtime.Pager[ManagementClientGetBastionShareableLinkResponse] { return runtime.NewPager(runtime.PagingHandler[ManagementClientGetBastionShareableLinkResponse]{ More: func(page ManagementClientGetBastionShareableLinkResponse) bool { @@ -533,12 +543,13 @@ func (client *ManagementClient) getBastionShareableLinkHandleResponse(resp *http // ListActiveConnectivityConfigurations - Lists active connectivity configurations in a network manager. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// parameters - Active Configuration Parameter. -// options - ManagementClientListActiveConnectivityConfigurationsOptions contains the optional parameters for the ManagementClient.ListActiveConnectivityConfigurations -// method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - parameters - Active Configuration Parameter. +// - options - ManagementClientListActiveConnectivityConfigurationsOptions contains the optional parameters for the ManagementClient.ListActiveConnectivityConfigurations +// method. func (client *ManagementClient) ListActiveConnectivityConfigurations(ctx context.Context, resourceGroupName string, networkManagerName string, parameters ActiveConfigurationParameter, options *ManagementClientListActiveConnectivityConfigurationsOptions) (ManagementClientListActiveConnectivityConfigurationsResponse, error) { req, err := client.listActiveConnectivityConfigurationsCreateRequest(ctx, resourceGroupName, networkManagerName, parameters, options) if err != nil { @@ -594,12 +605,13 @@ func (client *ManagementClient) listActiveConnectivityConfigurationsHandleRespon // ListActiveSecurityAdminRules - Lists active security admin rules in a network manager. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// parameters - Active Configuration Parameter. -// options - ManagementClientListActiveSecurityAdminRulesOptions contains the optional parameters for the ManagementClient.ListActiveSecurityAdminRules -// method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - parameters - Active Configuration Parameter. +// - options - ManagementClientListActiveSecurityAdminRulesOptions contains the optional parameters for the ManagementClient.ListActiveSecurityAdminRules +// method. func (client *ManagementClient) ListActiveSecurityAdminRules(ctx context.Context, resourceGroupName string, networkManagerName string, parameters ActiveConfigurationParameter, options *ManagementClientListActiveSecurityAdminRulesOptions) (ManagementClientListActiveSecurityAdminRulesResponse, error) { req, err := client.listActiveSecurityAdminRulesCreateRequest(ctx, resourceGroupName, networkManagerName, parameters, options) if err != nil { @@ -656,12 +668,13 @@ func (client *ManagementClient) listActiveSecurityAdminRulesHandleResponse(resp // ListNetworkManagerEffectiveConnectivityConfigurations - List all effective connectivity configurations applied on a virtual // network. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// parameters - Parameters supplied to list correct page. -// options - ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsOptions contains the optional parameters -// for the ManagementClient.ListNetworkManagerEffectiveConnectivityConfigurations method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - parameters - Parameters supplied to list correct page. +// - options - ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsOptions contains the optional parameters +// for the ManagementClient.ListNetworkManagerEffectiveConnectivityConfigurations method. func (client *ManagementClient) ListNetworkManagerEffectiveConnectivityConfigurations(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters QueryRequestOptions, options *ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsOptions) (ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsResponse, error) { req, err := client.listNetworkManagerEffectiveConnectivityConfigurationsCreateRequest(ctx, resourceGroupName, virtualNetworkName, parameters, options) if err != nil { @@ -717,12 +730,13 @@ func (client *ManagementClient) listNetworkManagerEffectiveConnectivityConfigura // ListNetworkManagerEffectiveSecurityAdminRules - List all effective security admin rules applied on a virtual network. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// parameters - Parameters supplied to list correct page. -// options - ManagementClientListNetworkManagerEffectiveSecurityAdminRulesOptions contains the optional parameters for the -// ManagementClient.ListNetworkManagerEffectiveSecurityAdminRules method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - parameters - Parameters supplied to list correct page. +// - options - ManagementClientListNetworkManagerEffectiveSecurityAdminRulesOptions contains the optional parameters for the +// ManagementClient.ListNetworkManagerEffectiveSecurityAdminRules method. func (client *ManagementClient) ListNetworkManagerEffectiveSecurityAdminRules(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters QueryRequestOptions, options *ManagementClientListNetworkManagerEffectiveSecurityAdminRulesOptions) (ManagementClientListNetworkManagerEffectiveSecurityAdminRulesResponse, error) { req, err := client.listNetworkManagerEffectiveSecurityAdminRulesCreateRequest(ctx, resourceGroupName, virtualNetworkName, parameters, options) if err != nil { @@ -777,12 +791,13 @@ func (client *ManagementClient) listNetworkManagerEffectiveSecurityAdminRulesHan } // BeginPutBastionShareableLink - Creates a Bastion Shareable Links for all the VMs specified in the request. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// bastionHostName - The name of the Bastion Host. -// bslRequest - Post request for all the Bastion Shareable Link endpoints. -// options - ManagementClientBeginPutBastionShareableLinkOptions contains the optional parameters for the ManagementClient.BeginPutBastionShareableLink -// method. +// - resourceGroupName - The name of the resource group. +// - bastionHostName - The name of the Bastion Host. +// - bslRequest - Post request for all the Bastion Shareable Link endpoints. +// - options - ManagementClientBeginPutBastionShareableLinkOptions contains the optional parameters for the ManagementClient.BeginPutBastionShareableLink +// method. func (client *ManagementClient) BeginPutBastionShareableLink(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest, options *ManagementClientBeginPutBastionShareableLinkOptions) (*runtime.Poller[*runtime.Pager[ManagementClientPutBastionShareableLinkResponse]], error) { pager := runtime.NewPager(runtime.PagingHandler[ManagementClientPutBastionShareableLinkResponse]{ More: func(page ManagementClientPutBastionShareableLinkResponse) bool { @@ -820,6 +835,7 @@ func (client *ManagementClient) BeginPutBastionShareableLink(ctx context.Context } // PutBastionShareableLink - Creates a Bastion Shareable Links for all the VMs specified in the request. +// // Generated from API version 2022-07-01 func (client *ManagementClient) putBastionShareableLink(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest, options *ManagementClientBeginPutBastionShareableLinkOptions) (*http.Response, error) { req, err := client.putBastionShareableLinkCreateRequest(ctx, resourceGroupName, bastionHostName, bslRequest, options) @@ -873,11 +889,12 @@ func (client *ManagementClient) putBastionShareableLinkHandleResponse(resp *http // SupportedSecurityProviders - Gives the supported security providers for the virtual wan. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name. -// virtualWANName - The name of the VirtualWAN for which supported security providers are needed. -// options - ManagementClientSupportedSecurityProvidersOptions contains the optional parameters for the ManagementClient.SupportedSecurityProviders -// method. +// - resourceGroupName - The resource group name. +// - virtualWANName - The name of the VirtualWAN for which supported security providers are needed. +// - options - ManagementClientSupportedSecurityProvidersOptions contains the optional parameters for the ManagementClient.SupportedSecurityProviders +// method. func (client *ManagementClient) SupportedSecurityProviders(ctx context.Context, resourceGroupName string, virtualWANName string, options *ManagementClientSupportedSecurityProvidersOptions) (ManagementClientSupportedSecurityProvidersResponse, error) { req, err := client.supportedSecurityProvidersCreateRequest(ctx, resourceGroupName, virtualWANName, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/management_client_example_test.go b/sdk/resourcemanager/network/armnetwork/management_client_example_test.go deleted file mode 100644 index d0b1746309ad..000000000000 --- a/sdk/resourcemanager/network/armnetwork/management_client_example_test.go +++ /dev/null @@ -1,356 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/BastionShareableLinkCreate.json -func ExampleManagementClient_BeginPutBastionShareableLink() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewManagementClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginPutBastionShareableLink(ctx, "rg1", "bastionhosttenant", armnetwork.BastionShareableLinkListRequest{ - VMs: []*armnetwork.BastionShareableLink{ - { - VM: &armnetwork.VM{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm1"), - }, - }, - { - VM: &armnetwork.VM{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm2"), - }, - }}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - for res.More() { - nextResult, err := res.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/BastionShareableLinkDelete.json -func ExampleManagementClient_BeginDeleteBastionShareableLink() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewManagementClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDeleteBastionShareableLink(ctx, "rg1", "bastionhosttenant", armnetwork.BastionShareableLinkListRequest{ - VMs: []*armnetwork.BastionShareableLink{ - { - VM: &armnetwork.VM{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm1"), - }, - }, - { - VM: &armnetwork.VM{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm2"), - }, - }}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/BastionShareableLinkGet.json -func ExampleManagementClient_NewGetBastionShareableLinkPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewManagementClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewGetBastionShareableLinkPager("rg1", "bastionhosttenant", armnetwork.BastionShareableLinkListRequest{ - VMs: []*armnetwork.BastionShareableLink{ - { - VM: &armnetwork.VM{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm1"), - }, - }, - { - VM: &armnetwork.VM{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rgx/providers/Microsoft.Compute/virtualMachines/vm2"), - }, - }}, - }, nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/BastionSessionsList.json -func ExampleManagementClient_BeginGetActiveSessions() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewManagementClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGetActiveSessions(ctx, "rg1", "bastionhosttenant", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - for res.More() { - nextResult, err := res.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/BastionSessionDelete.json -func ExampleManagementClient_NewDisconnectActiveSessionsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewManagementClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewDisconnectActiveSessionsPager("rg1", "bastionhosttenant", armnetwork.SessionIDs{}, nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/CheckDnsNameAvailability.json -func ExampleManagementClient_CheckDNSNameAvailability() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewManagementClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CheckDNSNameAvailability(ctx, "westus", "testdns", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/expressRouteProviderPort.json -func ExampleManagementClient_ExpressRouteProviderPort() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewManagementClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ExpressRouteProviderPort(ctx, "abc", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerActiveConnectivityConfigurationsList.json -func ExampleManagementClient_ListActiveConnectivityConfigurations() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewManagementClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListActiveConnectivityConfigurations(ctx, "myResourceGroup", "testNetworkManager", armnetwork.ActiveConfigurationParameter{ - Regions: []*string{ - to.Ptr("westus")}, - SkipToken: to.Ptr("fakeSkipTokenCode"), - }, &armnetwork.ManagementClientListActiveConnectivityConfigurationsOptions{Top: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerActiveSecurityAdminRulesList.json -func ExampleManagementClient_ListActiveSecurityAdminRules() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewManagementClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListActiveSecurityAdminRules(ctx, "myResourceGroup", "testNetworkManager", armnetwork.ActiveConfigurationParameter{ - Regions: []*string{ - to.Ptr("westus")}, - SkipToken: to.Ptr("fakeSkipTokenCode"), - }, &armnetwork.ManagementClientListActiveSecurityAdminRulesOptions{Top: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerEffectiveConnectivityConfigurationsList.json -func ExampleManagementClient_ListNetworkManagerEffectiveConnectivityConfigurations() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewManagementClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListNetworkManagerEffectiveConnectivityConfigurations(ctx, "myResourceGroup", "testVirtualNetwork", armnetwork.QueryRequestOptions{ - SkipToken: to.Ptr("FakeSkipTokenCode"), - }, &armnetwork.ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsOptions{Top: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerEffectiveSecurityAdminRulesList.json -func ExampleManagementClient_ListNetworkManagerEffectiveSecurityAdminRules() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewManagementClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListNetworkManagerEffectiveSecurityAdminRules(ctx, "myResourceGroup", "testVirtualNetwork", armnetwork.QueryRequestOptions{ - SkipToken: to.Ptr("FakeSkipTokenCode"), - }, &armnetwork.ManagementClientListNetworkManagerEffectiveSecurityAdminRulesOptions{Top: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualWanSupportedSecurityProviders.json -func ExampleManagementClient_SupportedSecurityProviders() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewManagementClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.SupportedSecurityProviders(ctx, "rg1", "wan1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/GenerateVirtualWanVpnServerConfigurationVpnProfile.json -func ExampleManagementClient_BeginGeneratevirtualwanvpnserverconfigurationvpnprofile() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewManagementClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGeneratevirtualwanvpnserverconfigurationvpnprofile(ctx, "rg1", "wan1", armnetwork.VirtualWanVPNProfileParameters{ - AuthenticationMethod: to.Ptr(armnetwork.AuthenticationMethodEAPTLS), - VPNServerConfigurationResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnServerConfigurations/vpnconfig1"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/managementgroupnetworkmanagerconnections_client.go b/sdk/resourcemanager/network/armnetwork/managementgroupnetworkmanagerconnections_client.go index a1c593ff1639..ad4d1a86b6db 100644 --- a/sdk/resourcemanager/network/armnetwork/managementgroupnetworkmanagerconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/managementgroupnetworkmanagerconnections_client.go @@ -32,8 +32,8 @@ type ManagementGroupNetworkManagerConnectionsClient struct { } // NewManagementGroupNetworkManagerConnectionsClient creates a new instance of ManagementGroupNetworkManagerConnectionsClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewManagementGroupNetworkManagerConnectionsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagementGroupNetworkManagerConnectionsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -55,12 +55,13 @@ func NewManagementGroupNetworkManagerConnectionsClient(credential azcore.TokenCr // CreateOrUpdate - Create a network manager connection on this management group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// managementGroupID - The management group Id which uniquely identify the Microsoft Azure management group. -// networkManagerConnectionName - Name for the network manager connection. -// parameters - Network manager connection to be created/updated. -// options - ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateOptions contains the optional parameters for the -// ManagementGroupNetworkManagerConnectionsClient.CreateOrUpdate method. +// - managementGroupID - The management group Id which uniquely identify the Microsoft Azure management group. +// - networkManagerConnectionName - Name for the network manager connection. +// - parameters - Network manager connection to be created/updated. +// - options - ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateOptions contains the optional parameters for the +// ManagementGroupNetworkManagerConnectionsClient.CreateOrUpdate method. func (client *ManagementGroupNetworkManagerConnectionsClient) CreateOrUpdate(ctx context.Context, managementGroupID string, networkManagerConnectionName string, parameters ManagerConnection, options *ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateOptions) (ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, managementGroupID, networkManagerConnectionName, parameters, options) if err != nil { @@ -109,11 +110,12 @@ func (client *ManagementGroupNetworkManagerConnectionsClient) createOrUpdateHand // Delete - Delete specified pending connection created by this management group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// managementGroupID - The management group Id which uniquely identify the Microsoft Azure management group. -// networkManagerConnectionName - Name for the network manager connection. -// options - ManagementGroupNetworkManagerConnectionsClientDeleteOptions contains the optional parameters for the ManagementGroupNetworkManagerConnectionsClient.Delete -// method. +// - managementGroupID - The management group Id which uniquely identify the Microsoft Azure management group. +// - networkManagerConnectionName - Name for the network manager connection. +// - options - ManagementGroupNetworkManagerConnectionsClientDeleteOptions contains the optional parameters for the ManagementGroupNetworkManagerConnectionsClient.Delete +// method. func (client *ManagementGroupNetworkManagerConnectionsClient) Delete(ctx context.Context, managementGroupID string, networkManagerConnectionName string, options *ManagementGroupNetworkManagerConnectionsClientDeleteOptions) (ManagementGroupNetworkManagerConnectionsClientDeleteResponse, error) { req, err := client.deleteCreateRequest(ctx, managementGroupID, networkManagerConnectionName, options) if err != nil { @@ -153,11 +155,12 @@ func (client *ManagementGroupNetworkManagerConnectionsClient) deleteCreateReques // Get - Get a specified connection created by this management group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// managementGroupID - The management group Id which uniquely identify the Microsoft Azure management group. -// networkManagerConnectionName - Name for the network manager connection. -// options - ManagementGroupNetworkManagerConnectionsClientGetOptions contains the optional parameters for the ManagementGroupNetworkManagerConnectionsClient.Get -// method. +// - managementGroupID - The management group Id which uniquely identify the Microsoft Azure management group. +// - networkManagerConnectionName - Name for the network manager connection. +// - options - ManagementGroupNetworkManagerConnectionsClientGetOptions contains the optional parameters for the ManagementGroupNetworkManagerConnectionsClient.Get +// method. func (client *ManagementGroupNetworkManagerConnectionsClient) Get(ctx context.Context, managementGroupID string, networkManagerConnectionName string, options *ManagementGroupNetworkManagerConnectionsClientGetOptions) (ManagementGroupNetworkManagerConnectionsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, managementGroupID, networkManagerConnectionName, options) if err != nil { @@ -205,10 +208,11 @@ func (client *ManagementGroupNetworkManagerConnectionsClient) getHandleResponse( } // NewListPager - List all network manager connections created by this management group. +// // Generated from API version 2022-07-01 -// managementGroupID - The management group Id which uniquely identify the Microsoft Azure management group. -// options - ManagementGroupNetworkManagerConnectionsClientListOptions contains the optional parameters for the ManagementGroupNetworkManagerConnectionsClient.List -// method. +// - managementGroupID - The management group Id which uniquely identify the Microsoft Azure management group. +// - options - ManagementGroupNetworkManagerConnectionsClientListOptions contains the optional parameters for the ManagementGroupNetworkManagerConnectionsClient.NewListPager +// method. func (client *ManagementGroupNetworkManagerConnectionsClient) NewListPager(managementGroupID string, options *ManagementGroupNetworkManagerConnectionsClientListOptions) *runtime.Pager[ManagementGroupNetworkManagerConnectionsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ManagementGroupNetworkManagerConnectionsClientListResponse]{ More: func(page ManagementGroupNetworkManagerConnectionsClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/managementgroupnetworkmanagerconnections_client_example_test.go b/sdk/resourcemanager/network/armnetwork/managementgroupnetworkmanagerconnections_client_example_test.go deleted file mode 100644 index b359902b4e4f..000000000000 --- a/sdk/resourcemanager/network/armnetwork/managementgroupnetworkmanagerconnections_client_example_test.go +++ /dev/null @@ -1,103 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerConnectionManagementGroupPut.json -func ExampleManagementGroupNetworkManagerConnectionsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewManagementGroupNetworkManagerConnectionsClient(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, "managementGroupA", "TestNMConnection", armnetwork.ManagerConnection{ - Properties: &armnetwork.ManagerConnectionProperties{ - NetworkManagerID: to.Ptr("/subscriptions/subscriptionC/resourceGroup/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerConnectionManagementGroupGet.json -func ExampleManagementGroupNetworkManagerConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewManagementGroupNetworkManagerConnectionsClient(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "managementGroupA", "TestNMConnection", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerConnectionManagementGroupDelete.json -func ExampleManagementGroupNetworkManagerConnectionsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewManagementGroupNetworkManagerConnectionsClient(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, "managementGroupA", "TestNMConnection", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerConnectionManagementGroupList.json -func ExampleManagementGroupNetworkManagerConnectionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewManagementGroupNetworkManagerConnectionsClient(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("managementGroupA", &armnetwork.ManagementGroupNetworkManagerConnectionsClientListOptions{Top: nil, - SkipToken: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/managercommits_client.go b/sdk/resourcemanager/network/armnetwork/managercommits_client.go index cc948dcbd03c..37b2ddaffa14 100644 --- a/sdk/resourcemanager/network/armnetwork/managercommits_client.go +++ b/sdk/resourcemanager/network/armnetwork/managercommits_client.go @@ -32,10 +32,10 @@ type ManagerCommitsClient struct { } // NewManagerCommitsClient creates a new instance of ManagerCommitsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewManagerCommitsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagerCommitsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewManagerCommitsClient(subscriptionID string, credential azcore.TokenCrede // BeginPost - Post a Network Manager Commit. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// parameters - Parameters supplied to specify which Managed Network commit is. -// options - ManagerCommitsClientBeginPostOptions contains the optional parameters for the ManagerCommitsClient.BeginPost -// method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - parameters - Parameters supplied to specify which Managed Network commit is. +// - options - ManagerCommitsClientBeginPostOptions contains the optional parameters for the ManagerCommitsClient.BeginPost +// method. func (client *ManagerCommitsClient) BeginPost(ctx context.Context, resourceGroupName string, networkManagerName string, parameters ManagerCommit, options *ManagerCommitsClientBeginPostOptions) (*runtime.Poller[ManagerCommitsClientPostResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.post(ctx, resourceGroupName, networkManagerName, parameters, options) @@ -80,6 +81,7 @@ func (client *ManagerCommitsClient) BeginPost(ctx context.Context, resourceGroup // Post - Post a Network Manager Commit. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ManagerCommitsClient) post(ctx context.Context, resourceGroupName string, networkManagerName string, parameters ManagerCommit, options *ManagerCommitsClientBeginPostOptions) (*http.Response, error) { req, err := client.postCreateRequest(ctx, resourceGroupName, networkManagerName, parameters, options) diff --git a/sdk/resourcemanager/network/armnetwork/managercommits_client_example_test.go b/sdk/resourcemanager/network/armnetwork/managercommits_client_example_test.go deleted file mode 100644 index 9572936969ee..000000000000 --- a/sdk/resourcemanager/network/armnetwork/managercommits_client_example_test.go +++ /dev/null @@ -1,47 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerCommitPost.json -func ExampleManagerCommitsClient_BeginPost() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewManagerCommitsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginPost(ctx, "resoureGroupSample", "testNetworkManager", armnetwork.ManagerCommit{ - CommitType: to.Ptr(armnetwork.ConfigurationTypeSecurityAdmin), - ConfigurationIDs: []*string{ - to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resoureGroupSample/providers/Microsoft.Network/networkManagers/testNetworkManager/securityAdminConfigurations/SampleSecurityAdminConfig")}, - TargetLocations: []*string{ - to.Ptr("useast")}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/managerdeploymentstatus_client.go b/sdk/resourcemanager/network/armnetwork/managerdeploymentstatus_client.go index 4613db79e0bb..5171b9ab18b1 100644 --- a/sdk/resourcemanager/network/armnetwork/managerdeploymentstatus_client.go +++ b/sdk/resourcemanager/network/armnetwork/managerdeploymentstatus_client.go @@ -33,10 +33,10 @@ type ManagerDeploymentStatusClient struct { } // NewManagerDeploymentStatusClient creates a new instance of ManagerDeploymentStatusClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewManagerDeploymentStatusClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagerDeploymentStatusClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -59,12 +59,13 @@ func NewManagerDeploymentStatusClient(subscriptionID string, credential azcore.T // List - Post to List of Network Manager Deployment Status. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// parameters - Parameters supplied to specify which Managed Network deployment status is. -// options - ManagerDeploymentStatusClientListOptions contains the optional parameters for the ManagerDeploymentStatusClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - parameters - Parameters supplied to specify which Managed Network deployment status is. +// - options - ManagerDeploymentStatusClientListOptions contains the optional parameters for the ManagerDeploymentStatusClient.List +// method. func (client *ManagerDeploymentStatusClient) List(ctx context.Context, resourceGroupName string, networkManagerName string, parameters ManagerDeploymentStatusParameter, options *ManagerDeploymentStatusClientListOptions) (ManagerDeploymentStatusClientListResponse, error) { req, err := client.listCreateRequest(ctx, resourceGroupName, networkManagerName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/managerdeploymentstatus_client_example_test.go b/sdk/resourcemanager/network/armnetwork/managerdeploymentstatus_client_example_test.go deleted file mode 100644 index 8590555266d3..000000000000 --- a/sdk/resourcemanager/network/armnetwork/managerdeploymentstatus_client_example_test.go +++ /dev/null @@ -1,45 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerDeploymentStatusList.json -func ExampleManagerDeploymentStatusClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewManagerDeploymentStatusClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.List(ctx, "resoureGroupSample", "testNetworkManager", armnetwork.ManagerDeploymentStatusParameter{ - DeploymentTypes: []*armnetwork.ConfigurationType{ - to.Ptr(armnetwork.ConfigurationTypeConnectivity), - to.Ptr(armnetwork.ConfigurationType("AdminPolicy"))}, - Regions: []*string{ - to.Ptr("eastus"), - to.Ptr("westus")}, - SkipToken: to.Ptr("FakeSkipTokenCode"), - }, &armnetwork.ManagerDeploymentStatusClientListOptions{Top: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/managers_client.go b/sdk/resourcemanager/network/armnetwork/managers_client.go index 26aab7c7858e..c7eb14e9fdae 100644 --- a/sdk/resourcemanager/network/armnetwork/managers_client.go +++ b/sdk/resourcemanager/network/armnetwork/managers_client.go @@ -33,10 +33,10 @@ type ManagersClient struct { } // NewManagersClient creates a new instance of ManagersClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewManagersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagersClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -59,11 +59,12 @@ func NewManagersClient(subscriptionID string, credential azcore.TokenCredential, // CreateOrUpdate - Creates or updates a Network Manager. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// parameters - Parameters supplied to specify which network manager is. -// options - ManagersClientCreateOrUpdateOptions contains the optional parameters for the ManagersClient.CreateOrUpdate method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - parameters - Parameters supplied to specify which network manager is. +// - options - ManagersClientCreateOrUpdateOptions contains the optional parameters for the ManagersClient.CreateOrUpdate method. func (client *ManagersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkManagerName string, parameters Manager, options *ManagersClientCreateOrUpdateOptions) (ManagersClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkManagerName, parameters, options) if err != nil { @@ -116,10 +117,11 @@ func (client *ManagersClient) createOrUpdateHandleResponse(resp *http.Response) // BeginDelete - Deletes a network manager. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// options - ManagersClientBeginDeleteOptions contains the optional parameters for the ManagersClient.BeginDelete method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - options - ManagersClientBeginDeleteOptions contains the optional parameters for the ManagersClient.BeginDelete method. func (client *ManagersClient) BeginDelete(ctx context.Context, resourceGroupName string, networkManagerName string, options *ManagersClientBeginDeleteOptions) (*runtime.Poller[ManagersClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, networkManagerName, options) @@ -136,6 +138,7 @@ func (client *ManagersClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Deletes a network manager. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ManagersClient) deleteOperation(ctx context.Context, resourceGroupName string, networkManagerName string, options *ManagersClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, options) @@ -183,10 +186,11 @@ func (client *ManagersClient) deleteCreateRequest(ctx context.Context, resourceG // Get - Gets the specified Network Manager. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// options - ManagersClientGetOptions contains the optional parameters for the ManagersClient.Get method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - options - ManagersClientGetOptions contains the optional parameters for the ManagersClient.Get method. func (client *ManagersClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, options *ManagersClientGetOptions) (ManagersClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, options) if err != nil { @@ -238,9 +242,10 @@ func (client *ManagersClient) getHandleResponse(resp *http.Response) (ManagersCl } // NewListPager - List network managers in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - ManagersClientListOptions contains the optional parameters for the ManagersClient.List method. +// - resourceGroupName - The name of the resource group. +// - options - ManagersClientListOptions contains the optional parameters for the ManagersClient.NewListPager method. func (client *ManagersClient) NewListPager(resourceGroupName string, options *ManagersClientListOptions) *runtime.Pager[ManagersClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ManagersClientListResponse]{ More: func(page ManagersClientListResponse) bool { @@ -307,9 +312,10 @@ func (client *ManagersClient) listHandleResponse(resp *http.Response) (ManagersC } // NewListBySubscriptionPager - List all network managers in a subscription. +// // Generated from API version 2022-07-01 -// options - ManagersClientListBySubscriptionOptions contains the optional parameters for the ManagersClient.ListBySubscription -// method. +// - options - ManagersClientListBySubscriptionOptions contains the optional parameters for the ManagersClient.NewListBySubscriptionPager +// method. func (client *ManagersClient) NewListBySubscriptionPager(options *ManagersClientListBySubscriptionOptions) *runtime.Pager[ManagersClientListBySubscriptionResponse] { return runtime.NewPager(runtime.PagingHandler[ManagersClientListBySubscriptionResponse]{ More: func(page ManagersClientListBySubscriptionResponse) bool { @@ -373,11 +379,12 @@ func (client *ManagersClient) listBySubscriptionHandleResponse(resp *http.Respon // Patch - Patch NetworkManager. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// parameters - Parameters supplied to specify which network manager is. -// options - ManagersClientPatchOptions contains the optional parameters for the ManagersClient.Patch method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - parameters - Parameters supplied to specify which network manager is. +// - options - ManagersClientPatchOptions contains the optional parameters for the ManagersClient.Patch method. func (client *ManagersClient) Patch(ctx context.Context, resourceGroupName string, networkManagerName string, parameters PatchObject, options *ManagersClientPatchOptions) (ManagersClientPatchResponse, error) { req, err := client.patchCreateRequest(ctx, resourceGroupName, networkManagerName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/managers_client_example_test.go b/sdk/resourcemanager/network/armnetwork/managers_client_example_test.go deleted file mode 100644 index 4ec68959a4da..000000000000 --- a/sdk/resourcemanager/network/armnetwork/managers_client_example_test.go +++ /dev/null @@ -1,165 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerGet.json -func ExampleManagersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewManagersClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "testNetworkManager", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerPut.json -func ExampleManagersClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewManagersClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, "rg1", "TestNetworkManager", armnetwork.Manager{ - Properties: &armnetwork.ManagerProperties{ - Description: to.Ptr("My Test Network Manager"), - NetworkManagerScopeAccesses: []*armnetwork.ConfigurationType{ - to.Ptr(armnetwork.ConfigurationTypeConnectivity)}, - NetworkManagerScopes: &armnetwork.ManagerPropertiesNetworkManagerScopes{ - ManagementGroups: []*string{ - to.Ptr("/Microsoft.Management/testmg")}, - Subscriptions: []*string{ - to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000")}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerDelete.json -func ExampleManagersClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewManagersClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "testNetworkManager", &armnetwork.ManagersClientBeginDeleteOptions{Force: to.Ptr(false)}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerPatch.json -func ExampleManagersClient_Patch() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewManagersClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Patch(ctx, "rg1", "testNetworkManager", armnetwork.PatchObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerListAll.json -func ExampleManagersClient_NewListBySubscriptionPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewManagersClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListBySubscriptionPager(&armnetwork.ManagersClientListBySubscriptionOptions{Top: nil, - SkipToken: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerList.json -func ExampleManagersClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewManagersClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", &armnetwork.ManagersClientListOptions{Top: nil, - SkipToken: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/models.go b/sdk/resourcemanager/network/armnetwork/models.go index 73e7a9922fd6..4099ad910cfe 100644 --- a/sdk/resourcemanager/network/armnetwork/models.go +++ b/sdk/resourcemanager/network/armnetwork/models.go @@ -360,7 +360,8 @@ type AdminRuleCollectionsClientGetOptions struct { // placeholder for future optional parameters } -// AdminRuleCollectionsClientListOptions contains the optional parameters for the AdminRuleCollectionsClient.List method. +// AdminRuleCollectionsClientListOptions contains the optional parameters for the AdminRuleCollectionsClient.NewListPager +// method. type AdminRuleCollectionsClientListOptions struct { // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, // the value of the nextLink element will include a skipToken parameter that @@ -398,7 +399,7 @@ type AdminRulesClientGetOptions struct { // placeholder for future optional parameters } -// AdminRulesClientListOptions contains the optional parameters for the AdminRulesClient.List method. +// AdminRulesClientListOptions contains the optional parameters for the AdminRulesClient.NewListPager method. type AdminRulesClientListOptions struct { // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, // the value of the nextLink element will include a skipToken parameter that @@ -1267,7 +1268,7 @@ type ApplicationGatewayPrivateEndpointConnectionsClientGetOptions struct { // placeholder for future optional parameters } -// ApplicationGatewayPrivateEndpointConnectionsClientListOptions contains the optional parameters for the ApplicationGatewayPrivateEndpointConnectionsClient.List +// ApplicationGatewayPrivateEndpointConnectionsClientListOptions contains the optional parameters for the ApplicationGatewayPrivateEndpointConnectionsClient.NewListPager // method. type ApplicationGatewayPrivateEndpointConnectionsClientListOptions struct { // placeholder for future optional parameters @@ -1376,7 +1377,7 @@ type ApplicationGatewayPrivateLinkResourceProperties struct { RequiredMembers []*string `json:"requiredMembers,omitempty" azure:"ro"` } -// ApplicationGatewayPrivateLinkResourcesClientListOptions contains the optional parameters for the ApplicationGatewayPrivateLinkResourcesClient.List +// ApplicationGatewayPrivateLinkResourcesClientListOptions contains the optional parameters for the ApplicationGatewayPrivateLinkResourcesClient.NewListPager // method. type ApplicationGatewayPrivateLinkResourcesClientListOptions struct { // placeholder for future optional parameters @@ -2042,7 +2043,7 @@ type ApplicationGatewayWafDynamicManifestResultList struct { Value []*ApplicationGatewayWafDynamicManifestResult `json:"value,omitempty"` } -// ApplicationGatewayWafDynamicManifestsClientGetOptions contains the optional parameters for the ApplicationGatewayWafDynamicManifestsClient.Get +// ApplicationGatewayWafDynamicManifestsClientGetOptions contains the optional parameters for the ApplicationGatewayWafDynamicManifestsClient.NewGetPager // method. type ApplicationGatewayWafDynamicManifestsClientGetOptions struct { // placeholder for future optional parameters @@ -2144,7 +2145,8 @@ type ApplicationGatewaysClientGetSSLPredefinedPolicyOptions struct { // placeholder for future optional parameters } -// ApplicationGatewaysClientListAllOptions contains the optional parameters for the ApplicationGatewaysClient.ListAll method. +// ApplicationGatewaysClientListAllOptions contains the optional parameters for the ApplicationGatewaysClient.NewListAllPager +// method. type ApplicationGatewaysClientListAllOptions struct { // placeholder for future optional parameters } @@ -2167,7 +2169,7 @@ type ApplicationGatewaysClientListAvailableSSLOptionsOptions struct { // placeholder for future optional parameters } -// ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableSSLPredefinedPolicies +// ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesOptions contains the optional parameters for the ApplicationGatewaysClient.NewListAvailableSSLPredefinedPoliciesPager // method. type ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesOptions struct { // placeholder for future optional parameters @@ -2185,7 +2187,7 @@ type ApplicationGatewaysClientListAvailableWafRuleSetsOptions struct { // placeholder for future optional parameters } -// ApplicationGatewaysClientListOptions contains the optional parameters for the ApplicationGatewaysClient.List method. +// ApplicationGatewaysClientListOptions contains the optional parameters for the ApplicationGatewaysClient.NewListPager method. type ApplicationGatewaysClientListOptions struct { // placeholder for future optional parameters } @@ -2308,13 +2310,13 @@ type ApplicationSecurityGroupsClientGetOptions struct { // placeholder for future optional parameters } -// ApplicationSecurityGroupsClientListAllOptions contains the optional parameters for the ApplicationSecurityGroupsClient.ListAll +// ApplicationSecurityGroupsClientListAllOptions contains the optional parameters for the ApplicationSecurityGroupsClient.NewListAllPager // method. type ApplicationSecurityGroupsClientListAllOptions struct { // placeholder for future optional parameters } -// ApplicationSecurityGroupsClientListOptions contains the optional parameters for the ApplicationSecurityGroupsClient.List +// ApplicationSecurityGroupsClientListOptions contains the optional parameters for the ApplicationSecurityGroupsClient.NewListPager // method. type ApplicationSecurityGroupsClientListOptions struct { // placeholder for future optional parameters @@ -2394,7 +2396,8 @@ type AvailableDelegation struct { Type *string `json:"type,omitempty"` } -// AvailableDelegationsClientListOptions contains the optional parameters for the AvailableDelegationsClient.List method. +// AvailableDelegationsClientListOptions contains the optional parameters for the AvailableDelegationsClient.NewListPager +// method. type AvailableDelegationsClientListOptions struct { // placeholder for future optional parameters } @@ -2408,7 +2411,7 @@ type AvailableDelegationsResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// AvailableEndpointServicesClientListOptions contains the optional parameters for the AvailableEndpointServicesClient.List +// AvailableEndpointServicesClientListOptions contains the optional parameters for the AvailableEndpointServicesClient.NewListPager // method. type AvailableEndpointServicesClientListOptions struct { // placeholder for future optional parameters @@ -2432,13 +2435,13 @@ type AvailablePrivateEndpointType struct { Type *string `json:"type,omitempty"` } -// AvailablePrivateEndpointTypesClientListByResourceGroupOptions contains the optional parameters for the AvailablePrivateEndpointTypesClient.ListByResourceGroup +// AvailablePrivateEndpointTypesClientListByResourceGroupOptions contains the optional parameters for the AvailablePrivateEndpointTypesClient.NewListByResourceGroupPager // method. type AvailablePrivateEndpointTypesClientListByResourceGroupOptions struct { // placeholder for future optional parameters } -// AvailablePrivateEndpointTypesClientListOptions contains the optional parameters for the AvailablePrivateEndpointTypesClient.List +// AvailablePrivateEndpointTypesClientListOptions contains the optional parameters for the AvailablePrivateEndpointTypesClient.NewListPager // method. type AvailablePrivateEndpointTypesClientListOptions struct { // placeholder for future optional parameters @@ -2507,7 +2510,7 @@ type AvailableProvidersListState struct { StateName *string `json:"stateName,omitempty"` } -// AvailableResourceGroupDelegationsClientListOptions contains the optional parameters for the AvailableResourceGroupDelegationsClient.List +// AvailableResourceGroupDelegationsClientListOptions contains the optional parameters for the AvailableResourceGroupDelegationsClient.NewListPager // method. type AvailableResourceGroupDelegationsClientListOptions struct { // placeholder for future optional parameters @@ -2528,13 +2531,14 @@ type AvailableServiceAlias struct { Type *string `json:"type,omitempty"` } -// AvailableServiceAliasesClientListByResourceGroupOptions contains the optional parameters for the AvailableServiceAliasesClient.ListByResourceGroup +// AvailableServiceAliasesClientListByResourceGroupOptions contains the optional parameters for the AvailableServiceAliasesClient.NewListByResourceGroupPager // method. type AvailableServiceAliasesClientListByResourceGroupOptions struct { // placeholder for future optional parameters } -// AvailableServiceAliasesClientListOptions contains the optional parameters for the AvailableServiceAliasesClient.List method. +// AvailableServiceAliasesClientListOptions contains the optional parameters for the AvailableServiceAliasesClient.NewListPager +// method. type AvailableServiceAliasesClientListOptions struct { // placeholder for future optional parameters } @@ -2694,7 +2698,7 @@ type AzureFirewallFqdnTagPropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// AzureFirewallFqdnTagsClientListAllOptions contains the optional parameters for the AzureFirewallFqdnTagsClient.ListAll +// AzureFirewallFqdnTagsClientListAllOptions contains the optional parameters for the AzureFirewallFqdnTagsClient.NewListAllPager // method. type AzureFirewallFqdnTagsClientListAllOptions struct { // placeholder for future optional parameters @@ -2975,12 +2979,12 @@ type AzureFirewallsClientGetOptions struct { // placeholder for future optional parameters } -// AzureFirewallsClientListAllOptions contains the optional parameters for the AzureFirewallsClient.ListAll method. +// AzureFirewallsClientListAllOptions contains the optional parameters for the AzureFirewallsClient.NewListAllPager method. type AzureFirewallsClientListAllOptions struct { // placeholder for future optional parameters } -// AzureFirewallsClientListOptions contains the optional parameters for the AzureFirewallsClient.List method. +// AzureFirewallsClientListOptions contains the optional parameters for the AzureFirewallsClient.NewListPager method. type AzureFirewallsClientListOptions struct { // placeholder for future optional parameters } @@ -3211,7 +3215,7 @@ type BastionActiveSession struct { SessionID *string `json:"sessionId,omitempty" azure:"ro"` // READ-ONLY; The time when the session started. - StartTime interface{} `json:"startTime,omitempty" azure:"ro"` + StartTime any `json:"startTime,omitempty" azure:"ro"` // READ-ONLY; The host name of the target. TargetHostName *string `json:"targetHostName,omitempty" azure:"ro"` @@ -3364,13 +3368,13 @@ type BastionHostsClientGetOptions struct { // placeholder for future optional parameters } -// BastionHostsClientListByResourceGroupOptions contains the optional parameters for the BastionHostsClient.ListByResourceGroup +// BastionHostsClientListByResourceGroupOptions contains the optional parameters for the BastionHostsClient.NewListByResourceGroupPager // method. type BastionHostsClientListByResourceGroupOptions struct { // placeholder for future optional parameters } -// BastionHostsClientListOptions contains the optional parameters for the BastionHostsClient.List method. +// BastionHostsClientListOptions contains the optional parameters for the BastionHostsClient.NewListPager method. type BastionHostsClientListOptions struct { // placeholder for future optional parameters } @@ -3495,7 +3499,8 @@ type BgpPeerStatusListResult struct { Value []*BgpPeerStatus `json:"value,omitempty"` } -// BgpServiceCommunitiesClientListOptions contains the optional parameters for the BgpServiceCommunitiesClient.List method. +// BgpServiceCommunitiesClientListOptions contains the optional parameters for the BgpServiceCommunitiesClient.NewListPager +// method. type BgpServiceCommunitiesClientListOptions struct { // placeholder for future optional parameters } @@ -3670,7 +3675,7 @@ type ConfigurationPolicyGroupsClientGetOptions struct { // placeholder for future optional parameters } -// ConfigurationPolicyGroupsClientListByVPNServerConfigurationOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.ListByVPNServerConfiguration +// ConfigurationPolicyGroupsClientListByVPNServerConfigurationOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.NewListByVPNServerConfigurationPager // method. type ConfigurationPolicyGroupsClientListByVPNServerConfigurationOptions struct { // placeholder for future optional parameters @@ -4027,7 +4032,7 @@ type ConnectionMonitorsClientGetOptions struct { // placeholder for future optional parameters } -// ConnectionMonitorsClientListOptions contains the optional parameters for the ConnectionMonitorsClient.List method. +// ConnectionMonitorsClientListOptions contains the optional parameters for the ConnectionMonitorsClient.NewListPager method. type ConnectionMonitorsClientListOptions struct { // placeholder for future optional parameters } @@ -4163,7 +4168,7 @@ type ConnectivityConfigurationsClientGetOptions struct { // placeholder for future optional parameters } -// ConnectivityConfigurationsClientListOptions contains the optional parameters for the ConnectivityConfigurationsClient.List +// ConnectivityConfigurationsClientListOptions contains the optional parameters for the ConnectivityConfigurationsClient.NewListPager // method. type ConnectivityConfigurationsClientListOptions struct { // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, @@ -4529,12 +4534,12 @@ type CustomIPPrefixesClientGetOptions struct { Expand *string } -// CustomIPPrefixesClientListAllOptions contains the optional parameters for the CustomIPPrefixesClient.ListAll method. +// CustomIPPrefixesClientListAllOptions contains the optional parameters for the CustomIPPrefixesClient.NewListAllPager method. type CustomIPPrefixesClientListAllOptions struct { // placeholder for future optional parameters } -// CustomIPPrefixesClientListOptions contains the optional parameters for the CustomIPPrefixesClient.List method. +// CustomIPPrefixesClientListOptions contains the optional parameters for the CustomIPPrefixesClient.NewListPager method. type CustomIPPrefixesClientListOptions struct { // placeholder for future optional parameters } @@ -4689,13 +4694,13 @@ type DdosProtectionPlansClientGetOptions struct { // placeholder for future optional parameters } -// DdosProtectionPlansClientListByResourceGroupOptions contains the optional parameters for the DdosProtectionPlansClient.ListByResourceGroup +// DdosProtectionPlansClientListByResourceGroupOptions contains the optional parameters for the DdosProtectionPlansClient.NewListByResourceGroupPager // method. type DdosProtectionPlansClientListByResourceGroupOptions struct { // placeholder for future optional parameters } -// DdosProtectionPlansClientListOptions contains the optional parameters for the DdosProtectionPlansClient.List method. +// DdosProtectionPlansClientListOptions contains the optional parameters for the DdosProtectionPlansClient.NewListPager method. type DdosProtectionPlansClientListOptions struct { // placeholder for future optional parameters } @@ -4802,7 +4807,8 @@ type DefaultSecurityRulesClientGetOptions struct { // placeholder for future optional parameters } -// DefaultSecurityRulesClientListOptions contains the optional parameters for the DefaultSecurityRulesClient.List method. +// DefaultSecurityRulesClientListOptions contains the optional parameters for the DefaultSecurityRulesClient.NewListPager +// method. type DefaultSecurityRulesClientListOptions struct { // placeholder for future optional parameters } @@ -4908,12 +4914,13 @@ type DscpConfigurationClientGetOptions struct { // placeholder for future optional parameters } -// DscpConfigurationClientListAllOptions contains the optional parameters for the DscpConfigurationClient.ListAll method. +// DscpConfigurationClientListAllOptions contains the optional parameters for the DscpConfigurationClient.NewListAllPager +// method. type DscpConfigurationClientListAllOptions struct { // placeholder for future optional parameters } -// DscpConfigurationClientListOptions contains the optional parameters for the DscpConfigurationClient.List method. +// DscpConfigurationClientListOptions contains the optional parameters for the DscpConfigurationClient.NewListPager method. type DscpConfigurationClientListOptions struct { // placeholder for future optional parameters } @@ -5425,7 +5432,7 @@ type ExpressRouteCircuitAuthorizationsClientGetOptions struct { // placeholder for future optional parameters } -// ExpressRouteCircuitAuthorizationsClientListOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.List +// ExpressRouteCircuitAuthorizationsClientListOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.NewListPager // method. type ExpressRouteCircuitAuthorizationsClientListOptions struct { // placeholder for future optional parameters @@ -5503,7 +5510,7 @@ type ExpressRouteCircuitConnectionsClientGetOptions struct { // placeholder for future optional parameters } -// ExpressRouteCircuitConnectionsClientListOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.List +// ExpressRouteCircuitConnectionsClientListOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.NewListPager // method. type ExpressRouteCircuitConnectionsClientListOptions struct { // placeholder for future optional parameters @@ -5656,7 +5663,7 @@ type ExpressRouteCircuitPeeringsClientGetOptions struct { // placeholder for future optional parameters } -// ExpressRouteCircuitPeeringsClientListOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.List +// ExpressRouteCircuitPeeringsClientListOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.NewListPager // method. type ExpressRouteCircuitPeeringsClientListOptions struct { // placeholder for future optional parameters @@ -5853,12 +5860,14 @@ type ExpressRouteCircuitsClientGetStatsOptions struct { // placeholder for future optional parameters } -// ExpressRouteCircuitsClientListAllOptions contains the optional parameters for the ExpressRouteCircuitsClient.ListAll method. +// ExpressRouteCircuitsClientListAllOptions contains the optional parameters for the ExpressRouteCircuitsClient.NewListAllPager +// method. type ExpressRouteCircuitsClientListAllOptions struct { // placeholder for future optional parameters } -// ExpressRouteCircuitsClientListOptions contains the optional parameters for the ExpressRouteCircuitsClient.List method. +// ExpressRouteCircuitsClientListOptions contains the optional parameters for the ExpressRouteCircuitsClient.NewListPager +// method. type ExpressRouteCircuitsClientListOptions struct { // placeholder for future optional parameters } @@ -6090,7 +6099,7 @@ type ExpressRouteCrossConnectionPeeringsClientGetOptions struct { // placeholder for future optional parameters } -// ExpressRouteCrossConnectionPeeringsClientListOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.List +// ExpressRouteCrossConnectionPeeringsClientListOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.NewListPager // method. type ExpressRouteCrossConnectionPeeringsClientListOptions struct { // placeholder for future optional parameters @@ -6179,13 +6188,13 @@ type ExpressRouteCrossConnectionsClientGetOptions struct { // placeholder for future optional parameters } -// ExpressRouteCrossConnectionsClientListByResourceGroupOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.ListByResourceGroup +// ExpressRouteCrossConnectionsClientListByResourceGroupOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.NewListByResourceGroupPager // method. type ExpressRouteCrossConnectionsClientListByResourceGroupOptions struct { // placeholder for future optional parameters } -// ExpressRouteCrossConnectionsClientListOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.List +// ExpressRouteCrossConnectionsClientListOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.NewListPager // method. type ExpressRouteCrossConnectionsClientListOptions struct { // placeholder for future optional parameters @@ -6382,7 +6391,7 @@ type ExpressRouteLinksClientGetOptions struct { // placeholder for future optional parameters } -// ExpressRouteLinksClientListOptions contains the optional parameters for the ExpressRouteLinksClient.List method. +// ExpressRouteLinksClientListOptions contains the optional parameters for the ExpressRouteLinksClient.NewListPager method. type ExpressRouteLinksClientListOptions struct { // placeholder for future optional parameters } @@ -6476,7 +6485,7 @@ type ExpressRoutePortAuthorizationsClientGetOptions struct { // placeholder for future optional parameters } -// ExpressRoutePortAuthorizationsClientListOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.List +// ExpressRoutePortAuthorizationsClientListOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.NewListPager // method. type ExpressRoutePortAuthorizationsClientListOptions struct { // placeholder for future optional parameters @@ -6555,13 +6564,13 @@ type ExpressRoutePortsClientGetOptions struct { // placeholder for future optional parameters } -// ExpressRoutePortsClientListByResourceGroupOptions contains the optional parameters for the ExpressRoutePortsClient.ListByResourceGroup +// ExpressRoutePortsClientListByResourceGroupOptions contains the optional parameters for the ExpressRoutePortsClient.NewListByResourceGroupPager // method. type ExpressRoutePortsClientListByResourceGroupOptions struct { // placeholder for future optional parameters } -// ExpressRoutePortsClientListOptions contains the optional parameters for the ExpressRoutePortsClient.List method. +// ExpressRoutePortsClientListOptions contains the optional parameters for the ExpressRoutePortsClient.NewListPager method. type ExpressRoutePortsClientListOptions struct { // placeholder for future optional parameters } @@ -6631,7 +6640,7 @@ type ExpressRoutePortsLocationsClientGetOptions struct { // placeholder for future optional parameters } -// ExpressRoutePortsLocationsClientListOptions contains the optional parameters for the ExpressRoutePortsLocationsClient.List +// ExpressRoutePortsLocationsClientListOptions contains the optional parameters for the ExpressRoutePortsLocationsClient.NewListPager // method. type ExpressRoutePortsLocationsClientListOptions struct { // placeholder for future optional parameters @@ -6755,7 +6764,7 @@ type ExpressRouteServiceProviderPropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// ExpressRouteServiceProvidersClientListOptions contains the optional parameters for the ExpressRouteServiceProvidersClient.List +// ExpressRouteServiceProvidersClientListOptions contains the optional parameters for the ExpressRouteServiceProvidersClient.NewListPager // method. type ExpressRouteServiceProvidersClientListOptions struct { // placeholder for future optional parameters @@ -6798,12 +6807,12 @@ type FirewallPoliciesClientGetOptions struct { Expand *string } -// FirewallPoliciesClientListAllOptions contains the optional parameters for the FirewallPoliciesClient.ListAll method. +// FirewallPoliciesClientListAllOptions contains the optional parameters for the FirewallPoliciesClient.NewListAllPager method. type FirewallPoliciesClientListAllOptions struct { // placeholder for future optional parameters } -// FirewallPoliciesClientListOptions contains the optional parameters for the FirewallPoliciesClient.List method. +// FirewallPoliciesClientListOptions contains the optional parameters for the FirewallPoliciesClient.NewListPager method. type FirewallPoliciesClientListOptions struct { // placeholder for future optional parameters } @@ -7215,7 +7224,7 @@ type FirewallPolicyRuleCollectionGroupsClientGetOptions struct { // placeholder for future optional parameters } -// FirewallPolicyRuleCollectionGroupsClientListOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.List +// FirewallPolicyRuleCollectionGroupsClientListOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.NewListPager // method. type FirewallPolicyRuleCollectionGroupsClientListOptions struct { // placeholder for future optional parameters @@ -7376,7 +7385,7 @@ type FlowLogsClientGetOptions struct { // placeholder for future optional parameters } -// FlowLogsClientListOptions contains the optional parameters for the FlowLogsClient.List method. +// FlowLogsClientListOptions contains the optional parameters for the FlowLogsClient.NewListPager method. type FlowLogsClientListOptions struct { // placeholder for future optional parameters } @@ -7603,7 +7612,7 @@ type GroupsClientGetOptions struct { // placeholder for future optional parameters } -// GroupsClientListOptions contains the optional parameters for the GroupsClient.List method. +// GroupsClientListOptions contains the optional parameters for the GroupsClient.NewListPager method. type GroupsClientListOptions struct { // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, // the value of the nextLink element will include a skipToken parameter that @@ -7802,7 +7811,7 @@ type HubRouteTablesClientGetOptions struct { // placeholder for future optional parameters } -// HubRouteTablesClientListOptions contains the optional parameters for the HubRouteTablesClient.List method. +// HubRouteTablesClientListOptions contains the optional parameters for the HubRouteTablesClient.NewListPager method. type HubRouteTablesClientListOptions struct { // placeholder for future optional parameters } @@ -7863,7 +7872,7 @@ type HubVirtualNetworkConnectionsClientGetOptions struct { // placeholder for future optional parameters } -// HubVirtualNetworkConnectionsClientListOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.List +// HubVirtualNetworkConnectionsClientListOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.NewListPager // method. type HubVirtualNetworkConnectionsClientListOptions struct { // placeholder for future optional parameters @@ -7978,13 +7987,13 @@ type IPAllocationsClientGetOptions struct { Expand *string } -// IPAllocationsClientListByResourceGroupOptions contains the optional parameters for the IPAllocationsClient.ListByResourceGroup +// IPAllocationsClientListByResourceGroupOptions contains the optional parameters for the IPAllocationsClient.NewListByResourceGroupPager // method. type IPAllocationsClientListByResourceGroupOptions struct { // placeholder for future optional parameters } -// IPAllocationsClientListOptions contains the optional parameters for the IPAllocationsClient.List method. +// IPAllocationsClientListOptions contains the optional parameters for the IPAllocationsClient.NewListPager method. type IPAllocationsClientListOptions struct { // placeholder for future optional parameters } @@ -8135,12 +8144,13 @@ type IPGroupsClientGetOptions struct { Expand *string } -// IPGroupsClientListByResourceGroupOptions contains the optional parameters for the IPGroupsClient.ListByResourceGroup method. +// IPGroupsClientListByResourceGroupOptions contains the optional parameters for the IPGroupsClient.NewListByResourceGroupPager +// method. type IPGroupsClientListByResourceGroupOptions struct { // placeholder for future optional parameters } -// IPGroupsClientListOptions contains the optional parameters for the IPGroupsClient.List method. +// IPGroupsClientListOptions contains the optional parameters for the IPGroupsClient.NewListPager method. type IPGroupsClientListOptions struct { // placeholder for future optional parameters } @@ -8387,7 +8397,7 @@ type InboundNatRulesClientGetOptions struct { Expand *string } -// InboundNatRulesClientListOptions contains the optional parameters for the InboundNatRulesClient.List method. +// InboundNatRulesClientListOptions contains the optional parameters for the InboundNatRulesClient.NewListPager method. type InboundNatRulesClientListOptions struct { // placeholder for future optional parameters } @@ -8618,7 +8628,7 @@ type InterfaceIPConfigurationsClientGetOptions struct { // placeholder for future optional parameters } -// InterfaceIPConfigurationsClientListOptions contains the optional parameters for the InterfaceIPConfigurationsClient.List +// InterfaceIPConfigurationsClientListOptions contains the optional parameters for the InterfaceIPConfigurationsClient.NewListPager // method. type InterfaceIPConfigurationsClientListOptions struct { // placeholder for future optional parameters @@ -8642,7 +8652,8 @@ type InterfaceLoadBalancerListResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// InterfaceLoadBalancersClientListOptions contains the optional parameters for the InterfaceLoadBalancersClient.List method. +// InterfaceLoadBalancersClientListOptions contains the optional parameters for the InterfaceLoadBalancersClient.NewListPager +// method. type InterfaceLoadBalancersClientListOptions struct { // placeholder for future optional parameters } @@ -8770,7 +8781,7 @@ type InterfaceTapConfigurationsClientGetOptions struct { // placeholder for future optional parameters } -// InterfaceTapConfigurationsClientListOptions contains the optional parameters for the InterfaceTapConfigurationsClient.List +// InterfaceTapConfigurationsClientListOptions contains the optional parameters for the InterfaceTapConfigurationsClient.NewListPager // method. type InterfaceTapConfigurationsClientListOptions struct { // placeholder for future optional parameters @@ -8830,42 +8841,42 @@ type InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceOptions struct { Expand *string } -// InterfacesClientListAllOptions contains the optional parameters for the InterfacesClient.ListAll method. +// InterfacesClientListAllOptions contains the optional parameters for the InterfacesClient.NewListAllPager method. type InterfacesClientListAllOptions struct { // placeholder for future optional parameters } -// InterfacesClientListCloudServiceNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.ListCloudServiceNetworkInterfaces +// InterfacesClientListCloudServiceNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.NewListCloudServiceNetworkInterfacesPager // method. type InterfacesClientListCloudServiceNetworkInterfacesOptions struct { // placeholder for future optional parameters } -// InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.ListCloudServiceRoleInstanceNetworkInterfaces +// InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.NewListCloudServiceRoleInstanceNetworkInterfacesPager // method. type InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesOptions struct { // placeholder for future optional parameters } -// InterfacesClientListOptions contains the optional parameters for the InterfacesClient.List method. +// InterfacesClientListOptions contains the optional parameters for the InterfacesClient.NewListPager method. type InterfacesClientListOptions struct { // placeholder for future optional parameters } -// InterfacesClientListVirtualMachineScaleSetIPConfigurationsOptions contains the optional parameters for the InterfacesClient.ListVirtualMachineScaleSetIPConfigurations +// InterfacesClientListVirtualMachineScaleSetIPConfigurationsOptions contains the optional parameters for the InterfacesClient.NewListVirtualMachineScaleSetIPConfigurationsPager // method. type InterfacesClientListVirtualMachineScaleSetIPConfigurationsOptions struct { // Expands referenced resources. Expand *string } -// InterfacesClientListVirtualMachineScaleSetNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.ListVirtualMachineScaleSetNetworkInterfaces +// InterfacesClientListVirtualMachineScaleSetNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.NewListVirtualMachineScaleSetNetworkInterfacesPager // method. type InterfacesClientListVirtualMachineScaleSetNetworkInterfacesOptions struct { // placeholder for future optional parameters } -// InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.ListVirtualMachineScaleSetVMNetworkInterfaces +// InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.NewListVirtualMachineScaleSetVMNetworkInterfacesPager // method. type InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesOptions struct { // placeholder for future optional parameters @@ -9128,7 +9139,7 @@ type LoadBalancerBackendAddressPoolsClientGetOptions struct { // placeholder for future optional parameters } -// LoadBalancerBackendAddressPoolsClientListOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.List +// LoadBalancerBackendAddressPoolsClientListOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.NewListPager // method. type LoadBalancerBackendAddressPoolsClientListOptions struct { // placeholder for future optional parameters @@ -9174,7 +9185,7 @@ type LoadBalancerFrontendIPConfigurationsClientGetOptions struct { // placeholder for future optional parameters } -// LoadBalancerFrontendIPConfigurationsClientListOptions contains the optional parameters for the LoadBalancerFrontendIPConfigurationsClient.List +// LoadBalancerFrontendIPConfigurationsClientListOptions contains the optional parameters for the LoadBalancerFrontendIPConfigurationsClient.NewListPager // method. type LoadBalancerFrontendIPConfigurationsClientListOptions struct { // placeholder for future optional parameters @@ -9204,13 +9215,13 @@ type LoadBalancerLoadBalancingRulesClientGetOptions struct { // placeholder for future optional parameters } -// LoadBalancerLoadBalancingRulesClientListOptions contains the optional parameters for the LoadBalancerLoadBalancingRulesClient.List +// LoadBalancerLoadBalancingRulesClientListOptions contains the optional parameters for the LoadBalancerLoadBalancingRulesClient.NewListPager // method. type LoadBalancerLoadBalancingRulesClientListOptions struct { // placeholder for future optional parameters } -// LoadBalancerNetworkInterfacesClientListOptions contains the optional parameters for the LoadBalancerNetworkInterfacesClient.List +// LoadBalancerNetworkInterfacesClientListOptions contains the optional parameters for the LoadBalancerNetworkInterfacesClient.NewListPager // method. type LoadBalancerNetworkInterfacesClientListOptions struct { // placeholder for future optional parameters @@ -9231,7 +9242,7 @@ type LoadBalancerOutboundRulesClientGetOptions struct { // placeholder for future optional parameters } -// LoadBalancerOutboundRulesClientListOptions contains the optional parameters for the LoadBalancerOutboundRulesClient.List +// LoadBalancerOutboundRulesClientListOptions contains the optional parameters for the LoadBalancerOutboundRulesClient.NewListPager // method. type LoadBalancerOutboundRulesClientListOptions struct { // placeholder for future optional parameters @@ -9251,7 +9262,7 @@ type LoadBalancerProbesClientGetOptions struct { // placeholder for future optional parameters } -// LoadBalancerProbesClientListOptions contains the optional parameters for the LoadBalancerProbesClient.List method. +// LoadBalancerProbesClientListOptions contains the optional parameters for the LoadBalancerProbesClient.NewListPager method. type LoadBalancerProbesClientListOptions struct { // placeholder for future optional parameters } @@ -9358,12 +9369,12 @@ type LoadBalancersClientGetOptions struct { Expand *string } -// LoadBalancersClientListAllOptions contains the optional parameters for the LoadBalancersClient.ListAll method. +// LoadBalancersClientListAllOptions contains the optional parameters for the LoadBalancersClient.NewListAllPager method. type LoadBalancersClientListAllOptions struct { // placeholder for future optional parameters } -// LoadBalancersClientListOptions contains the optional parameters for the LoadBalancersClient.List method. +// LoadBalancersClientListOptions contains the optional parameters for the LoadBalancersClient.NewListPager method. type LoadBalancersClientListOptions struct { // placeholder for future optional parameters } @@ -9514,7 +9525,8 @@ type LocalNetworkGatewaysClientGetOptions struct { // placeholder for future optional parameters } -// LocalNetworkGatewaysClientListOptions contains the optional parameters for the LocalNetworkGatewaysClient.List method. +// LocalNetworkGatewaysClientListOptions contains the optional parameters for the LocalNetworkGatewaysClient.NewListPager +// method. type LocalNetworkGatewaysClientListOptions struct { // placeholder for future optional parameters } @@ -9633,7 +9645,7 @@ type ManagementClientCheckDNSNameAvailabilityOptions struct { // placeholder for future optional parameters } -// ManagementClientDisconnectActiveSessionsOptions contains the optional parameters for the ManagementClient.DisconnectActiveSessions +// ManagementClientDisconnectActiveSessionsOptions contains the optional parameters for the ManagementClient.NewDisconnectActiveSessionsPager // method. type ManagementClientDisconnectActiveSessionsOptions struct { // placeholder for future optional parameters @@ -9645,7 +9657,7 @@ type ManagementClientExpressRouteProviderPortOptions struct { // placeholder for future optional parameters } -// ManagementClientGetBastionShareableLinkOptions contains the optional parameters for the ManagementClient.GetBastionShareableLink +// ManagementClientGetBastionShareableLinkOptions contains the optional parameters for the ManagementClient.NewGetBastionShareableLinkPager // method. type ManagementClientGetBastionShareableLinkOptions struct { // placeholder for future optional parameters @@ -9703,7 +9715,7 @@ type ManagementGroupNetworkManagerConnectionsClientGetOptions struct { // placeholder for future optional parameters } -// ManagementGroupNetworkManagerConnectionsClientListOptions contains the optional parameters for the ManagementGroupNetworkManagerConnectionsClient.List +// ManagementGroupNetworkManagerConnectionsClientListOptions contains the optional parameters for the ManagementGroupNetworkManagerConnectionsClient.NewListPager // method. type ManagementGroupNetworkManagerConnectionsClientListOptions struct { // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, @@ -9937,7 +9949,8 @@ type ManagersClientGetOptions struct { // placeholder for future optional parameters } -// ManagersClientListBySubscriptionOptions contains the optional parameters for the ManagersClient.ListBySubscription method. +// ManagersClientListBySubscriptionOptions contains the optional parameters for the ManagersClient.NewListBySubscriptionPager +// method. type ManagersClientListBySubscriptionOptions struct { // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, // the value of the nextLink element will include a skipToken parameter that @@ -9947,7 +9960,7 @@ type ManagersClientListBySubscriptionOptions struct { Top *int32 } -// ManagersClientListOptions contains the optional parameters for the ManagersClient.List method. +// ManagersClientListOptions contains the optional parameters for the ManagersClient.NewListPager method. type ManagersClientListOptions struct { // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, // the value of the nextLink element will include a skipToken parameter that @@ -10128,12 +10141,12 @@ type NatGatewaysClientGetOptions struct { Expand *string } -// NatGatewaysClientListAllOptions contains the optional parameters for the NatGatewaysClient.ListAll method. +// NatGatewaysClientListAllOptions contains the optional parameters for the NatGatewaysClient.NewListAllPager method. type NatGatewaysClientListAllOptions struct { // placeholder for future optional parameters } -// NatGatewaysClientListOptions contains the optional parameters for the NatGatewaysClient.List method. +// NatGatewaysClientListOptions contains the optional parameters for the NatGatewaysClient.NewListPager method. type NatGatewaysClientListOptions struct { // placeholder for future optional parameters } @@ -10217,7 +10230,8 @@ type NatRulesClientGetOptions struct { // placeholder for future optional parameters } -// NatRulesClientListByVPNGatewayOptions contains the optional parameters for the NatRulesClient.ListByVPNGateway method. +// NatRulesClientListByVPNGatewayOptions contains the optional parameters for the NatRulesClient.NewListByVPNGatewayPager +// method. type NatRulesClientListByVPNGatewayOptions struct { // placeholder for future optional parameters } @@ -10331,7 +10345,7 @@ type OperationPropertiesFormatServiceSpecification struct { MetricSpecifications []*MetricSpecification `json:"metricSpecifications,omitempty"` } -// OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. type OperationsClientListOptions struct { // placeholder for future optional parameters } @@ -10573,13 +10587,13 @@ type P2SVPNGatewaysClientGetOptions struct { // placeholder for future optional parameters } -// P2SVPNGatewaysClientListByResourceGroupOptions contains the optional parameters for the P2SVPNGatewaysClient.ListByResourceGroup +// P2SVPNGatewaysClientListByResourceGroupOptions contains the optional parameters for the P2SVPNGatewaysClient.NewListByResourceGroupPager // method. type P2SVPNGatewaysClientListByResourceGroupOptions struct { // placeholder for future optional parameters } -// P2SVPNGatewaysClientListOptions contains the optional parameters for the P2SVPNGatewaysClient.List method. +// P2SVPNGatewaysClientListOptions contains the optional parameters for the P2SVPNGatewaysClient.NewListPager method. type P2SVPNGatewaysClientListOptions struct { // placeholder for future optional parameters } @@ -10778,7 +10792,7 @@ type PacketCapturesClientGetOptions struct { // placeholder for future optional parameters } -// PacketCapturesClientListOptions contains the optional parameters for the PacketCapturesClient.List method. +// PacketCapturesClientListOptions contains the optional parameters for the PacketCapturesClient.NewListPager method. type PacketCapturesClientListOptions struct { // placeholder for future optional parameters } @@ -10907,7 +10921,7 @@ type PeerExpressRouteCircuitConnectionsClientGetOptions struct { // placeholder for future optional parameters } -// PeerExpressRouteCircuitConnectionsClientListOptions contains the optional parameters for the PeerExpressRouteCircuitConnectionsClient.List +// PeerExpressRouteCircuitConnectionsClientListOptions contains the optional parameters for the PeerExpressRouteCircuitConnectionsClient.NewListPager // method. type PeerExpressRouteCircuitConnectionsClientListOptions struct { // placeholder for future optional parameters @@ -11037,7 +11051,8 @@ type PrivateDNSZoneGroupsClientGetOptions struct { // placeholder for future optional parameters } -// PrivateDNSZoneGroupsClientListOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.List method. +// PrivateDNSZoneGroupsClientListOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.NewListPager +// method. type PrivateDNSZoneGroupsClientListOptions struct { // placeholder for future optional parameters } @@ -11206,13 +11221,13 @@ type PrivateEndpointsClientGetOptions struct { Expand *string } -// PrivateEndpointsClientListBySubscriptionOptions contains the optional parameters for the PrivateEndpointsClient.ListBySubscription +// PrivateEndpointsClientListBySubscriptionOptions contains the optional parameters for the PrivateEndpointsClient.NewListBySubscriptionPager // method. type PrivateEndpointsClientListBySubscriptionOptions struct { // placeholder for future optional parameters } -// PrivateEndpointsClientListOptions contains the optional parameters for the PrivateEndpointsClient.List method. +// PrivateEndpointsClientListOptions contains the optional parameters for the PrivateEndpointsClient.NewListPager method. type PrivateEndpointsClientListOptions struct { // placeholder for future optional parameters } @@ -11441,29 +11456,29 @@ type PrivateLinkServicesClientGetPrivateEndpointConnectionOptions struct { } // PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupOptions contains the optional parameters for -// the PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServicesByResourceGroup method. +// the PrivateLinkServicesClient.NewListAutoApprovedPrivateLinkServicesByResourceGroupPager method. type PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupOptions struct { // placeholder for future optional parameters } -// PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesOptions contains the optional parameters for the PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServices +// PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesOptions contains the optional parameters for the PrivateLinkServicesClient.NewListAutoApprovedPrivateLinkServicesPager // method. type PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesOptions struct { // placeholder for future optional parameters } -// PrivateLinkServicesClientListBySubscriptionOptions contains the optional parameters for the PrivateLinkServicesClient.ListBySubscription +// PrivateLinkServicesClientListBySubscriptionOptions contains the optional parameters for the PrivateLinkServicesClient.NewListBySubscriptionPager // method. type PrivateLinkServicesClientListBySubscriptionOptions struct { // placeholder for future optional parameters } -// PrivateLinkServicesClientListOptions contains the optional parameters for the PrivateLinkServicesClient.List method. +// PrivateLinkServicesClientListOptions contains the optional parameters for the PrivateLinkServicesClient.NewListPager method. type PrivateLinkServicesClientListOptions struct { // placeholder for future optional parameters } -// PrivateLinkServicesClientListPrivateEndpointConnectionsOptions contains the optional parameters for the PrivateLinkServicesClient.ListPrivateEndpointConnections +// PrivateLinkServicesClientListPrivateEndpointConnectionsOptions contains the optional parameters for the PrivateLinkServicesClient.NewListPrivateEndpointConnectionsPager // method. type PrivateLinkServicesClientListPrivateEndpointConnectionsOptions struct { // placeholder for future optional parameters @@ -11596,12 +11611,12 @@ type ProfilesClientGetOptions struct { Expand *string } -// ProfilesClientListAllOptions contains the optional parameters for the ProfilesClient.ListAll method. +// ProfilesClientListAllOptions contains the optional parameters for the ProfilesClient.NewListAllPager method. type ProfilesClientListAllOptions struct { // placeholder for future optional parameters } -// ProfilesClientListOptions contains the optional parameters for the ProfilesClient.List method. +// ProfilesClientListOptions contains the optional parameters for the ProfilesClient.NewListPager method. type ProfilesClientListOptions struct { // placeholder for future optional parameters } @@ -11786,35 +11801,36 @@ type PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressOptions stru Expand *string } -// PublicIPAddressesClientListAllOptions contains the optional parameters for the PublicIPAddressesClient.ListAll method. +// PublicIPAddressesClientListAllOptions contains the optional parameters for the PublicIPAddressesClient.NewListAllPager +// method. type PublicIPAddressesClientListAllOptions struct { // placeholder for future optional parameters } -// PublicIPAddressesClientListCloudServicePublicIPAddressesOptions contains the optional parameters for the PublicIPAddressesClient.ListCloudServicePublicIPAddresses +// PublicIPAddressesClientListCloudServicePublicIPAddressesOptions contains the optional parameters for the PublicIPAddressesClient.NewListCloudServicePublicIPAddressesPager // method. type PublicIPAddressesClientListCloudServicePublicIPAddressesOptions struct { // placeholder for future optional parameters } -// PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesOptions contains the optional parameters for the PublicIPAddressesClient.ListCloudServiceRoleInstancePublicIPAddresses +// PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesOptions contains the optional parameters for the PublicIPAddressesClient.NewListCloudServiceRoleInstancePublicIPAddressesPager // method. type PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesOptions struct { // placeholder for future optional parameters } -// PublicIPAddressesClientListOptions contains the optional parameters for the PublicIPAddressesClient.List method. +// PublicIPAddressesClientListOptions contains the optional parameters for the PublicIPAddressesClient.NewListPager method. type PublicIPAddressesClientListOptions struct { // placeholder for future optional parameters } -// PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesOptions contains the optional parameters for the PublicIPAddressesClient.ListVirtualMachineScaleSetPublicIPAddresses +// PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesOptions contains the optional parameters for the PublicIPAddressesClient.NewListVirtualMachineScaleSetPublicIPAddressesPager // method. type PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesOptions struct { // placeholder for future optional parameters } -// PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesOptions contains the optional parameters for the PublicIPAddressesClient.ListVirtualMachineScaleSetVMPublicIPAddresses +// PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesOptions contains the optional parameters for the PublicIPAddressesClient.NewListVirtualMachineScaleSetVMPublicIPAddressesPager // method. type PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesOptions struct { // placeholder for future optional parameters @@ -11943,12 +11959,12 @@ type PublicIPPrefixesClientGetOptions struct { Expand *string } -// PublicIPPrefixesClientListAllOptions contains the optional parameters for the PublicIPPrefixesClient.ListAll method. +// PublicIPPrefixesClientListAllOptions contains the optional parameters for the PublicIPPrefixesClient.NewListAllPager method. type PublicIPPrefixesClientListAllOptions struct { // placeholder for future optional parameters } -// PublicIPPrefixesClientListOptions contains the optional parameters for the PublicIPPrefixesClient.List method. +// PublicIPPrefixesClientListOptions contains the optional parameters for the PublicIPPrefixesClient.NewListPager method. type PublicIPPrefixesClientListOptions struct { // placeholder for future optional parameters } @@ -12271,7 +12287,7 @@ type RouteFilterRulesClientGetOptions struct { // placeholder for future optional parameters } -// RouteFilterRulesClientListByRouteFilterOptions contains the optional parameters for the RouteFilterRulesClient.ListByRouteFilter +// RouteFilterRulesClientListByRouteFilterOptions contains the optional parameters for the RouteFilterRulesClient.NewListByRouteFilterPager // method. type RouteFilterRulesClientListByRouteFilterOptions struct { // placeholder for future optional parameters @@ -12296,13 +12312,13 @@ type RouteFiltersClientGetOptions struct { Expand *string } -// RouteFiltersClientListByResourceGroupOptions contains the optional parameters for the RouteFiltersClient.ListByResourceGroup +// RouteFiltersClientListByResourceGroupOptions contains the optional parameters for the RouteFiltersClient.NewListByResourceGroupPager // method. type RouteFiltersClientListByResourceGroupOptions struct { // placeholder for future optional parameters } -// RouteFiltersClientListOptions contains the optional parameters for the RouteFiltersClient.List method. +// RouteFiltersClientListOptions contains the optional parameters for the RouteFiltersClient.NewListPager method. type RouteFiltersClientListOptions struct { // placeholder for future optional parameters } @@ -12387,7 +12403,7 @@ type RouteMapsClientGetOptions struct { // placeholder for future optional parameters } -// RouteMapsClientListOptions contains the optional parameters for the RouteMapsClient.List method. +// RouteMapsClientListOptions contains the optional parameters for the RouteMapsClient.NewListPager method. type RouteMapsClientListOptions struct { // placeholder for future optional parameters } @@ -12480,12 +12496,12 @@ type RouteTablesClientGetOptions struct { Expand *string } -// RouteTablesClientListAllOptions contains the optional parameters for the RouteTablesClient.ListAll method. +// RouteTablesClientListAllOptions contains the optional parameters for the RouteTablesClient.NewListAllPager method. type RouteTablesClientListAllOptions struct { // placeholder for future optional parameters } -// RouteTablesClientListOptions contains the optional parameters for the RouteTablesClient.List method. +// RouteTablesClientListOptions contains the optional parameters for the RouteTablesClient.NewListPager method. type RouteTablesClientListOptions struct { // placeholder for future optional parameters } @@ -12512,7 +12528,7 @@ type RoutesClientGetOptions struct { // placeholder for future optional parameters } -// RoutesClientListOptions contains the optional parameters for the RoutesClient.List method. +// RoutesClientListOptions contains the optional parameters for the RoutesClient.NewListPager method. type RoutesClientListOptions struct { // placeholder for future optional parameters } @@ -12571,7 +12587,7 @@ type RoutingIntentClientGetOptions struct { // placeholder for future optional parameters } -// RoutingIntentClientListOptions contains the optional parameters for the RoutingIntentClient.List method. +// RoutingIntentClientListOptions contains the optional parameters for the RoutingIntentClient.NewListPager method. type RoutingIntentClientListOptions struct { // placeholder for future optional parameters } @@ -12706,7 +12722,7 @@ type ScopeConnectionsClientGetOptions struct { // placeholder for future optional parameters } -// ScopeConnectionsClientListOptions contains the optional parameters for the ScopeConnectionsClient.List method. +// ScopeConnectionsClientListOptions contains the optional parameters for the ScopeConnectionsClient.NewListPager method. type ScopeConnectionsClientListOptions struct { // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, // the value of the nextLink element will include a skipToken parameter that @@ -12780,7 +12796,7 @@ type SecurityAdminConfigurationsClientGetOptions struct { // placeholder for future optional parameters } -// SecurityAdminConfigurationsClientListOptions contains the optional parameters for the SecurityAdminConfigurationsClient.List +// SecurityAdminConfigurationsClientListOptions contains the optional parameters for the SecurityAdminConfigurationsClient.NewListPager // method. type SecurityAdminConfigurationsClientListOptions struct { // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, @@ -12901,12 +12917,12 @@ type SecurityGroupsClientGetOptions struct { Expand *string } -// SecurityGroupsClientListAllOptions contains the optional parameters for the SecurityGroupsClient.ListAll method. +// SecurityGroupsClientListAllOptions contains the optional parameters for the SecurityGroupsClient.NewListAllPager method. type SecurityGroupsClientListAllOptions struct { // placeholder for future optional parameters } -// SecurityGroupsClientListOptions contains the optional parameters for the SecurityGroupsClient.List method. +// SecurityGroupsClientListOptions contains the optional parameters for the SecurityGroupsClient.NewListPager method. type SecurityGroupsClientListOptions struct { // placeholder for future optional parameters } @@ -12983,13 +12999,13 @@ type SecurityPartnerProvidersClientGetOptions struct { // placeholder for future optional parameters } -// SecurityPartnerProvidersClientListByResourceGroupOptions contains the optional parameters for the SecurityPartnerProvidersClient.ListByResourceGroup +// SecurityPartnerProvidersClientListByResourceGroupOptions contains the optional parameters for the SecurityPartnerProvidersClient.NewListByResourceGroupPager // method. type SecurityPartnerProvidersClientListByResourceGroupOptions struct { // placeholder for future optional parameters } -// SecurityPartnerProvidersClientListOptions contains the optional parameters for the SecurityPartnerProvidersClient.List +// SecurityPartnerProvidersClientListOptions contains the optional parameters for the SecurityPartnerProvidersClient.NewListPager // method. type SecurityPartnerProvidersClientListOptions struct { // placeholder for future optional parameters @@ -13118,7 +13134,7 @@ type SecurityRulesClientGetOptions struct { // placeholder for future optional parameters } -// SecurityRulesClientListOptions contains the optional parameters for the SecurityRulesClient.List method. +// SecurityRulesClientListOptions contains the optional parameters for the SecurityRulesClient.NewListPager method. type SecurityRulesClientListOptions struct { // placeholder for future optional parameters } @@ -13226,13 +13242,14 @@ type ServiceEndpointPoliciesClientGetOptions struct { Expand *string } -// ServiceEndpointPoliciesClientListByResourceGroupOptions contains the optional parameters for the ServiceEndpointPoliciesClient.ListByResourceGroup +// ServiceEndpointPoliciesClientListByResourceGroupOptions contains the optional parameters for the ServiceEndpointPoliciesClient.NewListByResourceGroupPager // method. type ServiceEndpointPoliciesClientListByResourceGroupOptions struct { // placeholder for future optional parameters } -// ServiceEndpointPoliciesClientListOptions contains the optional parameters for the ServiceEndpointPoliciesClient.List method. +// ServiceEndpointPoliciesClientListOptions contains the optional parameters for the ServiceEndpointPoliciesClient.NewListPager +// method. type ServiceEndpointPoliciesClientListOptions struct { // placeholder for future optional parameters } @@ -13333,7 +13350,7 @@ type ServiceEndpointPolicyDefinitionsClientGetOptions struct { // placeholder for future optional parameters } -// ServiceEndpointPolicyDefinitionsClientListByResourceGroupOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.ListByResourceGroup +// ServiceEndpointPolicyDefinitionsClientListByResourceGroupOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.NewListByResourceGroupPager // method. type ServiceEndpointPolicyDefinitionsClientListByResourceGroupOptions struct { // placeholder for future optional parameters @@ -13396,7 +13413,8 @@ type ServiceTagInformation struct { ServiceTagChangeNumber *string `json:"serviceTagChangeNumber,omitempty" azure:"ro"` } -// ServiceTagInformationClientListOptions contains the optional parameters for the ServiceTagInformationClient.List method. +// ServiceTagInformationClientListOptions contains the optional parameters for the ServiceTagInformationClient.NewListPager +// method. type ServiceTagInformationClientListOptions struct { // Do not return address prefixes for the tag(s). NoAddressPrefixes *bool @@ -13599,7 +13617,7 @@ type StaticMembersClientGetOptions struct { // placeholder for future optional parameters } -// StaticMembersClientListOptions contains the optional parameters for the StaticMembersClient.List method. +// StaticMembersClientListOptions contains the optional parameters for the StaticMembersClient.NewListPager method. type StaticMembersClientListOptions struct { // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, // the value of the nextLink element will include a skipToken parameter that @@ -13766,7 +13784,7 @@ type SubnetsClientGetOptions struct { Expand *string } -// SubnetsClientListOptions contains the optional parameters for the SubnetsClient.List method. +// SubnetsClientListOptions contains the optional parameters for the SubnetsClient.NewListPager method. type SubnetsClientListOptions struct { // placeholder for future optional parameters } @@ -13789,7 +13807,7 @@ type SubscriptionNetworkManagerConnectionsClientGetOptions struct { // placeholder for future optional parameters } -// SubscriptionNetworkManagerConnectionsClientListOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.List +// SubscriptionNetworkManagerConnectionsClientListOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.NewListPager // method. type SubscriptionNetworkManagerConnectionsClientListOptions struct { // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, @@ -13837,7 +13855,7 @@ type SystemData struct { // The type of identity that created the resource. CreatedByType *CreatedByType `json:"createdByType,omitempty"` - // The type of identity that last modified the resource. + // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` // The identity that last modified the resource. @@ -14057,7 +14075,7 @@ type UsageName struct { Value *string `json:"value,omitempty"` } -// UsagesClientListOptions contains the optional parameters for the UsagesClient.List method. +// UsagesClientListOptions contains the optional parameters for the UsagesClient.NewListPager method. type UsagesClientListOptions struct { // placeholder for future optional parameters } @@ -14415,7 +14433,7 @@ type VPNConnectionsClientGetOptions struct { // placeholder for future optional parameters } -// VPNConnectionsClientListByVPNGatewayOptions contains the optional parameters for the VPNConnectionsClient.ListByVPNGateway +// VPNConnectionsClientListByVPNGatewayOptions contains the optional parameters for the VPNConnectionsClient.NewListByVPNGatewayPager // method. type VPNConnectionsClientListByVPNGatewayOptions struct { // placeholder for future optional parameters @@ -14604,13 +14622,13 @@ type VPNGatewaysClientGetOptions struct { // placeholder for future optional parameters } -// VPNGatewaysClientListByResourceGroupOptions contains the optional parameters for the VPNGatewaysClient.ListByResourceGroup +// VPNGatewaysClientListByResourceGroupOptions contains the optional parameters for the VPNGatewaysClient.NewListByResourceGroupPager // method. type VPNGatewaysClientListByResourceGroupOptions struct { // placeholder for future optional parameters } -// VPNGatewaysClientListOptions contains the optional parameters for the VPNGatewaysClient.List method. +// VPNGatewaysClientListOptions contains the optional parameters for the VPNGatewaysClient.NewListPager method. type VPNGatewaysClientListOptions struct { // placeholder for future optional parameters } @@ -14638,7 +14656,7 @@ type VPNLinkConnectionsClientBeginResetConnectionOptions struct { ResumeToken string } -// VPNLinkConnectionsClientListByVPNConnectionOptions contains the optional parameters for the VPNLinkConnectionsClient.ListByVPNConnection +// VPNLinkConnectionsClientListByVPNConnectionOptions contains the optional parameters for the VPNLinkConnectionsClient.NewListByVPNConnectionPager // method. type VPNLinkConnectionsClientListByVPNConnectionOptions struct { // placeholder for future optional parameters @@ -14866,13 +14884,14 @@ type VPNServerConfigurationsClientGetOptions struct { // placeholder for future optional parameters } -// VPNServerConfigurationsClientListByResourceGroupOptions contains the optional parameters for the VPNServerConfigurationsClient.ListByResourceGroup +// VPNServerConfigurationsClientListByResourceGroupOptions contains the optional parameters for the VPNServerConfigurationsClient.NewListByResourceGroupPager // method. type VPNServerConfigurationsClientListByResourceGroupOptions struct { // placeholder for future optional parameters } -// VPNServerConfigurationsClientListOptions contains the optional parameters for the VPNServerConfigurationsClient.List method. +// VPNServerConfigurationsClientListOptions contains the optional parameters for the VPNServerConfigurationsClient.NewListPager +// method. type VPNServerConfigurationsClientListOptions struct { // placeholder for future optional parameters } @@ -15040,7 +15059,8 @@ type VPNSiteLinksClientGetOptions struct { // placeholder for future optional parameters } -// VPNSiteLinksClientListByVPNSiteOptions contains the optional parameters for the VPNSiteLinksClient.ListByVPNSite method. +// VPNSiteLinksClientListByVPNSiteOptions contains the optional parameters for the VPNSiteLinksClient.NewListByVPNSitePager +// method. type VPNSiteLinksClientListByVPNSiteOptions struct { // placeholder for future optional parameters } @@ -15095,12 +15115,13 @@ type VPNSitesClientGetOptions struct { // placeholder for future optional parameters } -// VPNSitesClientListByResourceGroupOptions contains the optional parameters for the VPNSitesClient.ListByResourceGroup method. +// VPNSitesClientListByResourceGroupOptions contains the optional parameters for the VPNSitesClient.NewListByResourceGroupPager +// method. type VPNSitesClientListByResourceGroupOptions struct { // placeholder for future optional parameters } -// VPNSitesClientListOptions contains the optional parameters for the VPNSitesClient.List method. +// VPNSitesClientListOptions contains the optional parameters for the VPNSitesClient.NewListPager method. type VPNSitesClientListOptions struct { // placeholder for future optional parameters } @@ -15339,7 +15360,8 @@ type VirtualApplianceSKUsClientGetOptions struct { // placeholder for future optional parameters } -// VirtualApplianceSKUsClientListOptions contains the optional parameters for the VirtualApplianceSKUsClient.List method. +// VirtualApplianceSKUsClientListOptions contains the optional parameters for the VirtualApplianceSKUsClient.NewListPager +// method. type VirtualApplianceSKUsClientListOptions struct { // placeholder for future optional parameters } @@ -15402,7 +15424,8 @@ type VirtualApplianceSitesClientGetOptions struct { // placeholder for future optional parameters } -// VirtualApplianceSitesClientListOptions contains the optional parameters for the VirtualApplianceSitesClient.List method. +// VirtualApplianceSitesClientListOptions contains the optional parameters for the VirtualApplianceSitesClient.NewListPager +// method. type VirtualApplianceSitesClientListOptions struct { // placeholder for future optional parameters } @@ -15427,13 +15450,13 @@ type VirtualAppliancesClientGetOptions struct { Expand *string } -// VirtualAppliancesClientListByResourceGroupOptions contains the optional parameters for the VirtualAppliancesClient.ListByResourceGroup +// VirtualAppliancesClientListByResourceGroupOptions contains the optional parameters for the VirtualAppliancesClient.NewListByResourceGroupPager // method. type VirtualAppliancesClientListByResourceGroupOptions struct { // placeholder for future optional parameters } -// VirtualAppliancesClientListOptions contains the optional parameters for the VirtualAppliancesClient.List method. +// VirtualAppliancesClientListOptions contains the optional parameters for the VirtualAppliancesClient.NewListPager method. type VirtualAppliancesClientListOptions struct { // placeholder for future optional parameters } @@ -15503,7 +15526,7 @@ type VirtualHubBgpConnectionsClientBeginListLearnedRoutesOptions struct { ResumeToken string } -// VirtualHubBgpConnectionsClientListOptions contains the optional parameters for the VirtualHubBgpConnectionsClient.List +// VirtualHubBgpConnectionsClientListOptions contains the optional parameters for the VirtualHubBgpConnectionsClient.NewListPager // method. type VirtualHubBgpConnectionsClientListOptions struct { // placeholder for future optional parameters @@ -15560,7 +15583,7 @@ type VirtualHubIPConfigurationClientGetOptions struct { // placeholder for future optional parameters } -// VirtualHubIPConfigurationClientListOptions contains the optional parameters for the VirtualHubIPConfigurationClient.List +// VirtualHubIPConfigurationClientListOptions contains the optional parameters for the VirtualHubIPConfigurationClient.NewListPager // method. type VirtualHubIPConfigurationClientListOptions struct { // placeholder for future optional parameters @@ -15696,7 +15719,8 @@ type VirtualHubRouteTableV2SClientGetOptions struct { // placeholder for future optional parameters } -// VirtualHubRouteTableV2SClientListOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.List method. +// VirtualHubRouteTableV2SClientListOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.NewListPager +// method. type VirtualHubRouteTableV2SClientListOptions struct { // placeholder for future optional parameters } @@ -15757,13 +15781,13 @@ type VirtualHubsClientGetOptions struct { // placeholder for future optional parameters } -// VirtualHubsClientListByResourceGroupOptions contains the optional parameters for the VirtualHubsClient.ListByResourceGroup +// VirtualHubsClientListByResourceGroupOptions contains the optional parameters for the VirtualHubsClient.NewListByResourceGroupPager // method. type VirtualHubsClientListByResourceGroupOptions struct { // placeholder for future optional parameters } -// VirtualHubsClientListOptions contains the optional parameters for the VirtualHubsClient.List method. +// VirtualHubsClientListOptions contains the optional parameters for the VirtualHubsClient.NewListPager method. type VirtualHubsClientListOptions struct { // placeholder for future optional parameters } @@ -16154,7 +16178,7 @@ type VirtualNetworkGatewayConnectionsClientGetSharedKeyOptions struct { // placeholder for future optional parameters } -// VirtualNetworkGatewayConnectionsClientListOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.List +// VirtualNetworkGatewayConnectionsClientListOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.NewListPager // method. type VirtualNetworkGatewayConnectionsClientListOptions struct { // placeholder for future optional parameters @@ -16270,7 +16294,7 @@ type VirtualNetworkGatewayNatRulesClientGetOptions struct { // placeholder for future optional parameters } -// VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.ListByVirtualNetworkGateway +// VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.NewListByVirtualNetworkGatewayPager // method. type VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayOptions struct { // placeholder for future optional parameters @@ -16539,13 +16563,14 @@ type VirtualNetworkGatewaysClientGetOptions struct { // placeholder for future optional parameters } -// VirtualNetworkGatewaysClientListConnectionsOptions contains the optional parameters for the VirtualNetworkGatewaysClient.ListConnections +// VirtualNetworkGatewaysClientListConnectionsOptions contains the optional parameters for the VirtualNetworkGatewaysClient.NewListConnectionsPager // method. type VirtualNetworkGatewaysClientListConnectionsOptions struct { // placeholder for future optional parameters } -// VirtualNetworkGatewaysClientListOptions contains the optional parameters for the VirtualNetworkGatewaysClient.List method. +// VirtualNetworkGatewaysClientListOptions contains the optional parameters for the VirtualNetworkGatewaysClient.NewListPager +// method. type VirtualNetworkGatewaysClientListOptions struct { // placeholder for future optional parameters } @@ -16679,7 +16704,8 @@ type VirtualNetworkPeeringsClientGetOptions struct { // placeholder for future optional parameters } -// VirtualNetworkPeeringsClientListOptions contains the optional parameters for the VirtualNetworkPeeringsClient.List method. +// VirtualNetworkPeeringsClientListOptions contains the optional parameters for the VirtualNetworkPeeringsClient.NewListPager +// method. type VirtualNetworkPeeringsClientListOptions struct { // placeholder for future optional parameters } @@ -16800,12 +16826,13 @@ type VirtualNetworkTapsClientGetOptions struct { // placeholder for future optional parameters } -// VirtualNetworkTapsClientListAllOptions contains the optional parameters for the VirtualNetworkTapsClient.ListAll method. +// VirtualNetworkTapsClientListAllOptions contains the optional parameters for the VirtualNetworkTapsClient.NewListAllPager +// method. type VirtualNetworkTapsClientListAllOptions struct { // placeholder for future optional parameters } -// VirtualNetworkTapsClientListByResourceGroupOptions contains the optional parameters for the VirtualNetworkTapsClient.ListByResourceGroup +// VirtualNetworkTapsClientListByResourceGroupOptions contains the optional parameters for the VirtualNetworkTapsClient.NewListByResourceGroupPager // method. type VirtualNetworkTapsClientListByResourceGroupOptions struct { // placeholder for future optional parameters @@ -16880,17 +16907,18 @@ type VirtualNetworksClientGetOptions struct { Expand *string } -// VirtualNetworksClientListAllOptions contains the optional parameters for the VirtualNetworksClient.ListAll method. +// VirtualNetworksClientListAllOptions contains the optional parameters for the VirtualNetworksClient.NewListAllPager method. type VirtualNetworksClientListAllOptions struct { // placeholder for future optional parameters } -// VirtualNetworksClientListOptions contains the optional parameters for the VirtualNetworksClient.List method. +// VirtualNetworksClientListOptions contains the optional parameters for the VirtualNetworksClient.NewListPager method. type VirtualNetworksClientListOptions struct { // placeholder for future optional parameters } -// VirtualNetworksClientListUsageOptions contains the optional parameters for the VirtualNetworksClient.ListUsage method. +// VirtualNetworksClientListUsageOptions contains the optional parameters for the VirtualNetworksClient.NewListUsagePager +// method. type VirtualNetworksClientListUsageOptions struct { // placeholder for future optional parameters } @@ -16997,7 +17025,8 @@ type VirtualRouterPeeringsClientGetOptions struct { // placeholder for future optional parameters } -// VirtualRouterPeeringsClientListOptions contains the optional parameters for the VirtualRouterPeeringsClient.List method. +// VirtualRouterPeeringsClientListOptions contains the optional parameters for the VirtualRouterPeeringsClient.NewListPager +// method. type VirtualRouterPeeringsClientListOptions struct { // placeholder for future optional parameters } @@ -17042,13 +17071,13 @@ type VirtualRoutersClientGetOptions struct { Expand *string } -// VirtualRoutersClientListByResourceGroupOptions contains the optional parameters for the VirtualRoutersClient.ListByResourceGroup +// VirtualRoutersClientListByResourceGroupOptions contains the optional parameters for the VirtualRoutersClient.NewListByResourceGroupPager // method. type VirtualRoutersClientListByResourceGroupOptions struct { // placeholder for future optional parameters } -// VirtualRoutersClientListOptions contains the optional parameters for the VirtualRoutersClient.List method. +// VirtualRoutersClientListOptions contains the optional parameters for the VirtualRoutersClient.NewListPager method. type VirtualRoutersClientListOptions struct { // placeholder for future optional parameters } @@ -17149,13 +17178,13 @@ type VirtualWansClientGetOptions struct { // placeholder for future optional parameters } -// VirtualWansClientListByResourceGroupOptions contains the optional parameters for the VirtualWansClient.ListByResourceGroup +// VirtualWansClientListByResourceGroupOptions contains the optional parameters for the VirtualWansClient.NewListByResourceGroupPager // method. type VirtualWansClientListByResourceGroupOptions struct { // placeholder for future optional parameters } -// VirtualWansClientListOptions contains the optional parameters for the VirtualWansClient.List method. +// VirtualWansClientListOptions contains the optional parameters for the VirtualWansClient.NewListPager method. type VirtualWansClientListOptions struct { // placeholder for future optional parameters } @@ -17336,12 +17365,12 @@ type WatchersClientGetTopologyOptions struct { // placeholder for future optional parameters } -// WatchersClientListAllOptions contains the optional parameters for the WatchersClient.ListAll method. +// WatchersClientListAllOptions contains the optional parameters for the WatchersClient.NewListAllPager method. type WatchersClientListAllOptions struct { // placeholder for future optional parameters } -// WatchersClientListOptions contains the optional parameters for the WatchersClient.List method. +// WatchersClientListOptions contains the optional parameters for the WatchersClient.NewListPager method. type WatchersClientListOptions struct { // placeholder for future optional parameters } @@ -17391,13 +17420,13 @@ type WebApplicationFirewallPoliciesClientGetOptions struct { // placeholder for future optional parameters } -// WebApplicationFirewallPoliciesClientListAllOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.ListAll +// WebApplicationFirewallPoliciesClientListAllOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.NewListAllPager // method. type WebApplicationFirewallPoliciesClientListAllOptions struct { // placeholder for future optional parameters } -// WebApplicationFirewallPoliciesClientListOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.List +// WebApplicationFirewallPoliciesClientListOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.NewListPager // method. type WebApplicationFirewallPoliciesClientListOptions struct { // placeholder for future optional parameters @@ -17470,7 +17499,7 @@ type WebCategoriesClientGetOptions struct { Expand *string } -// WebCategoriesClientListBySubscriptionOptions contains the optional parameters for the WebCategoriesClient.ListBySubscription +// WebCategoriesClientListBySubscriptionOptions contains the optional parameters for the WebCategoriesClient.NewListBySubscriptionPager // method. type WebCategoriesClientListBySubscriptionOptions struct { // placeholder for future optional parameters diff --git a/sdk/resourcemanager/network/armnetwork/models_serde.go b/sdk/resourcemanager/network/armnetwork/models_serde.go index 8e726a29fec9..87bfba0feaed 100644 --- a/sdk/resourcemanager/network/armnetwork/models_serde.go +++ b/sdk/resourcemanager/network/armnetwork/models_serde.go @@ -18,7 +18,7 @@ import ( // MarshalJSON implements the json.Marshaller interface for type AADAuthenticationParameters. func (a AADAuthenticationParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "aadAudience", a.AADAudience) populate(objectMap, "aadIssuer", a.AADIssuer) populate(objectMap, "aadTenant", a.AADTenant) @@ -53,7 +53,7 @@ func (a *AADAuthenticationParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Action. func (a Action) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "parameters", a.Parameters) populate(objectMap, "type", a.Type) return json.Marshal(objectMap) @@ -84,7 +84,7 @@ func (a *Action) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ActiveBaseSecurityAdminRule. func (a ActiveBaseSecurityAdminRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populateTimeRFC3339(objectMap, "commitTime", a.CommitTime) populate(objectMap, "configurationDescription", a.ConfigurationDescription) populate(objectMap, "id", a.ID) @@ -139,7 +139,7 @@ func (a *ActiveBaseSecurityAdminRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ActiveConfigurationParameter. func (a ActiveConfigurationParameter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "regions", a.Regions) populate(objectMap, "skipToken", a.SkipToken) return json.Marshal(objectMap) @@ -170,7 +170,7 @@ func (a *ActiveConfigurationParameter) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ActiveConnectivityConfiguration. func (a ActiveConnectivityConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populateTimeRFC3339(objectMap, "commitTime", a.CommitTime) populate(objectMap, "configurationGroups", a.ConfigurationGroups) populate(objectMap, "id", a.ID) @@ -213,7 +213,7 @@ func (a *ActiveConnectivityConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ActiveConnectivityConfigurationsListResult. func (a ActiveConnectivityConfigurationsListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "skipToken", a.SkipToken) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) @@ -244,7 +244,7 @@ func (a *ActiveConnectivityConfigurationsListResult) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type ActiveDefaultSecurityAdminRule. func (a ActiveDefaultSecurityAdminRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populateTimeRFC3339(objectMap, "commitTime", a.CommitTime) populate(objectMap, "configurationDescription", a.ConfigurationDescription) populate(objectMap, "id", a.ID) @@ -303,7 +303,7 @@ func (a *ActiveDefaultSecurityAdminRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ActiveSecurityAdminRule. func (a ActiveSecurityAdminRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populateTimeRFC3339(objectMap, "commitTime", a.CommitTime) populate(objectMap, "configurationDescription", a.ConfigurationDescription) populate(objectMap, "id", a.ID) @@ -362,7 +362,7 @@ func (a *ActiveSecurityAdminRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ActiveSecurityAdminRulesListResult. func (a ActiveSecurityAdminRulesListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "skipToken", a.SkipToken) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) @@ -393,7 +393,7 @@ func (a *ActiveSecurityAdminRulesListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AddressPrefixItem. func (a AddressPrefixItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "addressPrefix", a.AddressPrefix) populate(objectMap, "addressPrefixType", a.AddressPrefixType) return json.Marshal(objectMap) @@ -424,7 +424,7 @@ func (a *AddressPrefixItem) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AddressSpace. func (a AddressSpace) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "addressPrefixes", a.AddressPrefixes) return json.Marshal(objectMap) } @@ -451,7 +451,7 @@ func (a *AddressSpace) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AdminPropertiesFormat. func (a AdminPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "access", a.Access) populate(objectMap, "description", a.Description) populate(objectMap, "destinationPortRanges", a.DestinationPortRanges) @@ -514,7 +514,7 @@ func (a *AdminPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AdminRule. func (a AdminRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) objectMap["kind"] = AdminRuleKindCustom @@ -565,7 +565,7 @@ func (a *AdminRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AdminRuleCollection. func (a AdminRuleCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -612,7 +612,7 @@ func (a *AdminRuleCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AdminRuleCollectionListResult. func (a AdminRuleCollectionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", a.NextLink) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) @@ -643,7 +643,7 @@ func (a *AdminRuleCollectionListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AdminRuleCollectionPropertiesFormat. func (a AdminRuleCollectionPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "appliesToGroups", a.AppliesToGroups) populate(objectMap, "description", a.Description) populate(objectMap, "provisioningState", a.ProvisioningState) @@ -678,7 +678,7 @@ func (a *AdminRuleCollectionPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AdminRuleListResult. func (a AdminRuleListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", a.NextLink) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) @@ -709,7 +709,7 @@ func (a *AdminRuleListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationGateway. func (a ApplicationGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "identity", a.Identity) @@ -768,7 +768,7 @@ func (a *ApplicationGateway) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayAuthenticationCertificate. func (a ApplicationGatewayAuthenticationCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -811,7 +811,7 @@ func (a *ApplicationGatewayAuthenticationCertificate) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayAuthenticationCertificatePropertiesFormat. func (a ApplicationGatewayAuthenticationCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "data", a.Data) populate(objectMap, "provisioningState", a.ProvisioningState) return json.Marshal(objectMap) @@ -842,7 +842,7 @@ func (a *ApplicationGatewayAuthenticationCertificatePropertiesFormat) UnmarshalJ // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayAutoscaleConfiguration. func (a ApplicationGatewayAutoscaleConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "maxCapacity", a.MaxCapacity) populate(objectMap, "minCapacity", a.MinCapacity) return json.Marshal(objectMap) @@ -873,7 +873,7 @@ func (a *ApplicationGatewayAutoscaleConfiguration) UnmarshalJSON(data []byte) er // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayAvailableSSLOptions. func (a ApplicationGatewayAvailableSSLOptions) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", a.ID) populate(objectMap, "location", a.Location) populate(objectMap, "name", a.Name) @@ -920,7 +920,7 @@ func (a *ApplicationGatewayAvailableSSLOptions) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayAvailableSSLOptionsPropertiesFormat. func (a ApplicationGatewayAvailableSSLOptionsPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "availableCipherSuites", a.AvailableCipherSuites) populate(objectMap, "availableProtocols", a.AvailableProtocols) populate(objectMap, "defaultPolicy", a.DefaultPolicy) @@ -959,7 +959,7 @@ func (a *ApplicationGatewayAvailableSSLOptionsPropertiesFormat) UnmarshalJSON(da // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayAvailableSSLPredefinedPolicies. func (a ApplicationGatewayAvailableSSLPredefinedPolicies) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", a.NextLink) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) @@ -990,7 +990,7 @@ func (a *ApplicationGatewayAvailableSSLPredefinedPolicies) UnmarshalJSON(data [] // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayAvailableWafRuleSetsResult. func (a ApplicationGatewayAvailableWafRuleSetsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) } @@ -1017,7 +1017,7 @@ func (a *ApplicationGatewayAvailableWafRuleSetsResult) UnmarshalJSON(data []byte // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendAddress. func (a ApplicationGatewayBackendAddress) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "fqdn", a.Fqdn) populate(objectMap, "ipAddress", a.IPAddress) return json.Marshal(objectMap) @@ -1048,7 +1048,7 @@ func (a *ApplicationGatewayBackendAddress) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendAddressPool. func (a ApplicationGatewayBackendAddressPool) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -1091,7 +1091,7 @@ func (a *ApplicationGatewayBackendAddressPool) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendAddressPoolPropertiesFormat. func (a ApplicationGatewayBackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "backendAddresses", a.BackendAddresses) populate(objectMap, "backendIPConfigurations", a.BackendIPConfigurations) populate(objectMap, "provisioningState", a.ProvisioningState) @@ -1126,7 +1126,7 @@ func (a *ApplicationGatewayBackendAddressPoolPropertiesFormat) UnmarshalJSON(dat // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendHTTPSettings. func (a ApplicationGatewayBackendHTTPSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -1169,7 +1169,7 @@ func (a *ApplicationGatewayBackendHTTPSettings) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendHTTPSettingsPropertiesFormat. func (a ApplicationGatewayBackendHTTPSettingsPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "affinityCookieName", a.AffinityCookieName) populate(objectMap, "authenticationCertificates", a.AuthenticationCertificates) populate(objectMap, "connectionDraining", a.ConnectionDraining) @@ -1248,7 +1248,7 @@ func (a *ApplicationGatewayBackendHTTPSettingsPropertiesFormat) UnmarshalJSON(da // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendHealth. func (a ApplicationGatewayBackendHealth) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "backendAddressPools", a.BackendAddressPools) return json.Marshal(objectMap) } @@ -1275,7 +1275,7 @@ func (a *ApplicationGatewayBackendHealth) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendHealthHTTPSettings. func (a ApplicationGatewayBackendHealthHTTPSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "backendHttpSettings", a.BackendHTTPSettings) populate(objectMap, "servers", a.Servers) return json.Marshal(objectMap) @@ -1306,7 +1306,7 @@ func (a *ApplicationGatewayBackendHealthHTTPSettings) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendHealthOnDemand. func (a ApplicationGatewayBackendHealthOnDemand) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "backendAddressPool", a.BackendAddressPool) populate(objectMap, "backendHealthHttpSettings", a.BackendHealthHTTPSettings) return json.Marshal(objectMap) @@ -1337,7 +1337,7 @@ func (a *ApplicationGatewayBackendHealthOnDemand) UnmarshalJSON(data []byte) err // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendHealthPool. func (a ApplicationGatewayBackendHealthPool) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "backendAddressPool", a.BackendAddressPool) populate(objectMap, "backendHttpSettingsCollection", a.BackendHTTPSettingsCollection) return json.Marshal(objectMap) @@ -1368,7 +1368,7 @@ func (a *ApplicationGatewayBackendHealthPool) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendHealthServer. func (a ApplicationGatewayBackendHealthServer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "address", a.Address) populate(objectMap, "health", a.Health) populate(objectMap, "healthProbeLog", a.HealthProbeLog) @@ -1407,7 +1407,7 @@ func (a *ApplicationGatewayBackendHealthServer) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendSettings. func (a ApplicationGatewayBackendSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -1450,7 +1450,7 @@ func (a *ApplicationGatewayBackendSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendSettingsPropertiesFormat. func (a ApplicationGatewayBackendSettingsPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "hostName", a.HostName) populate(objectMap, "pickHostNameFromBackendAddress", a.PickHostNameFromBackendAddress) populate(objectMap, "port", a.Port) @@ -1505,7 +1505,7 @@ func (a *ApplicationGatewayBackendSettingsPropertiesFormat) UnmarshalJSON(data [ // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayClientAuthConfiguration. func (a ApplicationGatewayClientAuthConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "verifyClientCertIssuerDN", a.VerifyClientCertIssuerDN) populate(objectMap, "verifyClientRevocation", a.VerifyClientRevocation) return json.Marshal(objectMap) @@ -1536,7 +1536,7 @@ func (a *ApplicationGatewayClientAuthConfiguration) UnmarshalJSON(data []byte) e // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayConnectionDraining. func (a ApplicationGatewayConnectionDraining) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "drainTimeoutInSec", a.DrainTimeoutInSec) populate(objectMap, "enabled", a.Enabled) return json.Marshal(objectMap) @@ -1567,7 +1567,7 @@ func (a *ApplicationGatewayConnectionDraining) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayCustomError. func (a ApplicationGatewayCustomError) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "customErrorPageUrl", a.CustomErrorPageURL) populate(objectMap, "statusCode", a.StatusCode) return json.Marshal(objectMap) @@ -1598,7 +1598,7 @@ func (a *ApplicationGatewayCustomError) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFirewallDisabledRuleGroup. func (a ApplicationGatewayFirewallDisabledRuleGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "ruleGroupName", a.RuleGroupName) populate(objectMap, "rules", a.Rules) return json.Marshal(objectMap) @@ -1629,7 +1629,7 @@ func (a *ApplicationGatewayFirewallDisabledRuleGroup) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFirewallExclusion. func (a ApplicationGatewayFirewallExclusion) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "matchVariable", a.MatchVariable) populate(objectMap, "selector", a.Selector) populate(objectMap, "selectorMatchOperator", a.SelectorMatchOperator) @@ -1664,7 +1664,7 @@ func (a *ApplicationGatewayFirewallExclusion) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFirewallManifestRuleSet. func (a ApplicationGatewayFirewallManifestRuleSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "ruleGroups", a.RuleGroups) populate(objectMap, "ruleSetType", a.RuleSetType) populate(objectMap, "ruleSetVersion", a.RuleSetVersion) @@ -1707,7 +1707,7 @@ func (a *ApplicationGatewayFirewallManifestRuleSet) UnmarshalJSON(data []byte) e // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFirewallRule. func (a ApplicationGatewayFirewallRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "action", a.Action) populate(objectMap, "description", a.Description) populate(objectMap, "ruleId", a.RuleID) @@ -1750,7 +1750,7 @@ func (a *ApplicationGatewayFirewallRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFirewallRuleGroup. func (a ApplicationGatewayFirewallRuleGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", a.Description) populate(objectMap, "ruleGroupName", a.RuleGroupName) populate(objectMap, "rules", a.Rules) @@ -1785,7 +1785,7 @@ func (a *ApplicationGatewayFirewallRuleGroup) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFirewallRuleSet. func (a ApplicationGatewayFirewallRuleSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", a.ID) populate(objectMap, "location", a.Location) populate(objectMap, "name", a.Name) @@ -1832,7 +1832,7 @@ func (a *ApplicationGatewayFirewallRuleSet) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFirewallRuleSetPropertiesFormat. func (a ApplicationGatewayFirewallRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "provisioningState", a.ProvisioningState) populate(objectMap, "ruleGroups", a.RuleGroups) populate(objectMap, "ruleSetType", a.RuleSetType) @@ -1875,7 +1875,7 @@ func (a *ApplicationGatewayFirewallRuleSetPropertiesFormat) UnmarshalJSON(data [ // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFrontendIPConfiguration. func (a ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -1918,7 +1918,7 @@ func (a *ApplicationGatewayFrontendIPConfiguration) UnmarshalJSON(data []byte) e // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFrontendIPConfigurationPropertiesFormat. func (a ApplicationGatewayFrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "privateIPAddress", a.PrivateIPAddress) populate(objectMap, "privateIPAllocationMethod", a.PrivateIPAllocationMethod) populate(objectMap, "privateLinkConfiguration", a.PrivateLinkConfiguration) @@ -1965,7 +1965,7 @@ func (a *ApplicationGatewayFrontendIPConfigurationPropertiesFormat) UnmarshalJSO // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFrontendPort. func (a ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -2008,7 +2008,7 @@ func (a *ApplicationGatewayFrontendPort) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFrontendPortPropertiesFormat. func (a ApplicationGatewayFrontendPortPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "port", a.Port) populate(objectMap, "provisioningState", a.ProvisioningState) return json.Marshal(objectMap) @@ -2039,7 +2039,7 @@ func (a *ApplicationGatewayFrontendPortPropertiesFormat) UnmarshalJSON(data []by // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayGlobalConfiguration. func (a ApplicationGatewayGlobalConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "enableRequestBuffering", a.EnableRequestBuffering) populate(objectMap, "enableResponseBuffering", a.EnableResponseBuffering) return json.Marshal(objectMap) @@ -2070,7 +2070,7 @@ func (a *ApplicationGatewayGlobalConfiguration) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayHTTPListener. func (a ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -2113,7 +2113,7 @@ func (a *ApplicationGatewayHTTPListener) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayHTTPListenerPropertiesFormat. func (a ApplicationGatewayHTTPListenerPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "customErrorConfigurations", a.CustomErrorConfigurations) populate(objectMap, "firewallPolicy", a.FirewallPolicy) populate(objectMap, "frontendIPConfiguration", a.FrontendIPConfiguration) @@ -2180,7 +2180,7 @@ func (a *ApplicationGatewayHTTPListenerPropertiesFormat) UnmarshalJSON(data []by // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayHeaderConfiguration. func (a ApplicationGatewayHeaderConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "headerName", a.HeaderName) populate(objectMap, "headerValue", a.HeaderValue) return json.Marshal(objectMap) @@ -2211,7 +2211,7 @@ func (a *ApplicationGatewayHeaderConfiguration) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayIPConfiguration. func (a ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -2254,7 +2254,7 @@ func (a *ApplicationGatewayIPConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayIPConfigurationPropertiesFormat. func (a ApplicationGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "provisioningState", a.ProvisioningState) populate(objectMap, "subnet", a.Subnet) return json.Marshal(objectMap) @@ -2285,7 +2285,7 @@ func (a *ApplicationGatewayIPConfigurationPropertiesFormat) UnmarshalJSON(data [ // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayListResult. func (a ApplicationGatewayListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", a.NextLink) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) @@ -2316,7 +2316,7 @@ func (a *ApplicationGatewayListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayListener. func (a ApplicationGatewayListener) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -2359,7 +2359,7 @@ func (a *ApplicationGatewayListener) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayListenerPropertiesFormat. func (a ApplicationGatewayListenerPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "frontendIPConfiguration", a.FrontendIPConfiguration) populate(objectMap, "frontendPort", a.FrontendPort) populate(objectMap, "protocol", a.Protocol) @@ -2406,7 +2406,7 @@ func (a *ApplicationGatewayListenerPropertiesFormat) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayLoadDistributionPolicy. func (a ApplicationGatewayLoadDistributionPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -2449,7 +2449,7 @@ func (a *ApplicationGatewayLoadDistributionPolicy) UnmarshalJSON(data []byte) er // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayLoadDistributionPolicyPropertiesFormat. func (a ApplicationGatewayLoadDistributionPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "loadDistributionAlgorithm", a.LoadDistributionAlgorithm) populate(objectMap, "loadDistributionTargets", a.LoadDistributionTargets) populate(objectMap, "provisioningState", a.ProvisioningState) @@ -2484,7 +2484,7 @@ func (a *ApplicationGatewayLoadDistributionPolicyPropertiesFormat) UnmarshalJSON // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayLoadDistributionTarget. func (a ApplicationGatewayLoadDistributionTarget) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -2527,7 +2527,7 @@ func (a *ApplicationGatewayLoadDistributionTarget) UnmarshalJSON(data []byte) er // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayLoadDistributionTargetPropertiesFormat. func (a ApplicationGatewayLoadDistributionTargetPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "backendAddressPool", a.BackendAddressPool) populate(objectMap, "weightPerServer", a.WeightPerServer) return json.Marshal(objectMap) @@ -2558,7 +2558,7 @@ func (a *ApplicationGatewayLoadDistributionTargetPropertiesFormat) UnmarshalJSON // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayOnDemandProbe. func (a ApplicationGatewayOnDemandProbe) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "backendAddressPool", a.BackendAddressPool) populate(objectMap, "backendHttpSettings", a.BackendHTTPSettings) populate(objectMap, "host", a.Host) @@ -2613,7 +2613,7 @@ func (a *ApplicationGatewayOnDemandProbe) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPathRule. func (a ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -2656,7 +2656,7 @@ func (a *ApplicationGatewayPathRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPathRulePropertiesFormat. func (a ApplicationGatewayPathRulePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "backendAddressPool", a.BackendAddressPool) populate(objectMap, "backendHttpSettings", a.BackendHTTPSettings) populate(objectMap, "firewallPolicy", a.FirewallPolicy) @@ -2711,7 +2711,7 @@ func (a *ApplicationGatewayPathRulePropertiesFormat) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateEndpointConnection. func (a ApplicationGatewayPrivateEndpointConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -2754,7 +2754,7 @@ func (a *ApplicationGatewayPrivateEndpointConnection) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateEndpointConnectionListResult. func (a ApplicationGatewayPrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", a.NextLink) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) @@ -2785,7 +2785,7 @@ func (a *ApplicationGatewayPrivateEndpointConnectionListResult) UnmarshalJSON(da // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateEndpointConnectionProperties. func (a ApplicationGatewayPrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "linkIdentifier", a.LinkIdentifier) populate(objectMap, "privateEndpoint", a.PrivateEndpoint) populate(objectMap, "privateLinkServiceConnectionState", a.PrivateLinkServiceConnectionState) @@ -2824,7 +2824,7 @@ func (a *ApplicationGatewayPrivateEndpointConnectionProperties) UnmarshalJSON(da // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateLinkConfiguration. func (a ApplicationGatewayPrivateLinkConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -2867,7 +2867,7 @@ func (a *ApplicationGatewayPrivateLinkConfiguration) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateLinkConfigurationProperties. func (a ApplicationGatewayPrivateLinkConfigurationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "ipConfigurations", a.IPConfigurations) populate(objectMap, "provisioningState", a.ProvisioningState) return json.Marshal(objectMap) @@ -2898,7 +2898,7 @@ func (a *ApplicationGatewayPrivateLinkConfigurationProperties) UnmarshalJSON(dat // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateLinkIPConfiguration. func (a ApplicationGatewayPrivateLinkIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -2941,7 +2941,7 @@ func (a *ApplicationGatewayPrivateLinkIPConfiguration) UnmarshalJSON(data []byte // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateLinkIPConfigurationProperties. func (a ApplicationGatewayPrivateLinkIPConfigurationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "primary", a.Primary) populate(objectMap, "privateIPAddress", a.PrivateIPAddress) populate(objectMap, "privateIPAllocationMethod", a.PrivateIPAllocationMethod) @@ -2984,7 +2984,7 @@ func (a *ApplicationGatewayPrivateLinkIPConfigurationProperties) UnmarshalJSON(d // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateLinkResource. func (a ApplicationGatewayPrivateLinkResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -3027,7 +3027,7 @@ func (a *ApplicationGatewayPrivateLinkResource) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateLinkResourceListResult. func (a ApplicationGatewayPrivateLinkResourceListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", a.NextLink) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) @@ -3058,7 +3058,7 @@ func (a *ApplicationGatewayPrivateLinkResourceListResult) UnmarshalJSON(data []b // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateLinkResourceProperties. func (a ApplicationGatewayPrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "groupId", a.GroupID) populate(objectMap, "requiredMembers", a.RequiredMembers) populate(objectMap, "requiredZoneNames", a.RequiredZoneNames) @@ -3093,7 +3093,7 @@ func (a *ApplicationGatewayPrivateLinkResourceProperties) UnmarshalJSON(data []b // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayProbe. func (a ApplicationGatewayProbe) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -3136,7 +3136,7 @@ func (a *ApplicationGatewayProbe) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayProbeHealthResponseMatch. func (a ApplicationGatewayProbeHealthResponseMatch) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "body", a.Body) populate(objectMap, "statusCodes", a.StatusCodes) return json.Marshal(objectMap) @@ -3167,7 +3167,7 @@ func (a *ApplicationGatewayProbeHealthResponseMatch) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayProbePropertiesFormat. func (a ApplicationGatewayProbePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "host", a.Host) populate(objectMap, "interval", a.Interval) populate(objectMap, "match", a.Match) @@ -3238,7 +3238,7 @@ func (a *ApplicationGatewayProbePropertiesFormat) UnmarshalJSON(data []byte) err // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPropertiesFormat. func (a ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "authenticationCertificates", a.AuthenticationCertificates) populate(objectMap, "autoscaleConfiguration", a.AutoscaleConfiguration) populate(objectMap, "backendAddressPools", a.BackendAddressPools) @@ -3401,7 +3401,7 @@ func (a *ApplicationGatewayPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRedirectConfiguration. func (a ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -3444,7 +3444,7 @@ func (a *ApplicationGatewayRedirectConfiguration) UnmarshalJSON(data []byte) err // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRedirectConfigurationPropertiesFormat. func (a ApplicationGatewayRedirectConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "includePath", a.IncludePath) populate(objectMap, "includeQueryString", a.IncludeQueryString) populate(objectMap, "pathRules", a.PathRules) @@ -3499,7 +3499,7 @@ func (a *ApplicationGatewayRedirectConfigurationPropertiesFormat) UnmarshalJSON( // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRequestRoutingRule. func (a ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -3542,7 +3542,7 @@ func (a *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRequestRoutingRulePropertiesFormat. func (a ApplicationGatewayRequestRoutingRulePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "backendAddressPool", a.BackendAddressPool) populate(objectMap, "backendHttpSettings", a.BackendHTTPSettings) populate(objectMap, "httpListener", a.HTTPListener) @@ -3605,7 +3605,7 @@ func (a *ApplicationGatewayRequestRoutingRulePropertiesFormat) UnmarshalJSON(dat // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRewriteRule. func (a ApplicationGatewayRewriteRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "actionSet", a.ActionSet) populate(objectMap, "conditions", a.Conditions) populate(objectMap, "name", a.Name) @@ -3644,7 +3644,7 @@ func (a *ApplicationGatewayRewriteRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRewriteRuleActionSet. func (a ApplicationGatewayRewriteRuleActionSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "requestHeaderConfigurations", a.RequestHeaderConfigurations) populate(objectMap, "responseHeaderConfigurations", a.ResponseHeaderConfigurations) populate(objectMap, "urlConfiguration", a.URLConfiguration) @@ -3679,7 +3679,7 @@ func (a *ApplicationGatewayRewriteRuleActionSet) UnmarshalJSON(data []byte) erro // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRewriteRuleCondition. func (a ApplicationGatewayRewriteRuleCondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "ignoreCase", a.IgnoreCase) populate(objectMap, "negate", a.Negate) populate(objectMap, "pattern", a.Pattern) @@ -3718,7 +3718,7 @@ func (a *ApplicationGatewayRewriteRuleCondition) UnmarshalJSON(data []byte) erro // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRewriteRuleSet. func (a ApplicationGatewayRewriteRuleSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -3757,7 +3757,7 @@ func (a *ApplicationGatewayRewriteRuleSet) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRewriteRuleSetPropertiesFormat. func (a ApplicationGatewayRewriteRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "provisioningState", a.ProvisioningState) populate(objectMap, "rewriteRules", a.RewriteRules) return json.Marshal(objectMap) @@ -3788,7 +3788,7 @@ func (a *ApplicationGatewayRewriteRuleSetPropertiesFormat) UnmarshalJSON(data [] // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRoutingRule. func (a ApplicationGatewayRoutingRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -3831,7 +3831,7 @@ func (a *ApplicationGatewayRoutingRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRoutingRulePropertiesFormat. func (a ApplicationGatewayRoutingRulePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "backendAddressPool", a.BackendAddressPool) populate(objectMap, "backendSettings", a.BackendSettings) populate(objectMap, "listener", a.Listener) @@ -3878,7 +3878,7 @@ func (a *ApplicationGatewayRoutingRulePropertiesFormat) UnmarshalJSON(data []byt // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewaySKU. func (a ApplicationGatewaySKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "capacity", a.Capacity) populate(objectMap, "name", a.Name) populate(objectMap, "tier", a.Tier) @@ -3913,7 +3913,7 @@ func (a *ApplicationGatewaySKU) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewaySSLCertificate. func (a ApplicationGatewaySSLCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -3956,7 +3956,7 @@ func (a *ApplicationGatewaySSLCertificate) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewaySSLCertificatePropertiesFormat. func (a ApplicationGatewaySSLCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "data", a.Data) populate(objectMap, "keyVaultSecretId", a.KeyVaultSecretID) populate(objectMap, "password", a.Password) @@ -3999,7 +3999,7 @@ func (a *ApplicationGatewaySSLCertificatePropertiesFormat) UnmarshalJSON(data [] // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewaySSLPolicy. func (a ApplicationGatewaySSLPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "cipherSuites", a.CipherSuites) populate(objectMap, "disabledSslProtocols", a.DisabledSSLProtocols) populate(objectMap, "minProtocolVersion", a.MinProtocolVersion) @@ -4042,7 +4042,7 @@ func (a *ApplicationGatewaySSLPolicy) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewaySSLPredefinedPolicy. func (a ApplicationGatewaySSLPredefinedPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) populate(objectMap, "properties", a.Properties) @@ -4077,7 +4077,7 @@ func (a *ApplicationGatewaySSLPredefinedPolicy) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewaySSLPredefinedPolicyPropertiesFormat. func (a ApplicationGatewaySSLPredefinedPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "cipherSuites", a.CipherSuites) populate(objectMap, "minProtocolVersion", a.MinProtocolVersion) return json.Marshal(objectMap) @@ -4108,7 +4108,7 @@ func (a *ApplicationGatewaySSLPredefinedPolicyPropertiesFormat) UnmarshalJSON(da // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewaySSLProfile. func (a ApplicationGatewaySSLProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -4151,7 +4151,7 @@ func (a *ApplicationGatewaySSLProfile) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewaySSLProfilePropertiesFormat. func (a ApplicationGatewaySSLProfilePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "clientAuthConfiguration", a.ClientAuthConfiguration) populate(objectMap, "provisioningState", a.ProvisioningState) populate(objectMap, "sslPolicy", a.SSLPolicy) @@ -4190,7 +4190,7 @@ func (a *ApplicationGatewaySSLProfilePropertiesFormat) UnmarshalJSON(data []byte // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayTrustedClientCertificate. func (a ApplicationGatewayTrustedClientCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -4233,7 +4233,7 @@ func (a *ApplicationGatewayTrustedClientCertificate) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayTrustedClientCertificatePropertiesFormat. func (a ApplicationGatewayTrustedClientCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "clientCertIssuerDN", a.ClientCertIssuerDN) populate(objectMap, "data", a.Data) populate(objectMap, "provisioningState", a.ProvisioningState) @@ -4272,7 +4272,7 @@ func (a *ApplicationGatewayTrustedClientCertificatePropertiesFormat) UnmarshalJS // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayTrustedRootCertificate. func (a ApplicationGatewayTrustedRootCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -4315,7 +4315,7 @@ func (a *ApplicationGatewayTrustedRootCertificate) UnmarshalJSON(data []byte) er // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayTrustedRootCertificatePropertiesFormat. func (a ApplicationGatewayTrustedRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "data", a.Data) populate(objectMap, "keyVaultSecretId", a.KeyVaultSecretID) populate(objectMap, "provisioningState", a.ProvisioningState) @@ -4350,7 +4350,7 @@ func (a *ApplicationGatewayTrustedRootCertificatePropertiesFormat) UnmarshalJSON // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayURLConfiguration. func (a ApplicationGatewayURLConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "modifiedPath", a.ModifiedPath) populate(objectMap, "modifiedQueryString", a.ModifiedQueryString) populate(objectMap, "reroute", a.Reroute) @@ -4385,7 +4385,7 @@ func (a *ApplicationGatewayURLConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayURLPathMap. func (a ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -4428,7 +4428,7 @@ func (a *ApplicationGatewayURLPathMap) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayURLPathMapPropertiesFormat. func (a ApplicationGatewayURLPathMapPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "defaultBackendAddressPool", a.DefaultBackendAddressPool) populate(objectMap, "defaultBackendHttpSettings", a.DefaultBackendHTTPSettings) populate(objectMap, "defaultLoadDistributionPolicy", a.DefaultLoadDistributionPolicy) @@ -4479,7 +4479,7 @@ func (a *ApplicationGatewayURLPathMapPropertiesFormat) UnmarshalJSON(data []byte // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayWafDynamicManifestPropertiesResult. func (a ApplicationGatewayWafDynamicManifestPropertiesResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "availableRuleSets", a.AvailableRuleSets) populate(objectMap, "defaultRuleSet", a.DefaultRuleSet) return json.Marshal(objectMap) @@ -4510,7 +4510,7 @@ func (a *ApplicationGatewayWafDynamicManifestPropertiesResult) UnmarshalJSON(dat // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayWafDynamicManifestResult. func (a ApplicationGatewayWafDynamicManifestResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) populate(objectMap, "properties", a.Properties) @@ -4549,7 +4549,7 @@ func (a *ApplicationGatewayWafDynamicManifestResult) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayWafDynamicManifestResultList. func (a ApplicationGatewayWafDynamicManifestResultList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", a.NextLink) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) @@ -4580,7 +4580,7 @@ func (a *ApplicationGatewayWafDynamicManifestResultList) UnmarshalJSON(data []by // MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayWebApplicationFirewallConfiguration. func (a ApplicationGatewayWebApplicationFirewallConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "disabledRuleGroups", a.DisabledRuleGroups) populate(objectMap, "enabled", a.Enabled) populate(objectMap, "exclusions", a.Exclusions) @@ -4643,7 +4643,7 @@ func (a *ApplicationGatewayWebApplicationFirewallConfiguration) UnmarshalJSON(da // MarshalJSON implements the json.Marshaller interface for type ApplicationRule. func (a ApplicationRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", a.Description) populate(objectMap, "destinationAddresses", a.DestinationAddresses) populate(objectMap, "fqdnTags", a.FqdnTags) @@ -4714,7 +4714,7 @@ func (a *ApplicationRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationSecurityGroup. func (a ApplicationSecurityGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "location", a.Location) @@ -4765,7 +4765,7 @@ func (a *ApplicationSecurityGroup) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationSecurityGroupListResult. func (a ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", a.NextLink) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) @@ -4796,7 +4796,7 @@ func (a *ApplicationSecurityGroupListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ApplicationSecurityGroupPropertiesFormat. func (a ApplicationSecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "provisioningState", a.ProvisioningState) populate(objectMap, "resourceGuid", a.ResourceGUID) return json.Marshal(objectMap) @@ -4827,7 +4827,7 @@ func (a *ApplicationSecurityGroupPropertiesFormat) UnmarshalJSON(data []byte) er // MarshalJSON implements the json.Marshaller interface for type AuthorizationListResult. func (a AuthorizationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", a.NextLink) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) @@ -4858,7 +4858,7 @@ func (a *AuthorizationListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AuthorizationPropertiesFormat. func (a AuthorizationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "authorizationKey", a.AuthorizationKey) populate(objectMap, "authorizationUseStatus", a.AuthorizationUseStatus) populate(objectMap, "provisioningState", a.ProvisioningState) @@ -4893,7 +4893,7 @@ func (a *AuthorizationPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AutoApprovedPrivateLinkService. func (a AutoApprovedPrivateLinkService) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "privateLinkService", a.PrivateLinkService) return json.Marshal(objectMap) } @@ -4920,7 +4920,7 @@ func (a *AutoApprovedPrivateLinkService) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AutoApprovedPrivateLinkServicesResult. func (a AutoApprovedPrivateLinkServicesResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", a.NextLink) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) @@ -4951,7 +4951,7 @@ func (a *AutoApprovedPrivateLinkServicesResult) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type Availability. func (a Availability) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "blobDuration", a.BlobDuration) populate(objectMap, "retention", a.Retention) populate(objectMap, "timeGrain", a.TimeGrain) @@ -4986,7 +4986,7 @@ func (a *Availability) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AvailableDelegation. func (a AvailableDelegation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "actions", a.Actions) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -5029,7 +5029,7 @@ func (a *AvailableDelegation) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AvailableDelegationsResult. func (a AvailableDelegationsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", a.NextLink) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) @@ -5060,7 +5060,7 @@ func (a *AvailableDelegationsResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AvailablePrivateEndpointType. func (a AvailablePrivateEndpointType) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "displayName", a.DisplayName) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -5103,7 +5103,7 @@ func (a *AvailablePrivateEndpointType) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AvailablePrivateEndpointTypesResult. func (a AvailablePrivateEndpointTypesResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", a.NextLink) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) @@ -5134,7 +5134,7 @@ func (a *AvailablePrivateEndpointTypesResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AvailableProvidersList. func (a AvailableProvidersList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "countries", a.Countries) return json.Marshal(objectMap) } @@ -5161,7 +5161,7 @@ func (a *AvailableProvidersList) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AvailableProvidersListCity. func (a AvailableProvidersListCity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "cityName", a.CityName) populate(objectMap, "providers", a.Providers) return json.Marshal(objectMap) @@ -5192,7 +5192,7 @@ func (a *AvailableProvidersListCity) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AvailableProvidersListCountry. func (a AvailableProvidersListCountry) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "countryName", a.CountryName) populate(objectMap, "providers", a.Providers) populate(objectMap, "states", a.States) @@ -5227,7 +5227,7 @@ func (a *AvailableProvidersListCountry) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AvailableProvidersListParameters. func (a AvailableProvidersListParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "azureLocations", a.AzureLocations) populate(objectMap, "city", a.City) populate(objectMap, "country", a.Country) @@ -5266,7 +5266,7 @@ func (a *AvailableProvidersListParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AvailableProvidersListState. func (a AvailableProvidersListState) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "cities", a.Cities) populate(objectMap, "providers", a.Providers) populate(objectMap, "stateName", a.StateName) @@ -5301,7 +5301,7 @@ func (a *AvailableProvidersListState) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AvailableServiceAlias. func (a AvailableServiceAlias) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) populate(objectMap, "resourceName", a.ResourceName) @@ -5340,7 +5340,7 @@ func (a *AvailableServiceAlias) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AvailableServiceAliasesResult. func (a AvailableServiceAliasesResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", a.NextLink) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) @@ -5371,7 +5371,7 @@ func (a *AvailableServiceAliasesResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AzureAsyncOperationResult. func (a AzureAsyncOperationResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "error", a.Error) populate(objectMap, "status", a.Status) return json.Marshal(objectMap) @@ -5402,7 +5402,7 @@ func (a *AzureAsyncOperationResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AzureFirewall. func (a AzureFirewall) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "location", a.Location) @@ -5457,7 +5457,7 @@ func (a *AzureFirewall) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AzureFirewallApplicationRule. func (a AzureFirewallApplicationRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", a.Description) populate(objectMap, "fqdnTags", a.FqdnTags) populate(objectMap, "name", a.Name) @@ -5508,7 +5508,7 @@ func (a *AzureFirewallApplicationRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AzureFirewallApplicationRuleCollection. func (a AzureFirewallApplicationRuleCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -5547,7 +5547,7 @@ func (a *AzureFirewallApplicationRuleCollection) UnmarshalJSON(data []byte) erro // MarshalJSON implements the json.Marshaller interface for type AzureFirewallApplicationRuleCollectionPropertiesFormat. func (a AzureFirewallApplicationRuleCollectionPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "action", a.Action) populate(objectMap, "priority", a.Priority) populate(objectMap, "provisioningState", a.ProvisioningState) @@ -5586,7 +5586,7 @@ func (a *AzureFirewallApplicationRuleCollectionPropertiesFormat) UnmarshalJSON(d // MarshalJSON implements the json.Marshaller interface for type AzureFirewallApplicationRuleProtocol. func (a AzureFirewallApplicationRuleProtocol) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "port", a.Port) populate(objectMap, "protocolType", a.ProtocolType) return json.Marshal(objectMap) @@ -5617,7 +5617,7 @@ func (a *AzureFirewallApplicationRuleProtocol) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type AzureFirewallFqdnTag. func (a AzureFirewallFqdnTag) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "location", a.Location) @@ -5668,7 +5668,7 @@ func (a *AzureFirewallFqdnTag) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AzureFirewallFqdnTagListResult. func (a AzureFirewallFqdnTagListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", a.NextLink) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) @@ -5699,7 +5699,7 @@ func (a *AzureFirewallFqdnTagListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AzureFirewallFqdnTagPropertiesFormat. func (a AzureFirewallFqdnTagPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "fqdnTagName", a.FqdnTagName) populate(objectMap, "provisioningState", a.ProvisioningState) return json.Marshal(objectMap) @@ -5730,7 +5730,7 @@ func (a *AzureFirewallFqdnTagPropertiesFormat) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type AzureFirewallIPConfiguration. func (a AzureFirewallIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -5773,7 +5773,7 @@ func (a *AzureFirewallIPConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AzureFirewallIPConfigurationPropertiesFormat. func (a AzureFirewallIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "privateIPAddress", a.PrivateIPAddress) populate(objectMap, "provisioningState", a.ProvisioningState) populate(objectMap, "publicIPAddress", a.PublicIPAddress) @@ -5812,7 +5812,7 @@ func (a *AzureFirewallIPConfigurationPropertiesFormat) UnmarshalJSON(data []byte // MarshalJSON implements the json.Marshaller interface for type AzureFirewallIPGroups. func (a AzureFirewallIPGroups) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "changeNumber", a.ChangeNumber) populate(objectMap, "id", a.ID) return json.Marshal(objectMap) @@ -5843,7 +5843,7 @@ func (a *AzureFirewallIPGroups) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AzureFirewallListResult. func (a AzureFirewallListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", a.NextLink) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) @@ -5874,7 +5874,7 @@ func (a *AzureFirewallListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AzureFirewallNatRCAction. func (a AzureFirewallNatRCAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "type", a.Type) return json.Marshal(objectMap) } @@ -5901,7 +5901,7 @@ func (a *AzureFirewallNatRCAction) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AzureFirewallNatRule. func (a AzureFirewallNatRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", a.Description) populate(objectMap, "destinationAddresses", a.DestinationAddresses) populate(objectMap, "destinationPorts", a.DestinationPorts) @@ -5964,7 +5964,7 @@ func (a *AzureFirewallNatRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AzureFirewallNatRuleCollection. func (a AzureFirewallNatRuleCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -6003,7 +6003,7 @@ func (a *AzureFirewallNatRuleCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AzureFirewallNatRuleCollectionProperties. func (a AzureFirewallNatRuleCollectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "action", a.Action) populate(objectMap, "priority", a.Priority) populate(objectMap, "provisioningState", a.ProvisioningState) @@ -6042,7 +6042,7 @@ func (a *AzureFirewallNatRuleCollectionProperties) UnmarshalJSON(data []byte) er // MarshalJSON implements the json.Marshaller interface for type AzureFirewallNetworkRule. func (a AzureFirewallNetworkRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", a.Description) populate(objectMap, "destinationAddresses", a.DestinationAddresses) populate(objectMap, "destinationFqdns", a.DestinationFqdns) @@ -6101,7 +6101,7 @@ func (a *AzureFirewallNetworkRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AzureFirewallNetworkRuleCollection. func (a AzureFirewallNetworkRuleCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -6140,7 +6140,7 @@ func (a *AzureFirewallNetworkRuleCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AzureFirewallNetworkRuleCollectionPropertiesFormat. func (a AzureFirewallNetworkRuleCollectionPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "action", a.Action) populate(objectMap, "priority", a.Priority) populate(objectMap, "provisioningState", a.ProvisioningState) @@ -6179,7 +6179,7 @@ func (a *AzureFirewallNetworkRuleCollectionPropertiesFormat) UnmarshalJSON(data // MarshalJSON implements the json.Marshaller interface for type AzureFirewallPropertiesFormat. func (a AzureFirewallPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "additionalProperties", a.AdditionalProperties) populate(objectMap, "applicationRuleCollections", a.ApplicationRuleCollections) populate(objectMap, "firewallPolicy", a.FirewallPolicy) @@ -6254,7 +6254,7 @@ func (a *AzureFirewallPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AzureFirewallPublicIPAddress. func (a AzureFirewallPublicIPAddress) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "address", a.Address) return json.Marshal(objectMap) } @@ -6281,7 +6281,7 @@ func (a *AzureFirewallPublicIPAddress) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AzureFirewallRCAction. func (a AzureFirewallRCAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "type", a.Type) return json.Marshal(objectMap) } @@ -6308,7 +6308,7 @@ func (a *AzureFirewallRCAction) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AzureFirewallSKU. func (a AzureFirewallSKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", a.Name) populate(objectMap, "tier", a.Tier) return json.Marshal(objectMap) @@ -6339,7 +6339,7 @@ func (a *AzureFirewallSKU) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AzureReachabilityReport. func (a AzureReachabilityReport) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "aggregationLevel", a.AggregationLevel) populate(objectMap, "providerLocation", a.ProviderLocation) populate(objectMap, "reachabilityReport", a.ReachabilityReport) @@ -6374,7 +6374,7 @@ func (a *AzureReachabilityReport) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AzureReachabilityReportItem. func (a AzureReachabilityReportItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "azureLocation", a.AzureLocation) populate(objectMap, "latencies", a.Latencies) populate(objectMap, "provider", a.Provider) @@ -6409,7 +6409,7 @@ func (a *AzureReachabilityReportItem) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AzureReachabilityReportLatencyInfo. func (a AzureReachabilityReportLatencyInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "score", a.Score) populateTimeRFC3339(objectMap, "timeStamp", a.TimeStamp) return json.Marshal(objectMap) @@ -6440,7 +6440,7 @@ func (a *AzureReachabilityReportLatencyInfo) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AzureReachabilityReportLocation. func (a AzureReachabilityReportLocation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "city", a.City) populate(objectMap, "country", a.Country) populate(objectMap, "state", a.State) @@ -6475,7 +6475,7 @@ func (a *AzureReachabilityReportLocation) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AzureReachabilityReportParameters. func (a AzureReachabilityReportParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "azureLocations", a.AzureLocations) populateTimeRFC3339(objectMap, "endTime", a.EndTime) populate(objectMap, "providerLocation", a.ProviderLocation) @@ -6518,7 +6518,7 @@ func (a *AzureReachabilityReportParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AzureWebCategory. func (a AzureWebCategory) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", a.Etag) populate(objectMap, "id", a.ID) populate(objectMap, "name", a.Name) @@ -6561,7 +6561,7 @@ func (a *AzureWebCategory) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AzureWebCategoryListResult. func (a AzureWebCategoryListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", a.NextLink) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) @@ -6592,7 +6592,7 @@ func (a *AzureWebCategoryListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AzureWebCategoryPropertiesFormat. func (a AzureWebCategoryPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "group", a.Group) return json.Marshal(objectMap) } @@ -6619,7 +6619,7 @@ func (a *AzureWebCategoryPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BGPCommunity. func (b BGPCommunity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "communityName", b.CommunityName) populate(objectMap, "communityPrefixes", b.CommunityPrefixes) populate(objectMap, "communityValue", b.CommunityValue) @@ -6666,7 +6666,7 @@ func (b *BGPCommunity) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BackendAddressInboundNatRulePortMappings. func (b BackendAddressInboundNatRulePortMappings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "inboundNatRulePortMappings", b.InboundNatRulePortMappings) return json.Marshal(objectMap) } @@ -6693,7 +6693,7 @@ func (b *BackendAddressInboundNatRulePortMappings) UnmarshalJSON(data []byte) er // MarshalJSON implements the json.Marshaller interface for type BackendAddressPool. func (b BackendAddressPool) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", b.Etag) populate(objectMap, "id", b.ID) populate(objectMap, "name", b.Name) @@ -6736,7 +6736,7 @@ func (b *BackendAddressPool) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BackendAddressPoolPropertiesFormat. func (b BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "backendIPConfigurations", b.BackendIPConfigurations) populate(objectMap, "drainPeriodInSeconds", b.DrainPeriodInSeconds) populate(objectMap, "inboundNatRules", b.InboundNatRules) @@ -6803,7 +6803,7 @@ func (b *BackendAddressPoolPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BaseAdminRule. func (b BaseAdminRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", b.Etag) populate(objectMap, "id", b.ID) objectMap["kind"] = b.Kind @@ -6850,7 +6850,7 @@ func (b *BaseAdminRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BastionActiveSession. func (b BastionActiveSession) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "protocol", b.Protocol) populate(objectMap, "resourceType", b.ResourceType) populate(objectMap, "sessionDurationInMins", b.SessionDurationInMins) @@ -6917,7 +6917,7 @@ func (b *BastionActiveSession) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BastionActiveSessionListResult. func (b BastionActiveSessionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", b.NextLink) populate(objectMap, "value", b.Value) return json.Marshal(objectMap) @@ -6948,7 +6948,7 @@ func (b *BastionActiveSessionListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BastionHost. func (b BastionHost) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", b.Etag) populate(objectMap, "id", b.ID) populate(objectMap, "location", b.Location) @@ -7003,7 +7003,7 @@ func (b *BastionHost) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BastionHostIPConfiguration. func (b BastionHostIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", b.Etag) populate(objectMap, "id", b.ID) populate(objectMap, "name", b.Name) @@ -7046,7 +7046,7 @@ func (b *BastionHostIPConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BastionHostIPConfigurationPropertiesFormat. func (b BastionHostIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "privateIPAllocationMethod", b.PrivateIPAllocationMethod) populate(objectMap, "provisioningState", b.ProvisioningState) populate(objectMap, "publicIPAddress", b.PublicIPAddress) @@ -7085,7 +7085,7 @@ func (b *BastionHostIPConfigurationPropertiesFormat) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type BastionHostListResult. func (b BastionHostListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", b.NextLink) populate(objectMap, "value", b.Value) return json.Marshal(objectMap) @@ -7116,7 +7116,7 @@ func (b *BastionHostListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BastionHostPropertiesFormat. func (b BastionHostPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "dnsName", b.DNSName) populate(objectMap, "disableCopyPaste", b.DisableCopyPaste) populate(objectMap, "enableFileCopy", b.EnableFileCopy) @@ -7175,7 +7175,7 @@ func (b *BastionHostPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BastionSessionDeleteResult. func (b BastionSessionDeleteResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", b.NextLink) populate(objectMap, "value", b.Value) return json.Marshal(objectMap) @@ -7206,7 +7206,7 @@ func (b *BastionSessionDeleteResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BastionSessionState. func (b BastionSessionState) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "message", b.Message) populate(objectMap, "sessionId", b.SessionID) populate(objectMap, "state", b.State) @@ -7241,7 +7241,7 @@ func (b *BastionSessionState) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BastionShareableLink. func (b BastionShareableLink) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "bsl", b.Bsl) populate(objectMap, "createdAt", b.CreatedAt) populate(objectMap, "message", b.Message) @@ -7280,7 +7280,7 @@ func (b *BastionShareableLink) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BastionShareableLinkListRequest. func (b BastionShareableLinkListRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "vms", b.VMs) return json.Marshal(objectMap) } @@ -7307,7 +7307,7 @@ func (b *BastionShareableLinkListRequest) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BastionShareableLinkListResult. func (b BastionShareableLinkListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", b.NextLink) populate(objectMap, "value", b.Value) return json.Marshal(objectMap) @@ -7338,7 +7338,7 @@ func (b *BastionShareableLinkListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BgpConnection. func (b BgpConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", b.Etag) populate(objectMap, "id", b.ID) populate(objectMap, "name", b.Name) @@ -7381,7 +7381,7 @@ func (b *BgpConnection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BgpConnectionProperties. func (b BgpConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "connectionState", b.ConnectionState) populate(objectMap, "hubVirtualNetworkConnection", b.HubVirtualNetworkConnection) populate(objectMap, "peerAsn", b.PeerAsn) @@ -7424,7 +7424,7 @@ func (b *BgpConnectionProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BgpPeerStatus. func (b BgpPeerStatus) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "asn", b.Asn) populate(objectMap, "connectedDuration", b.ConnectedDuration) populate(objectMap, "localAddress", b.LocalAddress) @@ -7479,7 +7479,7 @@ func (b *BgpPeerStatus) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BgpPeerStatusListResult. func (b BgpPeerStatusListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "value", b.Value) return json.Marshal(objectMap) } @@ -7506,7 +7506,7 @@ func (b *BgpPeerStatusListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BgpServiceCommunity. func (b BgpServiceCommunity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", b.ID) populate(objectMap, "location", b.Location) populate(objectMap, "name", b.Name) @@ -7553,7 +7553,7 @@ func (b *BgpServiceCommunity) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BgpServiceCommunityListResult. func (b BgpServiceCommunityListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", b.NextLink) populate(objectMap, "value", b.Value) return json.Marshal(objectMap) @@ -7584,7 +7584,7 @@ func (b *BgpServiceCommunityListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BgpServiceCommunityPropertiesFormat. func (b BgpServiceCommunityPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "bgpCommunities", b.BgpCommunities) populate(objectMap, "serviceName", b.ServiceName) return json.Marshal(objectMap) @@ -7615,7 +7615,7 @@ func (b *BgpServiceCommunityPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BgpSettings. func (b BgpSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "asn", b.Asn) populate(objectMap, "bgpPeeringAddress", b.BgpPeeringAddress) populate(objectMap, "bgpPeeringAddresses", b.BgpPeeringAddresses) @@ -7654,7 +7654,7 @@ func (b *BgpSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BreakOutCategoryPolicies. func (b BreakOutCategoryPolicies) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "allow", b.Allow) populate(objectMap, "default", b.Default) populate(objectMap, "optimize", b.Optimize) @@ -7689,7 +7689,7 @@ func (b *BreakOutCategoryPolicies) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CheckPrivateLinkServiceVisibilityRequest. func (c CheckPrivateLinkServiceVisibilityRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "privateLinkServiceAlias", c.PrivateLinkServiceAlias) return json.Marshal(objectMap) } @@ -7716,7 +7716,7 @@ func (c *CheckPrivateLinkServiceVisibilityRequest) UnmarshalJSON(data []byte) er // MarshalJSON implements the json.Marshaller interface for type ChildResource. func (c ChildResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", c.Etag) populate(objectMap, "id", c.ID) populate(objectMap, "name", c.Name) @@ -7755,7 +7755,7 @@ func (c *ChildResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties. func (c Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "clientId", c.ClientID) populate(objectMap, "principalId", c.PrincipalID) return json.Marshal(objectMap) @@ -7786,7 +7786,7 @@ func (c *Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedide // MarshalJSON implements the json.Marshaller interface for type ConfigurationDiagnosticParameters. func (c ConfigurationDiagnosticParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "profiles", c.Profiles) populate(objectMap, "targetResourceId", c.TargetResourceID) populate(objectMap, "verbosityLevel", c.VerbosityLevel) @@ -7821,7 +7821,7 @@ func (c *ConfigurationDiagnosticParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConfigurationDiagnosticProfile. func (c ConfigurationDiagnosticProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "destination", c.Destination) populate(objectMap, "destinationPort", c.DestinationPort) populate(objectMap, "direction", c.Direction) @@ -7864,7 +7864,7 @@ func (c *ConfigurationDiagnosticProfile) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConfigurationDiagnosticResponse. func (c ConfigurationDiagnosticResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "results", c.Results) return json.Marshal(objectMap) } @@ -7891,7 +7891,7 @@ func (c *ConfigurationDiagnosticResponse) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConfigurationDiagnosticResult. func (c ConfigurationDiagnosticResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "networkSecurityGroupResult", c.NetworkSecurityGroupResult) populate(objectMap, "profile", c.Profile) return json.Marshal(objectMap) @@ -7922,7 +7922,7 @@ func (c *ConfigurationDiagnosticResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConfigurationGroup. func (c ConfigurationGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", c.ID) populate(objectMap, "properties", c.Properties) return json.Marshal(objectMap) @@ -7953,7 +7953,7 @@ func (c *ConfigurationGroup) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectionMonitor. func (c ConnectionMonitor) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "location", c.Location) populate(objectMap, "properties", c.Properties) populate(objectMap, "tags", c.Tags) @@ -7988,7 +7988,7 @@ func (c *ConnectionMonitor) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorDestination. func (c ConnectionMonitorDestination) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "address", c.Address) populate(objectMap, "port", c.Port) populate(objectMap, "resourceId", c.ResourceID) @@ -8023,7 +8023,7 @@ func (c *ConnectionMonitorDestination) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorEndpoint. func (c ConnectionMonitorEndpoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "address", c.Address) populate(objectMap, "coverageLevel", c.CoverageLevel) populate(objectMap, "filter", c.Filter) @@ -8074,7 +8074,7 @@ func (c *ConnectionMonitorEndpoint) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorEndpointFilter. func (c ConnectionMonitorEndpointFilter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "items", c.Items) populate(objectMap, "type", c.Type) return json.Marshal(objectMap) @@ -8105,7 +8105,7 @@ func (c *ConnectionMonitorEndpointFilter) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorEndpointFilterItem. func (c ConnectionMonitorEndpointFilterItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "address", c.Address) populate(objectMap, "type", c.Type) return json.Marshal(objectMap) @@ -8136,7 +8136,7 @@ func (c *ConnectionMonitorEndpointFilterItem) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorEndpointScope. func (c ConnectionMonitorEndpointScope) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "exclude", c.Exclude) populate(objectMap, "include", c.Include) return json.Marshal(objectMap) @@ -8167,7 +8167,7 @@ func (c *ConnectionMonitorEndpointScope) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorEndpointScopeItem. func (c ConnectionMonitorEndpointScopeItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "address", c.Address) return json.Marshal(objectMap) } @@ -8194,7 +8194,7 @@ func (c *ConnectionMonitorEndpointScopeItem) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorHTTPConfiguration. func (c ConnectionMonitorHTTPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "method", c.Method) populate(objectMap, "path", c.Path) populate(objectMap, "port", c.Port) @@ -8241,7 +8241,7 @@ func (c *ConnectionMonitorHTTPConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorIcmpConfiguration. func (c ConnectionMonitorIcmpConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "disableTraceRoute", c.DisableTraceRoute) return json.Marshal(objectMap) } @@ -8268,7 +8268,7 @@ func (c *ConnectionMonitorIcmpConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorListResult. func (c ConnectionMonitorListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "value", c.Value) return json.Marshal(objectMap) } @@ -8295,7 +8295,7 @@ func (c *ConnectionMonitorListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorOutput. func (c ConnectionMonitorOutput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "type", c.Type) populate(objectMap, "workspaceSettings", c.WorkspaceSettings) return json.Marshal(objectMap) @@ -8326,7 +8326,7 @@ func (c *ConnectionMonitorOutput) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorParameters. func (c ConnectionMonitorParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "autoStart", c.AutoStart) populate(objectMap, "destination", c.Destination) populate(objectMap, "endpoints", c.Endpoints) @@ -8385,7 +8385,7 @@ func (c *ConnectionMonitorParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorQueryResult. func (c ConnectionMonitorQueryResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "sourceStatus", c.SourceStatus) populate(objectMap, "states", c.States) return json.Marshal(objectMap) @@ -8416,7 +8416,7 @@ func (c *ConnectionMonitorQueryResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorResult. func (c ConnectionMonitorResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", c.Etag) populate(objectMap, "id", c.ID) populate(objectMap, "location", c.Location) @@ -8467,7 +8467,7 @@ func (c *ConnectionMonitorResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorResultProperties. func (c ConnectionMonitorResultProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "autoStart", c.AutoStart) populate(objectMap, "connectionMonitorType", c.ConnectionMonitorType) populate(objectMap, "destination", c.Destination) @@ -8542,7 +8542,7 @@ func (c *ConnectionMonitorResultProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorSource. func (c ConnectionMonitorSource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "port", c.Port) populate(objectMap, "resourceId", c.ResourceID) return json.Marshal(objectMap) @@ -8573,7 +8573,7 @@ func (c *ConnectionMonitorSource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorSuccessThreshold. func (c ConnectionMonitorSuccessThreshold) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "checksFailedPercent", c.ChecksFailedPercent) populate(objectMap, "roundTripTimeMs", c.RoundTripTimeMs) return json.Marshal(objectMap) @@ -8604,7 +8604,7 @@ func (c *ConnectionMonitorSuccessThreshold) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorTCPConfiguration. func (c ConnectionMonitorTCPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "destinationPortBehavior", c.DestinationPortBehavior) populate(objectMap, "disableTraceRoute", c.DisableTraceRoute) populate(objectMap, "port", c.Port) @@ -8639,7 +8639,7 @@ func (c *ConnectionMonitorTCPConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorTestConfiguration. func (c ConnectionMonitorTestConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "httpConfiguration", c.HTTPConfiguration) populate(objectMap, "icmpConfiguration", c.IcmpConfiguration) populate(objectMap, "name", c.Name) @@ -8694,7 +8694,7 @@ func (c *ConnectionMonitorTestConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorTestGroup. func (c ConnectionMonitorTestGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "destinations", c.Destinations) populate(objectMap, "disable", c.Disable) populate(objectMap, "name", c.Name) @@ -8737,7 +8737,7 @@ func (c *ConnectionMonitorTestGroup) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorWorkspaceSettings. func (c ConnectionMonitorWorkspaceSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "workspaceResourceId", c.WorkspaceResourceID) return json.Marshal(objectMap) } @@ -8764,7 +8764,7 @@ func (c *ConnectionMonitorWorkspaceSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectionResetSharedKey. func (c ConnectionResetSharedKey) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "keyLength", c.KeyLength) return json.Marshal(objectMap) } @@ -8791,7 +8791,7 @@ func (c *ConnectionResetSharedKey) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectionSharedKey. func (c ConnectionSharedKey) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", c.ID) populate(objectMap, "value", c.Value) return json.Marshal(objectMap) @@ -8822,7 +8822,7 @@ func (c *ConnectionSharedKey) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectionStateSnapshot. func (c ConnectionStateSnapshot) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "avgLatencyInMs", c.AvgLatencyInMs) populate(objectMap, "connectionState", c.ConnectionState) populateTimeRFC3339(objectMap, "endTime", c.EndTime) @@ -8885,7 +8885,7 @@ func (c *ConnectionStateSnapshot) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectivityConfiguration. func (c ConnectivityConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", c.Etag) populate(objectMap, "id", c.ID) populate(objectMap, "name", c.Name) @@ -8932,7 +8932,7 @@ func (c *ConnectivityConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectivityConfigurationListResult. func (c ConnectivityConfigurationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", c.NextLink) populate(objectMap, "value", c.Value) return json.Marshal(objectMap) @@ -8963,7 +8963,7 @@ func (c *ConnectivityConfigurationListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectivityConfigurationProperties. func (c ConnectivityConfigurationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "appliesToGroups", c.AppliesToGroups) populate(objectMap, "connectivityTopology", c.ConnectivityTopology) populate(objectMap, "deleteExistingPeering", c.DeleteExistingPeering) @@ -9014,7 +9014,7 @@ func (c *ConnectivityConfigurationProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectivityDestination. func (c ConnectivityDestination) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "address", c.Address) populate(objectMap, "port", c.Port) populate(objectMap, "resourceId", c.ResourceID) @@ -9049,7 +9049,7 @@ func (c *ConnectivityDestination) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectivityGroupItem. func (c ConnectivityGroupItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "groupConnectivity", c.GroupConnectivity) populate(objectMap, "isGlobal", c.IsGlobal) populate(objectMap, "networkGroupId", c.NetworkGroupID) @@ -9088,7 +9088,7 @@ func (c *ConnectivityGroupItem) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectivityHop. func (c ConnectivityHop) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "address", c.Address) populate(objectMap, "id", c.ID) populate(objectMap, "issues", c.Issues) @@ -9147,7 +9147,7 @@ func (c *ConnectivityHop) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectivityInformation. func (c ConnectivityInformation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "avgLatencyInMs", c.AvgLatencyInMs) populate(objectMap, "connectionStatus", c.ConnectionStatus) populate(objectMap, "hops", c.Hops) @@ -9198,7 +9198,7 @@ func (c *ConnectivityInformation) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectivityIssue. func (c ConnectivityIssue) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "context", c.Context) populate(objectMap, "origin", c.Origin) populate(objectMap, "severity", c.Severity) @@ -9237,7 +9237,7 @@ func (c *ConnectivityIssue) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectivityParameters. func (c ConnectivityParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "destination", c.Destination) populate(objectMap, "preferredIPVersion", c.PreferredIPVersion) populate(objectMap, "protocol", c.Protocol) @@ -9280,7 +9280,7 @@ func (c *ConnectivityParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ConnectivitySource. func (c ConnectivitySource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "port", c.Port) populate(objectMap, "resourceId", c.ResourceID) return json.Marshal(objectMap) @@ -9311,7 +9311,7 @@ func (c *ConnectivitySource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Container. func (c Container) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", c.ID) return json.Marshal(objectMap) } @@ -9338,7 +9338,7 @@ func (c *Container) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ContainerNetworkInterface. func (c ContainerNetworkInterface) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", c.Etag) populate(objectMap, "id", c.ID) populate(objectMap, "name", c.Name) @@ -9381,7 +9381,7 @@ func (c *ContainerNetworkInterface) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ContainerNetworkInterfaceConfiguration. func (c ContainerNetworkInterfaceConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", c.Etag) populate(objectMap, "id", c.ID) populate(objectMap, "name", c.Name) @@ -9424,7 +9424,7 @@ func (c *ContainerNetworkInterfaceConfiguration) UnmarshalJSON(data []byte) erro // MarshalJSON implements the json.Marshaller interface for type ContainerNetworkInterfaceConfigurationPropertiesFormat. func (c ContainerNetworkInterfaceConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "containerNetworkInterfaces", c.ContainerNetworkInterfaces) populate(objectMap, "ipConfigurations", c.IPConfigurations) populate(objectMap, "provisioningState", c.ProvisioningState) @@ -9459,7 +9459,7 @@ func (c *ContainerNetworkInterfaceConfigurationPropertiesFormat) UnmarshalJSON(d // MarshalJSON implements the json.Marshaller interface for type ContainerNetworkInterfaceIPConfiguration. func (c ContainerNetworkInterfaceIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", c.Etag) populate(objectMap, "name", c.Name) populate(objectMap, "properties", c.Properties) @@ -9498,7 +9498,7 @@ func (c *ContainerNetworkInterfaceIPConfiguration) UnmarshalJSON(data []byte) er // MarshalJSON implements the json.Marshaller interface for type ContainerNetworkInterfaceIPConfigurationPropertiesFormat. func (c ContainerNetworkInterfaceIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "provisioningState", c.ProvisioningState) return json.Marshal(objectMap) } @@ -9525,7 +9525,7 @@ func (c *ContainerNetworkInterfaceIPConfigurationPropertiesFormat) UnmarshalJSON // MarshalJSON implements the json.Marshaller interface for type ContainerNetworkInterfacePropertiesFormat. func (c ContainerNetworkInterfacePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "container", c.Container) populate(objectMap, "containerNetworkInterfaceConfiguration", c.ContainerNetworkInterfaceConfiguration) populate(objectMap, "ipConfigurations", c.IPConfigurations) @@ -9564,7 +9564,7 @@ func (c *ContainerNetworkInterfacePropertiesFormat) UnmarshalJSON(data []byte) e // MarshalJSON implements the json.Marshaller interface for type Criterion. func (c Criterion) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "asPath", c.AsPath) populate(objectMap, "community", c.Community) populate(objectMap, "matchCondition", c.MatchCondition) @@ -9603,7 +9603,7 @@ func (c *Criterion) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CrossTenantScopes. func (c CrossTenantScopes) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "managementGroups", c.ManagementGroups) populate(objectMap, "subscriptions", c.Subscriptions) populate(objectMap, "tenantId", c.TenantID) @@ -9638,7 +9638,7 @@ func (c *CrossTenantScopes) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CustomDNSConfigPropertiesFormat. func (c CustomDNSConfigPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "fqdn", c.Fqdn) populate(objectMap, "ipAddresses", c.IPAddresses) return json.Marshal(objectMap) @@ -9669,7 +9669,7 @@ func (c *CustomDNSConfigPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CustomIPPrefix. func (c CustomIPPrefix) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", c.Etag) populate(objectMap, "extendedLocation", c.ExtendedLocation) populate(objectMap, "id", c.ID) @@ -9728,7 +9728,7 @@ func (c *CustomIPPrefix) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CustomIPPrefixListResult. func (c CustomIPPrefixListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", c.NextLink) populate(objectMap, "value", c.Value) return json.Marshal(objectMap) @@ -9759,7 +9759,7 @@ func (c *CustomIPPrefixListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CustomIPPrefixPropertiesFormat. func (c CustomIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "asn", c.Asn) populate(objectMap, "authorizationMessage", c.AuthorizationMessage) populate(objectMap, "childCustomIpPrefixes", c.ChildCustomIPPrefixes) @@ -9842,7 +9842,7 @@ func (c *CustomIPPrefixPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DNSNameAvailabilityResult. func (d DNSNameAvailabilityResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "available", d.Available) return json.Marshal(objectMap) } @@ -9869,7 +9869,7 @@ func (d *DNSNameAvailabilityResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DNSSettings. func (d DNSSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "enableProxy", d.EnableProxy) populate(objectMap, "requireProxyForNetworkRules", d.RequireProxyForNetworkRules) populate(objectMap, "servers", d.Servers) @@ -9904,7 +9904,7 @@ func (d *DNSSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DdosCustomPolicy. func (d DdosCustomPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", d.Etag) populate(objectMap, "id", d.ID) populate(objectMap, "location", d.Location) @@ -9955,7 +9955,7 @@ func (d *DdosCustomPolicy) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DdosCustomPolicyPropertiesFormat. func (d DdosCustomPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "provisioningState", d.ProvisioningState) populate(objectMap, "resourceGuid", d.ResourceGUID) return json.Marshal(objectMap) @@ -9986,7 +9986,7 @@ func (d *DdosCustomPolicyPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DdosProtectionPlan. func (d DdosProtectionPlan) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", d.Etag) populate(objectMap, "id", d.ID) populate(objectMap, "location", d.Location) @@ -10037,7 +10037,7 @@ func (d *DdosProtectionPlan) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DdosProtectionPlanListResult. func (d DdosProtectionPlanListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", d.NextLink) populate(objectMap, "value", d.Value) return json.Marshal(objectMap) @@ -10068,7 +10068,7 @@ func (d *DdosProtectionPlanListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DdosProtectionPlanPropertiesFormat. func (d DdosProtectionPlanPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "provisioningState", d.ProvisioningState) populate(objectMap, "publicIPAddresses", d.PublicIPAddresses) populate(objectMap, "resourceGuid", d.ResourceGUID) @@ -10107,7 +10107,7 @@ func (d *DdosProtectionPlanPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DdosSettings. func (d DdosSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "ddosProtectionPlan", d.DdosProtectionPlan) populate(objectMap, "protectionMode", d.ProtectionMode) return json.Marshal(objectMap) @@ -10138,7 +10138,7 @@ func (d *DdosSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DefaultAdminPropertiesFormat. func (d DefaultAdminPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "access", d.Access) populate(objectMap, "description", d.Description) populate(objectMap, "destinationPortRanges", d.DestinationPortRanges) @@ -10205,7 +10205,7 @@ func (d *DefaultAdminPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DefaultAdminRule. func (d DefaultAdminRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", d.Etag) populate(objectMap, "id", d.ID) objectMap["kind"] = AdminRuleKindDefault @@ -10256,7 +10256,7 @@ func (d *DefaultAdminRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DefaultRuleSetPropertyFormat. func (d DefaultRuleSetPropertyFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "ruleSetType", d.RuleSetType) populate(objectMap, "ruleSetVersion", d.RuleSetVersion) return json.Marshal(objectMap) @@ -10287,7 +10287,7 @@ func (d *DefaultRuleSetPropertyFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Delegation. func (d Delegation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", d.Etag) populate(objectMap, "id", d.ID) populate(objectMap, "name", d.Name) @@ -10330,7 +10330,7 @@ func (d *Delegation) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DelegationProperties. func (d DelegationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "provisioningState", d.ProvisioningState) populate(objectMap, "serviceName", d.ServiceName) return json.Marshal(objectMap) @@ -10361,7 +10361,7 @@ func (d *DelegationProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DeviceProperties. func (d DeviceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "deviceModel", d.DeviceModel) populate(objectMap, "deviceVendor", d.DeviceVendor) populate(objectMap, "linkSpeedInMbps", d.LinkSpeedInMbps) @@ -10396,7 +10396,7 @@ func (d *DeviceProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DhcpOptions. func (d DhcpOptions) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "dnsServers", d.DNSServers) return json.Marshal(objectMap) } @@ -10423,7 +10423,7 @@ func (d *DhcpOptions) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Dimension. func (d Dimension) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "displayName", d.DisplayName) populate(objectMap, "internalName", d.InternalName) populate(objectMap, "name", d.Name) @@ -10458,7 +10458,7 @@ func (d *Dimension) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DscpConfiguration. func (d DscpConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", d.Etag) populate(objectMap, "id", d.ID) populate(objectMap, "location", d.Location) @@ -10509,7 +10509,7 @@ func (d *DscpConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DscpConfigurationListResult. func (d DscpConfigurationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", d.NextLink) populate(objectMap, "value", d.Value) return json.Marshal(objectMap) @@ -10540,7 +10540,7 @@ func (d *DscpConfigurationListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DscpConfigurationPropertiesFormat. func (d DscpConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "associatedNetworkInterfaces", d.AssociatedNetworkInterfaces) populate(objectMap, "destinationIpRanges", d.DestinationIPRanges) populate(objectMap, "destinationPortRanges", d.DestinationPortRanges) @@ -10607,7 +10607,7 @@ func (d *DscpConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EffectiveBaseSecurityAdminRule. func (e EffectiveBaseSecurityAdminRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "configurationDescription", e.ConfigurationDescription) populate(objectMap, "id", e.ID) objectMap["kind"] = e.Kind @@ -10654,7 +10654,7 @@ func (e *EffectiveBaseSecurityAdminRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EffectiveConnectivityConfiguration. func (e EffectiveConnectivityConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "configurationGroups", e.ConfigurationGroups) populate(objectMap, "id", e.ID) populate(objectMap, "properties", e.Properties) @@ -10689,7 +10689,7 @@ func (e *EffectiveConnectivityConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EffectiveDefaultSecurityAdminRule. func (e EffectiveDefaultSecurityAdminRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "configurationDescription", e.ConfigurationDescription) populate(objectMap, "id", e.ID) objectMap["kind"] = EffectiveAdminRuleKindDefault @@ -10740,7 +10740,7 @@ func (e *EffectiveDefaultSecurityAdminRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EffectiveNetworkSecurityGroup. func (e EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "association", e.Association) populate(objectMap, "effectiveSecurityRules", e.EffectiveSecurityRules) populate(objectMap, "networkSecurityGroup", e.NetworkSecurityGroup) @@ -10779,7 +10779,7 @@ func (e *EffectiveNetworkSecurityGroup) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EffectiveNetworkSecurityGroupAssociation. func (e EffectiveNetworkSecurityGroupAssociation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "networkInterface", e.NetworkInterface) populate(objectMap, "networkManager", e.NetworkManager) populate(objectMap, "subnet", e.Subnet) @@ -10814,7 +10814,7 @@ func (e *EffectiveNetworkSecurityGroupAssociation) UnmarshalJSON(data []byte) er // MarshalJSON implements the json.Marshaller interface for type EffectiveNetworkSecurityGroupListResult. func (e EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", e.NextLink) populate(objectMap, "value", e.Value) return json.Marshal(objectMap) @@ -10845,7 +10845,7 @@ func (e *EffectiveNetworkSecurityGroupListResult) UnmarshalJSON(data []byte) err // MarshalJSON implements the json.Marshaller interface for type EffectiveNetworkSecurityRule. func (e EffectiveNetworkSecurityRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "access", e.Access) populate(objectMap, "destinationAddressPrefix", e.DestinationAddressPrefix) populate(objectMap, "destinationAddressPrefixes", e.DestinationAddressPrefixes) @@ -10928,7 +10928,7 @@ func (e *EffectiveNetworkSecurityRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EffectiveRoute. func (e EffectiveRoute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "addressPrefix", e.AddressPrefix) populate(objectMap, "disableBgpRoutePropagation", e.DisableBgpRoutePropagation) populate(objectMap, "name", e.Name) @@ -10979,7 +10979,7 @@ func (e *EffectiveRoute) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EffectiveRouteListResult. func (e EffectiveRouteListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", e.NextLink) populate(objectMap, "value", e.Value) return json.Marshal(objectMap) @@ -11010,7 +11010,7 @@ func (e *EffectiveRouteListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EffectiveRouteMapRoute. func (e EffectiveRouteMapRoute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "asPath", e.AsPath) populate(objectMap, "bgpCommunities", e.BgpCommunities) populate(objectMap, "prefix", e.Prefix) @@ -11045,7 +11045,7 @@ func (e *EffectiveRouteMapRoute) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EffectiveRoutesParameters. func (e EffectiveRoutesParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "resourceId", e.ResourceID) populate(objectMap, "virtualWanResourceType", e.VirtualWanResourceType) return json.Marshal(objectMap) @@ -11076,7 +11076,7 @@ func (e *EffectiveRoutesParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EffectiveSecurityAdminRule. func (e EffectiveSecurityAdminRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "configurationDescription", e.ConfigurationDescription) populate(objectMap, "id", e.ID) objectMap["kind"] = EffectiveAdminRuleKindCustom @@ -11127,7 +11127,7 @@ func (e *EffectiveSecurityAdminRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EndpointServiceResult. func (e EndpointServiceResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", e.ID) populate(objectMap, "name", e.Name) populate(objectMap, "type", e.Type) @@ -11162,7 +11162,7 @@ func (e *EndpointServiceResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EndpointServicesListResult. func (e EndpointServicesListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", e.NextLink) populate(objectMap, "value", e.Value) return json.Marshal(objectMap) @@ -11193,7 +11193,7 @@ func (e *EndpointServicesListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Error. func (e Error) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "code", e.Code) populate(objectMap, "details", e.Details) populate(objectMap, "innerError", e.InnerError) @@ -11236,7 +11236,7 @@ func (e *Error) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ErrorDetails. func (e ErrorDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "code", e.Code) populate(objectMap, "message", e.Message) populate(objectMap, "target", e.Target) @@ -11271,7 +11271,7 @@ func (e *ErrorDetails) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ErrorResponse. func (e ErrorResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "error", e.Error) return json.Marshal(objectMap) } @@ -11298,7 +11298,7 @@ func (e *ErrorResponse) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EvaluatedNetworkSecurityGroup. func (e EvaluatedNetworkSecurityGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "appliedTo", e.AppliedTo) populate(objectMap, "matchedRule", e.MatchedRule) populate(objectMap, "networkSecurityGroupId", e.NetworkSecurityGroupID) @@ -11337,7 +11337,7 @@ func (e *EvaluatedNetworkSecurityGroup) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExclusionManagedRule. func (e ExclusionManagedRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "ruleId", e.RuleID) return json.Marshal(objectMap) } @@ -11364,7 +11364,7 @@ func (e *ExclusionManagedRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExclusionManagedRuleGroup. func (e ExclusionManagedRuleGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "ruleGroupName", e.RuleGroupName) populate(objectMap, "rules", e.Rules) return json.Marshal(objectMap) @@ -11395,7 +11395,7 @@ func (e *ExclusionManagedRuleGroup) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExclusionManagedRuleSet. func (e ExclusionManagedRuleSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "ruleGroups", e.RuleGroups) populate(objectMap, "ruleSetType", e.RuleSetType) populate(objectMap, "ruleSetVersion", e.RuleSetVersion) @@ -11430,7 +11430,7 @@ func (e *ExclusionManagedRuleSet) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExplicitProxySettings. func (e ExplicitProxySettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "enableExplicitProxy", e.EnableExplicitProxy) populate(objectMap, "enablePacFile", e.EnablePacFile) populate(objectMap, "httpPort", e.HTTPPort) @@ -11477,7 +11477,7 @@ func (e *ExplicitProxySettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuit. func (e ExpressRouteCircuit) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", e.Etag) populate(objectMap, "id", e.ID) populate(objectMap, "location", e.Location) @@ -11532,7 +11532,7 @@ func (e *ExpressRouteCircuit) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitArpTable. func (e ExpressRouteCircuitArpTable) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "age", e.Age) populate(objectMap, "ipAddress", e.IPAddress) populate(objectMap, "interface", e.Interface) @@ -11571,7 +11571,7 @@ func (e *ExpressRouteCircuitArpTable) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitAuthorization. func (e ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", e.Etag) populate(objectMap, "id", e.ID) populate(objectMap, "name", e.Name) @@ -11614,7 +11614,7 @@ func (e *ExpressRouteCircuitAuthorization) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitConnection. func (e ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", e.Etag) populate(objectMap, "id", e.ID) populate(objectMap, "name", e.Name) @@ -11657,7 +11657,7 @@ func (e *ExpressRouteCircuitConnection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitConnectionListResult. func (e ExpressRouteCircuitConnectionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", e.NextLink) populate(objectMap, "value", e.Value) return json.Marshal(objectMap) @@ -11688,7 +11688,7 @@ func (e *ExpressRouteCircuitConnectionListResult) UnmarshalJSON(data []byte) err // MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitConnectionPropertiesFormat. func (e ExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "addressPrefix", e.AddressPrefix) populate(objectMap, "authorizationKey", e.AuthorizationKey) populate(objectMap, "circuitConnectionStatus", e.CircuitConnectionStatus) @@ -11739,7 +11739,7 @@ func (e *ExpressRouteCircuitConnectionPropertiesFormat) UnmarshalJSON(data []byt // MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitListResult. func (e ExpressRouteCircuitListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", e.NextLink) populate(objectMap, "value", e.Value) return json.Marshal(objectMap) @@ -11770,7 +11770,7 @@ func (e *ExpressRouteCircuitListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitPeering. func (e ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", e.Etag) populate(objectMap, "id", e.ID) populate(objectMap, "name", e.Name) @@ -11813,7 +11813,7 @@ func (e *ExpressRouteCircuitPeering) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitPeeringConfig. func (e ExpressRouteCircuitPeeringConfig) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "advertisedCommunities", e.AdvertisedCommunities) populate(objectMap, "advertisedPublicPrefixes", e.AdvertisedPublicPrefixes) populate(objectMap, "advertisedPublicPrefixesState", e.AdvertisedPublicPrefixesState) @@ -11860,7 +11860,7 @@ func (e *ExpressRouteCircuitPeeringConfig) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitPeeringID. func (e ExpressRouteCircuitPeeringID) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", e.ID) return json.Marshal(objectMap) } @@ -11887,7 +11887,7 @@ func (e *ExpressRouteCircuitPeeringID) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitPeeringListResult. func (e ExpressRouteCircuitPeeringListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", e.NextLink) populate(objectMap, "value", e.Value) return json.Marshal(objectMap) @@ -11918,7 +11918,7 @@ func (e *ExpressRouteCircuitPeeringListResult) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitPeeringPropertiesFormat. func (e ExpressRouteCircuitPeeringPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "azureASN", e.AzureASN) populate(objectMap, "connections", e.Connections) populate(objectMap, "expressRouteConnection", e.ExpressRouteConnection) @@ -12021,7 +12021,7 @@ func (e *ExpressRouteCircuitPeeringPropertiesFormat) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitPropertiesFormat. func (e ExpressRouteCircuitPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "allowClassicOperations", e.AllowClassicOperations) populate(objectMap, "authorizationKey", e.AuthorizationKey) populate(objectMap, "authorizations", e.Authorizations) @@ -12104,7 +12104,7 @@ func (e *ExpressRouteCircuitPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitReference. func (e ExpressRouteCircuitReference) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", e.ID) return json.Marshal(objectMap) } @@ -12131,7 +12131,7 @@ func (e *ExpressRouteCircuitReference) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitRoutesTable. func (e ExpressRouteCircuitRoutesTable) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "locPrf", e.LocPrf) populate(objectMap, "network", e.Network) populate(objectMap, "nextHop", e.NextHop) @@ -12174,7 +12174,7 @@ func (e *ExpressRouteCircuitRoutesTable) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitRoutesTableSummary. func (e ExpressRouteCircuitRoutesTableSummary) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "as", e.As) populate(objectMap, "neighbor", e.Neighbor) populate(objectMap, "statePfxRcd", e.StatePfxRcd) @@ -12217,7 +12217,7 @@ func (e *ExpressRouteCircuitRoutesTableSummary) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitSKU. func (e ExpressRouteCircuitSKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "family", e.Family) populate(objectMap, "name", e.Name) populate(objectMap, "tier", e.Tier) @@ -12252,7 +12252,7 @@ func (e *ExpressRouteCircuitSKU) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitServiceProviderProperties. func (e ExpressRouteCircuitServiceProviderProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "bandwidthInMbps", e.BandwidthInMbps) populate(objectMap, "peeringLocation", e.PeeringLocation) populate(objectMap, "serviceProviderName", e.ServiceProviderName) @@ -12287,7 +12287,7 @@ func (e *ExpressRouteCircuitServiceProviderProperties) UnmarshalJSON(data []byte // MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitStats. func (e ExpressRouteCircuitStats) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "primarybytesIn", e.PrimarybytesIn) populate(objectMap, "primarybytesOut", e.PrimarybytesOut) populate(objectMap, "secondarybytesIn", e.SecondarybytesIn) @@ -12326,7 +12326,7 @@ func (e *ExpressRouteCircuitStats) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitsArpTableListResult. func (e ExpressRouteCircuitsArpTableListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", e.NextLink) populate(objectMap, "value", e.Value) return json.Marshal(objectMap) @@ -12357,7 +12357,7 @@ func (e *ExpressRouteCircuitsArpTableListResult) UnmarshalJSON(data []byte) erro // MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitsRoutesTableListResult. func (e ExpressRouteCircuitsRoutesTableListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", e.NextLink) populate(objectMap, "value", e.Value) return json.Marshal(objectMap) @@ -12388,7 +12388,7 @@ func (e *ExpressRouteCircuitsRoutesTableListResult) UnmarshalJSON(data []byte) e // MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitsRoutesTableSummaryListResult. func (e ExpressRouteCircuitsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", e.NextLink) populate(objectMap, "value", e.Value) return json.Marshal(objectMap) @@ -12419,7 +12419,7 @@ func (e *ExpressRouteCircuitsRoutesTableSummaryListResult) UnmarshalJSON(data [] // MarshalJSON implements the json.Marshaller interface for type ExpressRouteConnection. func (e ExpressRouteConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", e.ID) populate(objectMap, "name", e.Name) populate(objectMap, "properties", e.Properties) @@ -12454,7 +12454,7 @@ func (e *ExpressRouteConnection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRouteConnectionID. func (e ExpressRouteConnectionID) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", e.ID) return json.Marshal(objectMap) } @@ -12481,7 +12481,7 @@ func (e *ExpressRouteConnectionID) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRouteConnectionList. func (e ExpressRouteConnectionList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "value", e.Value) return json.Marshal(objectMap) } @@ -12508,7 +12508,7 @@ func (e *ExpressRouteConnectionList) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRouteConnectionProperties. func (e ExpressRouteConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "authorizationKey", e.AuthorizationKey) populate(objectMap, "enableInternetSecurity", e.EnableInternetSecurity) populate(objectMap, "enablePrivateLinkFastPath", e.EnablePrivateLinkFastPath) @@ -12563,7 +12563,7 @@ func (e *ExpressRouteConnectionProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnection. func (e ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", e.Etag) populate(objectMap, "id", e.ID) populate(objectMap, "location", e.Location) @@ -12614,7 +12614,7 @@ func (e *ExpressRouteCrossConnection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnectionListResult. func (e ExpressRouteCrossConnectionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", e.NextLink) populate(objectMap, "value", e.Value) return json.Marshal(objectMap) @@ -12645,7 +12645,7 @@ func (e *ExpressRouteCrossConnectionListResult) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnectionPeering. func (e ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", e.Etag) populate(objectMap, "id", e.ID) populate(objectMap, "name", e.Name) @@ -12684,7 +12684,7 @@ func (e *ExpressRouteCrossConnectionPeering) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnectionPeeringList. func (e ExpressRouteCrossConnectionPeeringList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", e.NextLink) populate(objectMap, "value", e.Value) return json.Marshal(objectMap) @@ -12715,7 +12715,7 @@ func (e *ExpressRouteCrossConnectionPeeringList) UnmarshalJSON(data []byte) erro // MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnectionPeeringProperties. func (e ExpressRouteCrossConnectionPeeringProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "azureASN", e.AzureASN) populate(objectMap, "gatewayManagerEtag", e.GatewayManagerEtag) populate(objectMap, "ipv6PeeringConfig", e.IPv6PeeringConfig) @@ -12798,7 +12798,7 @@ func (e *ExpressRouteCrossConnectionPeeringProperties) UnmarshalJSON(data []byte // MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnectionProperties. func (e ExpressRouteCrossConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "bandwidthInMbps", e.BandwidthInMbps) populate(objectMap, "expressRouteCircuit", e.ExpressRouteCircuit) populate(objectMap, "peeringLocation", e.PeeringLocation) @@ -12861,7 +12861,7 @@ func (e *ExpressRouteCrossConnectionProperties) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnectionRoutesTableSummary. func (e ExpressRouteCrossConnectionRoutesTableSummary) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "asn", e.Asn) populate(objectMap, "neighbor", e.Neighbor) populate(objectMap, "stateOrPrefixesReceived", e.StateOrPrefixesReceived) @@ -12900,7 +12900,7 @@ func (e *ExpressRouteCrossConnectionRoutesTableSummary) UnmarshalJSON(data []byt // MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnectionsRoutesTableSummaryListResult. func (e ExpressRouteCrossConnectionsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", e.NextLink) populate(objectMap, "value", e.Value) return json.Marshal(objectMap) @@ -12931,7 +12931,7 @@ func (e *ExpressRouteCrossConnectionsRoutesTableSummaryListResult) UnmarshalJSON // MarshalJSON implements the json.Marshaller interface for type ExpressRouteGateway. func (e ExpressRouteGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", e.Etag) populate(objectMap, "id", e.ID) populate(objectMap, "location", e.Location) @@ -12982,7 +12982,7 @@ func (e *ExpressRouteGateway) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRouteGatewayList. func (e ExpressRouteGatewayList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "value", e.Value) return json.Marshal(objectMap) } @@ -13009,7 +13009,7 @@ func (e *ExpressRouteGatewayList) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRouteGatewayProperties. func (e ExpressRouteGatewayProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "allowNonVirtualWanTraffic", e.AllowNonVirtualWanTraffic) populate(objectMap, "autoScaleConfiguration", e.AutoScaleConfiguration) populate(objectMap, "expressRouteConnections", e.ExpressRouteConnections) @@ -13052,7 +13052,7 @@ func (e *ExpressRouteGatewayProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRouteGatewayPropertiesAutoScaleConfiguration. func (e ExpressRouteGatewayPropertiesAutoScaleConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "bounds", e.Bounds) return json.Marshal(objectMap) } @@ -13079,7 +13079,7 @@ func (e *ExpressRouteGatewayPropertiesAutoScaleConfiguration) UnmarshalJSON(data // MarshalJSON implements the json.Marshaller interface for type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds. func (e ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "max", e.Max) populate(objectMap, "min", e.Min) return json.Marshal(objectMap) @@ -13110,7 +13110,7 @@ func (e *ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds) UnmarshalJSO // MarshalJSON implements the json.Marshaller interface for type ExpressRouteLink. func (e ExpressRouteLink) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", e.Etag) populate(objectMap, "id", e.ID) populate(objectMap, "name", e.Name) @@ -13149,7 +13149,7 @@ func (e *ExpressRouteLink) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRouteLinkListResult. func (e ExpressRouteLinkListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", e.NextLink) populate(objectMap, "value", e.Value) return json.Marshal(objectMap) @@ -13180,7 +13180,7 @@ func (e *ExpressRouteLinkListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRouteLinkMacSecConfig. func (e ExpressRouteLinkMacSecConfig) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "cakSecretIdentifier", e.CakSecretIdentifier) populate(objectMap, "cipher", e.Cipher) populate(objectMap, "cknSecretIdentifier", e.CknSecretIdentifier) @@ -13219,7 +13219,7 @@ func (e *ExpressRouteLinkMacSecConfig) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRouteLinkPropertiesFormat. func (e ExpressRouteLinkPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "adminState", e.AdminState) populate(objectMap, "coloLocation", e.ColoLocation) populate(objectMap, "connectorType", e.ConnectorType) @@ -13278,7 +13278,7 @@ func (e *ExpressRouteLinkPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRoutePort. func (e ExpressRoutePort) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", e.Etag) populate(objectMap, "id", e.ID) populate(objectMap, "identity", e.Identity) @@ -13333,7 +13333,7 @@ func (e *ExpressRoutePort) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortAuthorization. func (e ExpressRoutePortAuthorization) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", e.Etag) populate(objectMap, "id", e.ID) populate(objectMap, "name", e.Name) @@ -13376,7 +13376,7 @@ func (e *ExpressRoutePortAuthorization) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortAuthorizationListResult. func (e ExpressRoutePortAuthorizationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", e.NextLink) populate(objectMap, "value", e.Value) return json.Marshal(objectMap) @@ -13407,7 +13407,7 @@ func (e *ExpressRoutePortAuthorizationListResult) UnmarshalJSON(data []byte) err // MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortAuthorizationPropertiesFormat. func (e ExpressRoutePortAuthorizationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "authorizationKey", e.AuthorizationKey) populate(objectMap, "authorizationUseStatus", e.AuthorizationUseStatus) populate(objectMap, "circuitResourceUri", e.CircuitResourceURI) @@ -13446,7 +13446,7 @@ func (e *ExpressRoutePortAuthorizationPropertiesFormat) UnmarshalJSON(data []byt // MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortListResult. func (e ExpressRoutePortListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", e.NextLink) populate(objectMap, "value", e.Value) return json.Marshal(objectMap) @@ -13477,7 +13477,7 @@ func (e *ExpressRoutePortListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortPropertiesFormat. func (e ExpressRoutePortPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "allocationDate", e.AllocationDate) populate(objectMap, "bandwidthInGbps", e.BandwidthInGbps) populate(objectMap, "billingType", e.BillingType) @@ -13548,7 +13548,7 @@ func (e *ExpressRoutePortPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortsLocation. func (e ExpressRoutePortsLocation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", e.ID) populate(objectMap, "location", e.Location) populate(objectMap, "name", e.Name) @@ -13595,7 +13595,7 @@ func (e *ExpressRoutePortsLocation) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortsLocationBandwidths. func (e ExpressRoutePortsLocationBandwidths) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "offerName", e.OfferName) populate(objectMap, "valueInGbps", e.ValueInGbps) return json.Marshal(objectMap) @@ -13626,7 +13626,7 @@ func (e *ExpressRoutePortsLocationBandwidths) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortsLocationListResult. func (e ExpressRoutePortsLocationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", e.NextLink) populate(objectMap, "value", e.Value) return json.Marshal(objectMap) @@ -13657,7 +13657,7 @@ func (e *ExpressRoutePortsLocationListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortsLocationPropertiesFormat. func (e ExpressRoutePortsLocationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "address", e.Address) populate(objectMap, "availableBandwidths", e.AvailableBandwidths) populate(objectMap, "contact", e.Contact) @@ -13696,7 +13696,7 @@ func (e *ExpressRoutePortsLocationPropertiesFormat) UnmarshalJSON(data []byte) e // MarshalJSON implements the json.Marshaller interface for type ExpressRouteProviderPort. func (e ExpressRouteProviderPort) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", e.Etag) populate(objectMap, "id", e.ID) populate(objectMap, "location", e.Location) @@ -13747,7 +13747,7 @@ func (e *ExpressRouteProviderPort) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRouteProviderPortListResult. func (e ExpressRouteProviderPortListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", e.NextLink) populate(objectMap, "value", e.Value) return json.Marshal(objectMap) @@ -13778,7 +13778,7 @@ func (e *ExpressRouteProviderPortListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRouteProviderPortProperties. func (e ExpressRouteProviderPortProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "overprovisionFactor", e.OverprovisionFactor) populate(objectMap, "peeringLocation", e.PeeringLocation) populate(objectMap, "portBandwidthInMbps", e.PortBandwidthInMbps) @@ -13833,7 +13833,7 @@ func (e *ExpressRouteProviderPortProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRouteServiceProvider. func (e ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", e.ID) populate(objectMap, "location", e.Location) populate(objectMap, "name", e.Name) @@ -13880,7 +13880,7 @@ func (e *ExpressRouteServiceProvider) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ExpressRouteServiceProviderBandwidthsOffered. func (e ExpressRouteServiceProviderBandwidthsOffered) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "offerName", e.OfferName) populate(objectMap, "valueInMbps", e.ValueInMbps) return json.Marshal(objectMap) @@ -13911,7 +13911,7 @@ func (e *ExpressRouteServiceProviderBandwidthsOffered) UnmarshalJSON(data []byte // MarshalJSON implements the json.Marshaller interface for type ExpressRouteServiceProviderListResult. func (e ExpressRouteServiceProviderListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", e.NextLink) populate(objectMap, "value", e.Value) return json.Marshal(objectMap) @@ -13942,7 +13942,7 @@ func (e *ExpressRouteServiceProviderListResult) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type ExpressRouteServiceProviderPropertiesFormat. func (e ExpressRouteServiceProviderPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "bandwidthsOffered", e.BandwidthsOffered) populate(objectMap, "peeringLocations", e.PeeringLocations) populate(objectMap, "provisioningState", e.ProvisioningState) @@ -13977,7 +13977,7 @@ func (e *ExpressRouteServiceProviderPropertiesFormat) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type ExtendedLocation. func (e ExtendedLocation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", e.Name) populate(objectMap, "type", e.Type) return json.Marshal(objectMap) @@ -14008,7 +14008,7 @@ func (e *ExtendedLocation) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FilterItems. func (f FilterItems) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "field", f.Field) populate(objectMap, "values", f.Values) return json.Marshal(objectMap) @@ -14039,7 +14039,7 @@ func (f *FilterItems) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FirewallPolicy. func (f FirewallPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", f.Etag) populate(objectMap, "id", f.ID) populate(objectMap, "identity", f.Identity) @@ -14094,7 +14094,7 @@ func (f *FirewallPolicy) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FirewallPolicyCertificateAuthority. func (f FirewallPolicyCertificateAuthority) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "keyVaultSecretId", f.KeyVaultSecretID) populate(objectMap, "name", f.Name) return json.Marshal(objectMap) @@ -14125,7 +14125,7 @@ func (f *FirewallPolicyCertificateAuthority) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FirewallPolicyFilterRuleCollection. func (f FirewallPolicyFilterRuleCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "action", f.Action) populate(objectMap, "name", f.Name) populate(objectMap, "priority", f.Priority) @@ -14168,7 +14168,7 @@ func (f *FirewallPolicyFilterRuleCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FirewallPolicyFilterRuleCollectionAction. func (f FirewallPolicyFilterRuleCollectionAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "type", f.Type) return json.Marshal(objectMap) } @@ -14195,7 +14195,7 @@ func (f *FirewallPolicyFilterRuleCollectionAction) UnmarshalJSON(data []byte) er // MarshalJSON implements the json.Marshaller interface for type FirewallPolicyInsights. func (f FirewallPolicyInsights) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "isEnabled", f.IsEnabled) populate(objectMap, "logAnalyticsResources", f.LogAnalyticsResources) populate(objectMap, "retentionDays", f.RetentionDays) @@ -14230,7 +14230,7 @@ func (f *FirewallPolicyInsights) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FirewallPolicyIntrusionDetection. func (f FirewallPolicyIntrusionDetection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "configuration", f.Configuration) populate(objectMap, "mode", f.Mode) return json.Marshal(objectMap) @@ -14261,7 +14261,7 @@ func (f *FirewallPolicyIntrusionDetection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FirewallPolicyIntrusionDetectionBypassTrafficSpecifications. func (f FirewallPolicyIntrusionDetectionBypassTrafficSpecifications) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", f.Description) populate(objectMap, "destinationAddresses", f.DestinationAddresses) populate(objectMap, "destinationIpGroups", f.DestinationIPGroups) @@ -14316,7 +14316,7 @@ func (f *FirewallPolicyIntrusionDetectionBypassTrafficSpecifications) UnmarshalJ // MarshalJSON implements the json.Marshaller interface for type FirewallPolicyIntrusionDetectionConfiguration. func (f FirewallPolicyIntrusionDetectionConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "bypassTrafficSettings", f.BypassTrafficSettings) populate(objectMap, "privateRanges", f.PrivateRanges) populate(objectMap, "signatureOverrides", f.SignatureOverrides) @@ -14351,7 +14351,7 @@ func (f *FirewallPolicyIntrusionDetectionConfiguration) UnmarshalJSON(data []byt // MarshalJSON implements the json.Marshaller interface for type FirewallPolicyIntrusionDetectionSignatureSpecification. func (f FirewallPolicyIntrusionDetectionSignatureSpecification) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", f.ID) populate(objectMap, "mode", f.Mode) return json.Marshal(objectMap) @@ -14382,7 +14382,7 @@ func (f *FirewallPolicyIntrusionDetectionSignatureSpecification) UnmarshalJSON(d // MarshalJSON implements the json.Marshaller interface for type FirewallPolicyListResult. func (f FirewallPolicyListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", f.NextLink) populate(objectMap, "value", f.Value) return json.Marshal(objectMap) @@ -14413,7 +14413,7 @@ func (f *FirewallPolicyListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FirewallPolicyLogAnalyticsResources. func (f FirewallPolicyLogAnalyticsResources) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "defaultWorkspaceId", f.DefaultWorkspaceID) populate(objectMap, "workspaces", f.Workspaces) return json.Marshal(objectMap) @@ -14444,7 +14444,7 @@ func (f *FirewallPolicyLogAnalyticsResources) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FirewallPolicyLogAnalyticsWorkspace. func (f FirewallPolicyLogAnalyticsWorkspace) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "region", f.Region) populate(objectMap, "workspaceId", f.WorkspaceID) return json.Marshal(objectMap) @@ -14475,7 +14475,7 @@ func (f *FirewallPolicyLogAnalyticsWorkspace) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FirewallPolicyNatRuleCollection. func (f FirewallPolicyNatRuleCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "action", f.Action) populate(objectMap, "name", f.Name) populate(objectMap, "priority", f.Priority) @@ -14518,7 +14518,7 @@ func (f *FirewallPolicyNatRuleCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FirewallPolicyNatRuleCollectionAction. func (f FirewallPolicyNatRuleCollectionAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "type", f.Type) return json.Marshal(objectMap) } @@ -14545,7 +14545,7 @@ func (f *FirewallPolicyNatRuleCollectionAction) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type FirewallPolicyPropertiesFormat. func (f FirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "basePolicy", f.BasePolicy) populate(objectMap, "childPolicies", f.ChildPolicies) populate(objectMap, "dnsSettings", f.DNSSettings) @@ -14628,7 +14628,7 @@ func (f *FirewallPolicyPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FirewallPolicyRule. func (f FirewallPolicyRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", f.Description) populate(objectMap, "name", f.Name) objectMap["ruleType"] = f.RuleType @@ -14663,7 +14663,7 @@ func (f *FirewallPolicyRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FirewallPolicyRuleApplicationProtocol. func (f FirewallPolicyRuleApplicationProtocol) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "port", f.Port) populate(objectMap, "protocolType", f.ProtocolType) return json.Marshal(objectMap) @@ -14694,7 +14694,7 @@ func (f *FirewallPolicyRuleApplicationProtocol) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type FirewallPolicyRuleCollection. func (f FirewallPolicyRuleCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", f.Name) populate(objectMap, "priority", f.Priority) objectMap["ruleCollectionType"] = f.RuleCollectionType @@ -14729,7 +14729,7 @@ func (f *FirewallPolicyRuleCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FirewallPolicyRuleCollectionGroup. func (f FirewallPolicyRuleCollectionGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", f.Etag) populate(objectMap, "id", f.ID) populate(objectMap, "name", f.Name) @@ -14772,7 +14772,7 @@ func (f *FirewallPolicyRuleCollectionGroup) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FirewallPolicyRuleCollectionGroupListResult. func (f FirewallPolicyRuleCollectionGroupListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", f.NextLink) populate(objectMap, "value", f.Value) return json.Marshal(objectMap) @@ -14803,7 +14803,7 @@ func (f *FirewallPolicyRuleCollectionGroupListResult) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type FirewallPolicyRuleCollectionGroupProperties. func (f FirewallPolicyRuleCollectionGroupProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "priority", f.Priority) populate(objectMap, "provisioningState", f.ProvisioningState) populate(objectMap, "ruleCollections", f.RuleCollections) @@ -14838,7 +14838,7 @@ func (f *FirewallPolicyRuleCollectionGroupProperties) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type FirewallPolicySKU. func (f FirewallPolicySKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "tier", f.Tier) return json.Marshal(objectMap) } @@ -14865,7 +14865,7 @@ func (f *FirewallPolicySKU) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FirewallPolicySNAT. func (f FirewallPolicySNAT) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "autoLearnPrivateRanges", f.AutoLearnPrivateRanges) populate(objectMap, "privateRanges", f.PrivateRanges) return json.Marshal(objectMap) @@ -14896,7 +14896,7 @@ func (f *FirewallPolicySNAT) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FirewallPolicySQL. func (f FirewallPolicySQL) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "allowSqlRedirect", f.AllowSQLRedirect) return json.Marshal(objectMap) } @@ -14923,7 +14923,7 @@ func (f *FirewallPolicySQL) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FirewallPolicyThreatIntelWhitelist. func (f FirewallPolicyThreatIntelWhitelist) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "fqdns", f.Fqdns) populate(objectMap, "ipAddresses", f.IPAddresses) return json.Marshal(objectMap) @@ -14954,7 +14954,7 @@ func (f *FirewallPolicyThreatIntelWhitelist) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FirewallPolicyTransportSecurity. func (f FirewallPolicyTransportSecurity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "certificateAuthority", f.CertificateAuthority) return json.Marshal(objectMap) } @@ -14981,7 +14981,7 @@ func (f *FirewallPolicyTransportSecurity) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FlowLog. func (f FlowLog) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", f.Etag) populate(objectMap, "id", f.ID) populate(objectMap, "location", f.Location) @@ -15032,7 +15032,7 @@ func (f *FlowLog) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FlowLogFormatParameters. func (f FlowLogFormatParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "type", f.Type) populate(objectMap, "version", f.Version) return json.Marshal(objectMap) @@ -15063,7 +15063,7 @@ func (f *FlowLogFormatParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FlowLogInformation. func (f FlowLogInformation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "flowAnalyticsConfiguration", f.FlowAnalyticsConfiguration) populate(objectMap, "properties", f.Properties) populate(objectMap, "targetResourceId", f.TargetResourceID) @@ -15098,7 +15098,7 @@ func (f *FlowLogInformation) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FlowLogListResult. func (f FlowLogListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", f.NextLink) populate(objectMap, "value", f.Value) return json.Marshal(objectMap) @@ -15129,7 +15129,7 @@ func (f *FlowLogListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FlowLogProperties. func (f FlowLogProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "enabled", f.Enabled) populate(objectMap, "format", f.Format) populate(objectMap, "retentionPolicy", f.RetentionPolicy) @@ -15168,7 +15168,7 @@ func (f *FlowLogProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FlowLogPropertiesFormat. func (f FlowLogPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "enabled", f.Enabled) populate(objectMap, "flowAnalyticsConfiguration", f.FlowAnalyticsConfiguration) populate(objectMap, "format", f.Format) @@ -15223,7 +15223,7 @@ func (f *FlowLogPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FlowLogStatusParameters. func (f FlowLogStatusParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "targetResourceId", f.TargetResourceID) return json.Marshal(objectMap) } @@ -15250,7 +15250,7 @@ func (f *FlowLogStatusParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FrontendIPConfiguration. func (f FrontendIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", f.Etag) populate(objectMap, "id", f.ID) populate(objectMap, "name", f.Name) @@ -15297,7 +15297,7 @@ func (f *FrontendIPConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FrontendIPConfigurationPropertiesFormat. func (f FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "gatewayLoadBalancer", f.GatewayLoadBalancer) populate(objectMap, "inboundNatPools", f.InboundNatPools) populate(objectMap, "inboundNatRules", f.InboundNatRules) @@ -15368,7 +15368,7 @@ func (f *FrontendIPConfigurationPropertiesFormat) UnmarshalJSON(data []byte) err // MarshalJSON implements the json.Marshaller interface for type GatewayCustomBgpIPAddressIPConfiguration. func (g GatewayCustomBgpIPAddressIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "customBgpIpAddress", g.CustomBgpIPAddress) populate(objectMap, "ipConfigurationId", g.IPConfigurationID) return json.Marshal(objectMap) @@ -15399,7 +15399,7 @@ func (g *GatewayCustomBgpIPAddressIPConfiguration) UnmarshalJSON(data []byte) er // MarshalJSON implements the json.Marshaller interface for type GatewayLoadBalancerTunnelInterface. func (g GatewayLoadBalancerTunnelInterface) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "identifier", g.Identifier) populate(objectMap, "port", g.Port) populate(objectMap, "protocol", g.Protocol) @@ -15438,7 +15438,7 @@ func (g *GatewayLoadBalancerTunnelInterface) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayRoute. func (g GatewayRoute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "asPath", g.AsPath) populate(objectMap, "localAddress", g.LocalAddress) populate(objectMap, "network", g.Network) @@ -15489,7 +15489,7 @@ func (g *GatewayRoute) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GatewayRouteListResult. func (g GatewayRouteListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "value", g.Value) return json.Marshal(objectMap) } @@ -15516,7 +15516,7 @@ func (g *GatewayRouteListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GenerateExpressRoutePortsLOARequest. func (g GenerateExpressRoutePortsLOARequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "customerName", g.CustomerName) return json.Marshal(objectMap) } @@ -15543,7 +15543,7 @@ func (g *GenerateExpressRoutePortsLOARequest) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GenerateExpressRoutePortsLOAResult. func (g GenerateExpressRoutePortsLOAResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "encodedContent", g.EncodedContent) return json.Marshal(objectMap) } @@ -15570,7 +15570,7 @@ func (g *GenerateExpressRoutePortsLOAResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GetInboundRoutesParameters. func (g GetInboundRoutesParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "connectionType", g.ConnectionType) populate(objectMap, "resourceUri", g.ResourceURI) return json.Marshal(objectMap) @@ -15601,7 +15601,7 @@ func (g *GetInboundRoutesParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GetOutboundRoutesParameters. func (g GetOutboundRoutesParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "connectionType", g.ConnectionType) populate(objectMap, "resourceUri", g.ResourceURI) return json.Marshal(objectMap) @@ -15632,7 +15632,7 @@ func (g *GetOutboundRoutesParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GetVPNSitesConfigurationRequest. func (g GetVPNSitesConfigurationRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "outputBlobSasUrl", g.OutputBlobSasURL) populate(objectMap, "vpnSites", g.VPNSites) return json.Marshal(objectMap) @@ -15663,7 +15663,7 @@ func (g *GetVPNSitesConfigurationRequest) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Group. func (g Group) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", g.Etag) populate(objectMap, "id", g.ID) populate(objectMap, "name", g.Name) @@ -15710,7 +15710,7 @@ func (g *Group) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GroupListResult. func (g GroupListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", g.NextLink) populate(objectMap, "value", g.Value) return json.Marshal(objectMap) @@ -15741,7 +15741,7 @@ func (g *GroupListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type GroupProperties. func (g GroupProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", g.Description) populate(objectMap, "provisioningState", g.ProvisioningState) return json.Marshal(objectMap) @@ -15772,7 +15772,7 @@ func (g *GroupProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type HTTPConfiguration. func (h HTTPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "headers", h.Headers) populate(objectMap, "method", h.Method) populate(objectMap, "validStatusCodes", h.ValidStatusCodes) @@ -15807,7 +15807,7 @@ func (h *HTTPConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type HTTPHeader. func (h HTTPHeader) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", h.Name) populate(objectMap, "value", h.Value) return json.Marshal(objectMap) @@ -15838,7 +15838,7 @@ func (h *HTTPHeader) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type HopLink. func (h HopLink) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "context", h.Context) populate(objectMap, "issues", h.Issues) populate(objectMap, "linkType", h.LinkType) @@ -15885,7 +15885,7 @@ func (h *HopLink) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type HopLinkProperties. func (h HopLinkProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "roundTripTimeAvg", h.RoundTripTimeAvg) populate(objectMap, "roundTripTimeMax", h.RoundTripTimeMax) populate(objectMap, "roundTripTimeMin", h.RoundTripTimeMin) @@ -15920,7 +15920,7 @@ func (h *HopLinkProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Hub. func (h Hub) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "resourceId", h.ResourceID) populate(objectMap, "resourceType", h.ResourceType) return json.Marshal(objectMap) @@ -15951,7 +15951,7 @@ func (h *Hub) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type HubIPAddresses. func (h HubIPAddresses) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "privateIPAddress", h.PrivateIPAddress) populate(objectMap, "publicIPs", h.PublicIPs) return json.Marshal(objectMap) @@ -15982,7 +15982,7 @@ func (h *HubIPAddresses) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type HubIPConfiguration. func (h HubIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", h.Etag) populate(objectMap, "id", h.ID) populate(objectMap, "name", h.Name) @@ -16025,7 +16025,7 @@ func (h *HubIPConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type HubIPConfigurationPropertiesFormat. func (h HubIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "privateIPAddress", h.PrivateIPAddress) populate(objectMap, "privateIPAllocationMethod", h.PrivateIPAllocationMethod) populate(objectMap, "provisioningState", h.ProvisioningState) @@ -16068,7 +16068,7 @@ func (h *HubIPConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type HubPublicIPAddresses. func (h HubPublicIPAddresses) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "addresses", h.Addresses) populate(objectMap, "count", h.Count) return json.Marshal(objectMap) @@ -16099,7 +16099,7 @@ func (h *HubPublicIPAddresses) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type HubRoute. func (h HubRoute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "destinationType", h.DestinationType) populate(objectMap, "destinations", h.Destinations) populate(objectMap, "name", h.Name) @@ -16142,7 +16142,7 @@ func (h *HubRoute) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type HubRouteTable. func (h HubRouteTable) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", h.Etag) populate(objectMap, "id", h.ID) populate(objectMap, "name", h.Name) @@ -16185,7 +16185,7 @@ func (h *HubRouteTable) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type HubRouteTableProperties. func (h HubRouteTableProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "associatedConnections", h.AssociatedConnections) populate(objectMap, "labels", h.Labels) populate(objectMap, "propagatingConnections", h.PropagatingConnections) @@ -16228,7 +16228,7 @@ func (h *HubRouteTableProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type HubVirtualNetworkConnection. func (h HubVirtualNetworkConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", h.Etag) populate(objectMap, "id", h.ID) populate(objectMap, "name", h.Name) @@ -16267,7 +16267,7 @@ func (h *HubVirtualNetworkConnection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type HubVirtualNetworkConnectionProperties. func (h HubVirtualNetworkConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "allowHubToRemoteVnetTransit", h.AllowHubToRemoteVnetTransit) populate(objectMap, "allowRemoteVnetToUseHubVnetGateways", h.AllowRemoteVnetToUseHubVnetGateways) populate(objectMap, "enableInternetSecurity", h.EnableInternetSecurity) @@ -16314,7 +16314,7 @@ func (h *HubVirtualNetworkConnectionProperties) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type IDPSQueryObject. func (i IDPSQueryObject) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "filters", i.Filters) populate(objectMap, "orderBy", i.OrderBy) populate(objectMap, "resultsPerPage", i.ResultsPerPage) @@ -16357,7 +16357,7 @@ func (i *IDPSQueryObject) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IPAddressAvailabilityResult. func (i IPAddressAvailabilityResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "available", i.Available) populate(objectMap, "availableIPAddresses", i.AvailableIPAddresses) populate(objectMap, "isPlatformReserved", i.IsPlatformReserved) @@ -16392,7 +16392,7 @@ func (i *IPAddressAvailabilityResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IPAllocation. func (i IPAllocation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", i.Etag) populate(objectMap, "id", i.ID) populate(objectMap, "location", i.Location) @@ -16443,7 +16443,7 @@ func (i *IPAllocation) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IPAllocationListResult. func (i IPAllocationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", i.NextLink) populate(objectMap, "value", i.Value) return json.Marshal(objectMap) @@ -16474,7 +16474,7 @@ func (i *IPAllocationListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IPAllocationPropertiesFormat. func (i IPAllocationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "allocationTags", i.AllocationTags) populate(objectMap, "ipamAllocationId", i.IpamAllocationID) populate(objectMap, "prefix", i.Prefix) @@ -16529,7 +16529,7 @@ func (i *IPAllocationPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IPConfiguration. func (i IPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", i.Etag) populate(objectMap, "id", i.ID) populate(objectMap, "name", i.Name) @@ -16568,7 +16568,7 @@ func (i *IPConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IPConfigurationBgpPeeringAddress. func (i IPConfigurationBgpPeeringAddress) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "customBgpIpAddresses", i.CustomBgpIPAddresses) populate(objectMap, "defaultBgpIpAddresses", i.DefaultBgpIPAddresses) populate(objectMap, "ipconfigurationId", i.IPConfigurationID) @@ -16607,7 +16607,7 @@ func (i *IPConfigurationBgpPeeringAddress) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IPConfigurationProfile. func (i IPConfigurationProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", i.Etag) populate(objectMap, "id", i.ID) populate(objectMap, "name", i.Name) @@ -16650,7 +16650,7 @@ func (i *IPConfigurationProfile) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IPConfigurationProfilePropertiesFormat. func (i IPConfigurationProfilePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "provisioningState", i.ProvisioningState) populate(objectMap, "subnet", i.Subnet) return json.Marshal(objectMap) @@ -16681,7 +16681,7 @@ func (i *IPConfigurationProfilePropertiesFormat) UnmarshalJSON(data []byte) erro // MarshalJSON implements the json.Marshaller interface for type IPConfigurationPropertiesFormat. func (i IPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "privateIPAddress", i.PrivateIPAddress) populate(objectMap, "privateIPAllocationMethod", i.PrivateIPAllocationMethod) populate(objectMap, "provisioningState", i.ProvisioningState) @@ -16724,7 +16724,7 @@ func (i *IPConfigurationPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IPGroup. func (i IPGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", i.Etag) populate(objectMap, "id", i.ID) populate(objectMap, "location", i.Location) @@ -16775,7 +16775,7 @@ func (i *IPGroup) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IPGroupListResult. func (i IPGroupListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", i.NextLink) populate(objectMap, "value", i.Value) return json.Marshal(objectMap) @@ -16806,7 +16806,7 @@ func (i *IPGroupListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IPGroupPropertiesFormat. func (i IPGroupPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "firewallPolicies", i.FirewallPolicies) populate(objectMap, "firewalls", i.Firewalls) populate(objectMap, "ipAddresses", i.IPAddresses) @@ -16845,7 +16845,7 @@ func (i *IPGroupPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IPPrefixesList. func (i IPPrefixesList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "ipPrefixes", i.IPPrefixes) return json.Marshal(objectMap) } @@ -16872,7 +16872,7 @@ func (i *IPPrefixesList) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IPSecPolicy. func (i IPSecPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "dhGroup", i.DhGroup) populate(objectMap, "ipsecEncryption", i.IPSecEncryption) populate(objectMap, "ipsecIntegrity", i.IPSecIntegrity) @@ -16927,7 +16927,7 @@ func (i *IPSecPolicy) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IPTag. func (i IPTag) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "ipTagType", i.IPTagType) populate(objectMap, "tag", i.Tag) return json.Marshal(objectMap) @@ -16958,7 +16958,7 @@ func (i *IPTag) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IPv6CircuitConnectionConfig. func (i IPv6CircuitConnectionConfig) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "addressPrefix", i.AddressPrefix) populate(objectMap, "circuitConnectionStatus", i.CircuitConnectionStatus) return json.Marshal(objectMap) @@ -16989,7 +16989,7 @@ func (i *IPv6CircuitConnectionConfig) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IPv6ExpressRouteCircuitPeeringConfig. func (i IPv6ExpressRouteCircuitPeeringConfig) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "microsoftPeeringConfig", i.MicrosoftPeeringConfig) populate(objectMap, "primaryPeerAddressPrefix", i.PrimaryPeerAddressPrefix) populate(objectMap, "routeFilter", i.RouteFilter) @@ -17032,7 +17032,7 @@ func (i *IPv6ExpressRouteCircuitPeeringConfig) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type InboundNatPool. func (i InboundNatPool) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", i.Etag) populate(objectMap, "id", i.ID) populate(objectMap, "name", i.Name) @@ -17075,7 +17075,7 @@ func (i *InboundNatPool) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type InboundNatPoolPropertiesFormat. func (i InboundNatPoolPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "backendPort", i.BackendPort) populate(objectMap, "enableFloatingIP", i.EnableFloatingIP) populate(objectMap, "enableTcpReset", i.EnableTCPReset) @@ -17134,7 +17134,7 @@ func (i *InboundNatPoolPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type InboundNatRule. func (i InboundNatRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", i.Etag) populate(objectMap, "id", i.ID) populate(objectMap, "name", i.Name) @@ -17177,7 +17177,7 @@ func (i *InboundNatRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type InboundNatRuleListResult. func (i InboundNatRuleListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", i.NextLink) populate(objectMap, "value", i.Value) return json.Marshal(objectMap) @@ -17208,7 +17208,7 @@ func (i *InboundNatRuleListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type InboundNatRulePortMapping. func (i InboundNatRulePortMapping) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "backendPort", i.BackendPort) populate(objectMap, "frontendPort", i.FrontendPort) populate(objectMap, "inboundNatRuleName", i.InboundNatRuleName) @@ -17247,7 +17247,7 @@ func (i *InboundNatRulePortMapping) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type InboundNatRulePropertiesFormat. func (i InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "backendAddressPool", i.BackendAddressPool) populate(objectMap, "backendIPConfiguration", i.BackendIPConfiguration) populate(objectMap, "backendPort", i.BackendPort) @@ -17318,7 +17318,7 @@ func (i *InboundNatRulePropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type InboundSecurityRule. func (i InboundSecurityRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", i.Etag) populate(objectMap, "id", i.ID) populate(objectMap, "name", i.Name) @@ -17361,7 +17361,7 @@ func (i *InboundSecurityRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type InboundSecurityRuleProperties. func (i InboundSecurityRuleProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "provisioningState", i.ProvisioningState) populate(objectMap, "rules", i.Rules) return json.Marshal(objectMap) @@ -17392,7 +17392,7 @@ func (i *InboundSecurityRuleProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type InboundSecurityRules. func (i InboundSecurityRules) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "destinationPortRange", i.DestinationPortRange) populate(objectMap, "protocol", i.Protocol) populate(objectMap, "sourceAddressPrefix", i.SourceAddressPrefix) @@ -17427,7 +17427,7 @@ func (i *InboundSecurityRules) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IntentPolicy. func (i IntentPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", i.Etag) populate(objectMap, "id", i.ID) populate(objectMap, "location", i.Location) @@ -17474,7 +17474,7 @@ func (i *IntentPolicy) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IntentPolicyConfiguration. func (i IntentPolicyConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "networkIntentPolicyName", i.NetworkIntentPolicyName) populate(objectMap, "sourceNetworkIntentPolicy", i.SourceNetworkIntentPolicy) return json.Marshal(objectMap) @@ -17505,7 +17505,7 @@ func (i *IntentPolicyConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Interface. func (i Interface) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", i.Etag) populate(objectMap, "extendedLocation", i.ExtendedLocation) populate(objectMap, "id", i.ID) @@ -17560,7 +17560,7 @@ func (i *Interface) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type InterfaceAssociation. func (i InterfaceAssociation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", i.ID) populate(objectMap, "securityRules", i.SecurityRules) return json.Marshal(objectMap) @@ -17591,7 +17591,7 @@ func (i *InterfaceAssociation) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type InterfaceDNSSettings. func (i InterfaceDNSSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "appliedDnsServers", i.AppliedDNSServers) populate(objectMap, "dnsServers", i.DNSServers) populate(objectMap, "internalDnsNameLabel", i.InternalDNSNameLabel) @@ -17634,7 +17634,7 @@ func (i *InterfaceDNSSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type InterfaceIPConfiguration. func (i InterfaceIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", i.Etag) populate(objectMap, "id", i.ID) populate(objectMap, "name", i.Name) @@ -17677,7 +17677,7 @@ func (i *InterfaceIPConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type InterfaceIPConfigurationListResult. func (i InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", i.NextLink) populate(objectMap, "value", i.Value) return json.Marshal(objectMap) @@ -17708,7 +17708,7 @@ func (i *InterfaceIPConfigurationListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type InterfaceIPConfigurationPrivateLinkConnectionProperties. func (i InterfaceIPConfigurationPrivateLinkConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "fqdns", i.Fqdns) populate(objectMap, "groupId", i.GroupID) populate(objectMap, "requiredMemberName", i.RequiredMemberName) @@ -17743,7 +17743,7 @@ func (i *InterfaceIPConfigurationPrivateLinkConnectionProperties) UnmarshalJSON( // MarshalJSON implements the json.Marshaller interface for type InterfaceIPConfigurationPropertiesFormat. func (i InterfaceIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "applicationGatewayBackendAddressPools", i.ApplicationGatewayBackendAddressPools) populate(objectMap, "applicationSecurityGroups", i.ApplicationSecurityGroups) populate(objectMap, "gatewayLoadBalancer", i.GatewayLoadBalancer) @@ -17822,7 +17822,7 @@ func (i *InterfaceIPConfigurationPropertiesFormat) UnmarshalJSON(data []byte) er // MarshalJSON implements the json.Marshaller interface for type InterfaceListResult. func (i InterfaceListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", i.NextLink) populate(objectMap, "value", i.Value) return json.Marshal(objectMap) @@ -17853,7 +17853,7 @@ func (i *InterfaceListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type InterfaceLoadBalancerListResult. func (i InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", i.NextLink) populate(objectMap, "value", i.Value) return json.Marshal(objectMap) @@ -17884,7 +17884,7 @@ func (i *InterfaceLoadBalancerListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type InterfacePropertiesFormat. func (i InterfacePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "auxiliaryMode", i.AuxiliaryMode) populate(objectMap, "dnsSettings", i.DNSSettings) populate(objectMap, "disableTcpStateTracking", i.DisableTCPStateTracking) @@ -17991,7 +17991,7 @@ func (i *InterfacePropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type InterfaceTapConfiguration. func (i InterfaceTapConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", i.Etag) populate(objectMap, "id", i.ID) populate(objectMap, "name", i.Name) @@ -18034,7 +18034,7 @@ func (i *InterfaceTapConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type InterfaceTapConfigurationListResult. func (i InterfaceTapConfigurationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", i.NextLink) populate(objectMap, "value", i.Value) return json.Marshal(objectMap) @@ -18065,7 +18065,7 @@ func (i *InterfaceTapConfigurationListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type InterfaceTapConfigurationPropertiesFormat. func (i InterfaceTapConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "provisioningState", i.ProvisioningState) populate(objectMap, "virtualNetworkTap", i.VirtualNetworkTap) return json.Marshal(objectMap) @@ -18096,7 +18096,7 @@ func (i *InterfaceTapConfigurationPropertiesFormat) UnmarshalJSON(data []byte) e // MarshalJSON implements the json.Marshaller interface for type ListHubRouteTablesResult. func (l ListHubRouteTablesResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", l.NextLink) populate(objectMap, "value", l.Value) return json.Marshal(objectMap) @@ -18127,7 +18127,7 @@ func (l *ListHubRouteTablesResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ListHubVirtualNetworkConnectionsResult. func (l ListHubVirtualNetworkConnectionsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", l.NextLink) populate(objectMap, "value", l.Value) return json.Marshal(objectMap) @@ -18158,7 +18158,7 @@ func (l *ListHubVirtualNetworkConnectionsResult) UnmarshalJSON(data []byte) erro // MarshalJSON implements the json.Marshaller interface for type ListP2SVPNGatewaysResult. func (l ListP2SVPNGatewaysResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", l.NextLink) populate(objectMap, "value", l.Value) return json.Marshal(objectMap) @@ -18189,7 +18189,7 @@ func (l *ListP2SVPNGatewaysResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ListRouteMapsResult. func (l ListRouteMapsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", l.NextLink) populate(objectMap, "value", l.Value) return json.Marshal(objectMap) @@ -18220,7 +18220,7 @@ func (l *ListRouteMapsResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ListRoutingIntentResult. func (l ListRoutingIntentResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", l.NextLink) populate(objectMap, "value", l.Value) return json.Marshal(objectMap) @@ -18251,7 +18251,7 @@ func (l *ListRoutingIntentResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ListVPNConnectionsResult. func (l ListVPNConnectionsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", l.NextLink) populate(objectMap, "value", l.Value) return json.Marshal(objectMap) @@ -18282,7 +18282,7 @@ func (l *ListVPNConnectionsResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ListVPNGatewayNatRulesResult. func (l ListVPNGatewayNatRulesResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", l.NextLink) populate(objectMap, "value", l.Value) return json.Marshal(objectMap) @@ -18313,7 +18313,7 @@ func (l *ListVPNGatewayNatRulesResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ListVPNGatewaysResult. func (l ListVPNGatewaysResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", l.NextLink) populate(objectMap, "value", l.Value) return json.Marshal(objectMap) @@ -18344,7 +18344,7 @@ func (l *ListVPNGatewaysResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ListVPNServerConfigurationPolicyGroupsResult. func (l ListVPNServerConfigurationPolicyGroupsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", l.NextLink) populate(objectMap, "value", l.Value) return json.Marshal(objectMap) @@ -18375,7 +18375,7 @@ func (l *ListVPNServerConfigurationPolicyGroupsResult) UnmarshalJSON(data []byte // MarshalJSON implements the json.Marshaller interface for type ListVPNServerConfigurationsResult. func (l ListVPNServerConfigurationsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", l.NextLink) populate(objectMap, "value", l.Value) return json.Marshal(objectMap) @@ -18406,7 +18406,7 @@ func (l *ListVPNServerConfigurationsResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ListVPNSiteLinkConnectionsResult. func (l ListVPNSiteLinkConnectionsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", l.NextLink) populate(objectMap, "value", l.Value) return json.Marshal(objectMap) @@ -18437,7 +18437,7 @@ func (l *ListVPNSiteLinkConnectionsResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ListVPNSiteLinksResult. func (l ListVPNSiteLinksResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", l.NextLink) populate(objectMap, "value", l.Value) return json.Marshal(objectMap) @@ -18468,7 +18468,7 @@ func (l *ListVPNSiteLinksResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ListVPNSitesResult. func (l ListVPNSitesResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", l.NextLink) populate(objectMap, "value", l.Value) return json.Marshal(objectMap) @@ -18499,7 +18499,7 @@ func (l *ListVPNSitesResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ListVirtualHubBgpConnectionResults. func (l ListVirtualHubBgpConnectionResults) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", l.NextLink) populate(objectMap, "value", l.Value) return json.Marshal(objectMap) @@ -18530,7 +18530,7 @@ func (l *ListVirtualHubBgpConnectionResults) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ListVirtualHubIPConfigurationResults. func (l ListVirtualHubIPConfigurationResults) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", l.NextLink) populate(objectMap, "value", l.Value) return json.Marshal(objectMap) @@ -18561,7 +18561,7 @@ func (l *ListVirtualHubIPConfigurationResults) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type ListVirtualHubRouteTableV2SResult. func (l ListVirtualHubRouteTableV2SResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", l.NextLink) populate(objectMap, "value", l.Value) return json.Marshal(objectMap) @@ -18592,7 +18592,7 @@ func (l *ListVirtualHubRouteTableV2SResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ListVirtualHubsResult. func (l ListVirtualHubsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", l.NextLink) populate(objectMap, "value", l.Value) return json.Marshal(objectMap) @@ -18623,7 +18623,7 @@ func (l *ListVirtualHubsResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ListVirtualNetworkGatewayNatRulesResult. func (l ListVirtualNetworkGatewayNatRulesResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", l.NextLink) populate(objectMap, "value", l.Value) return json.Marshal(objectMap) @@ -18654,7 +18654,7 @@ func (l *ListVirtualNetworkGatewayNatRulesResult) UnmarshalJSON(data []byte) err // MarshalJSON implements the json.Marshaller interface for type ListVirtualWANsResult. func (l ListVirtualWANsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", l.NextLink) populate(objectMap, "value", l.Value) return json.Marshal(objectMap) @@ -18685,7 +18685,7 @@ func (l *ListVirtualWANsResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type LoadBalancer. func (l LoadBalancer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", l.Etag) populate(objectMap, "extendedLocation", l.ExtendedLocation) populate(objectMap, "id", l.ID) @@ -18744,7 +18744,7 @@ func (l *LoadBalancer) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type LoadBalancerBackendAddress. func (l LoadBalancerBackendAddress) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", l.Name) populate(objectMap, "properties", l.Properties) return json.Marshal(objectMap) @@ -18775,7 +18775,7 @@ func (l *LoadBalancerBackendAddress) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type LoadBalancerBackendAddressPoolListResult. func (l LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", l.NextLink) populate(objectMap, "value", l.Value) return json.Marshal(objectMap) @@ -18806,7 +18806,7 @@ func (l *LoadBalancerBackendAddressPoolListResult) UnmarshalJSON(data []byte) er // MarshalJSON implements the json.Marshaller interface for type LoadBalancerBackendAddressPropertiesFormat. func (l LoadBalancerBackendAddressPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "adminState", l.AdminState) populate(objectMap, "ipAddress", l.IPAddress) populate(objectMap, "inboundNatRulesPortMapping", l.InboundNatRulesPortMapping) @@ -18857,7 +18857,7 @@ func (l *LoadBalancerBackendAddressPropertiesFormat) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type LoadBalancerFrontendIPConfigurationListResult. func (l LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", l.NextLink) populate(objectMap, "value", l.Value) return json.Marshal(objectMap) @@ -18888,7 +18888,7 @@ func (l *LoadBalancerFrontendIPConfigurationListResult) UnmarshalJSON(data []byt // MarshalJSON implements the json.Marshaller interface for type LoadBalancerListResult. func (l LoadBalancerListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", l.NextLink) populate(objectMap, "value", l.Value) return json.Marshal(objectMap) @@ -18919,7 +18919,7 @@ func (l *LoadBalancerListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type LoadBalancerLoadBalancingRuleListResult. func (l LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", l.NextLink) populate(objectMap, "value", l.Value) return json.Marshal(objectMap) @@ -18950,7 +18950,7 @@ func (l *LoadBalancerLoadBalancingRuleListResult) UnmarshalJSON(data []byte) err // MarshalJSON implements the json.Marshaller interface for type LoadBalancerOutboundRuleListResult. func (l LoadBalancerOutboundRuleListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", l.NextLink) populate(objectMap, "value", l.Value) return json.Marshal(objectMap) @@ -18981,7 +18981,7 @@ func (l *LoadBalancerOutboundRuleListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type LoadBalancerProbeListResult. func (l LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", l.NextLink) populate(objectMap, "value", l.Value) return json.Marshal(objectMap) @@ -19012,7 +19012,7 @@ func (l *LoadBalancerProbeListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type LoadBalancerPropertiesFormat. func (l LoadBalancerPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "backendAddressPools", l.BackendAddressPools) populate(objectMap, "frontendIPConfigurations", l.FrontendIPConfigurations) populate(objectMap, "inboundNatPools", l.InboundNatPools) @@ -19071,7 +19071,7 @@ func (l *LoadBalancerPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type LoadBalancerSKU. func (l LoadBalancerSKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", l.Name) populate(objectMap, "tier", l.Tier) return json.Marshal(objectMap) @@ -19102,7 +19102,7 @@ func (l *LoadBalancerSKU) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type LoadBalancerVipSwapRequest. func (l LoadBalancerVipSwapRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "frontendIPConfigurations", l.FrontendIPConfigurations) return json.Marshal(objectMap) } @@ -19129,7 +19129,7 @@ func (l *LoadBalancerVipSwapRequest) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type LoadBalancerVipSwapRequestFrontendIPConfiguration. func (l LoadBalancerVipSwapRequestFrontendIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", l.ID) populate(objectMap, "properties", l.Properties) return json.Marshal(objectMap) @@ -19160,7 +19160,7 @@ func (l *LoadBalancerVipSwapRequestFrontendIPConfiguration) UnmarshalJSON(data [ // MarshalJSON implements the json.Marshaller interface for type LoadBalancerVipSwapRequestFrontendIPConfigurationProperties. func (l LoadBalancerVipSwapRequestFrontendIPConfigurationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "publicIPAddress", l.PublicIPAddress) return json.Marshal(objectMap) } @@ -19187,7 +19187,7 @@ func (l *LoadBalancerVipSwapRequestFrontendIPConfigurationProperties) UnmarshalJ // MarshalJSON implements the json.Marshaller interface for type LoadBalancingRule. func (l LoadBalancingRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", l.Etag) populate(objectMap, "id", l.ID) populate(objectMap, "name", l.Name) @@ -19230,7 +19230,7 @@ func (l *LoadBalancingRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type LoadBalancingRulePropertiesFormat. func (l LoadBalancingRulePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "backendAddressPool", l.BackendAddressPool) populate(objectMap, "backendAddressPools", l.BackendAddressPools) populate(objectMap, "backendPort", l.BackendPort) @@ -19305,7 +19305,7 @@ func (l *LoadBalancingRulePropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type LocalNetworkGateway. func (l LocalNetworkGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", l.Etag) populate(objectMap, "id", l.ID) populate(objectMap, "location", l.Location) @@ -19356,7 +19356,7 @@ func (l *LocalNetworkGateway) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type LocalNetworkGatewayListResult. func (l LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", l.NextLink) populate(objectMap, "value", l.Value) return json.Marshal(objectMap) @@ -19387,7 +19387,7 @@ func (l *LocalNetworkGatewayListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type LocalNetworkGatewayPropertiesFormat. func (l LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "bgpSettings", l.BgpSettings) populate(objectMap, "fqdn", l.Fqdn) populate(objectMap, "gatewayIpAddress", l.GatewayIPAddress) @@ -19434,7 +19434,7 @@ func (l *LocalNetworkGatewayPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type LogSpecification. func (l LogSpecification) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "blobDuration", l.BlobDuration) populate(objectMap, "displayName", l.DisplayName) populate(objectMap, "name", l.Name) @@ -19469,7 +19469,7 @@ func (l *LogSpecification) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ManagedRuleGroupOverride. func (m ManagedRuleGroupOverride) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "ruleGroupName", m.RuleGroupName) populate(objectMap, "rules", m.Rules) return json.Marshal(objectMap) @@ -19500,7 +19500,7 @@ func (m *ManagedRuleGroupOverride) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ManagedRuleOverride. func (m ManagedRuleOverride) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "action", m.Action) populate(objectMap, "ruleId", m.RuleID) populate(objectMap, "state", m.State) @@ -19535,7 +19535,7 @@ func (m *ManagedRuleOverride) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ManagedRuleSet. func (m ManagedRuleSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "ruleGroupOverrides", m.RuleGroupOverrides) populate(objectMap, "ruleSetType", m.RuleSetType) populate(objectMap, "ruleSetVersion", m.RuleSetVersion) @@ -19570,7 +19570,7 @@ func (m *ManagedRuleSet) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ManagedRulesDefinition. func (m ManagedRulesDefinition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "exclusions", m.Exclusions) populate(objectMap, "managedRuleSets", m.ManagedRuleSets) return json.Marshal(objectMap) @@ -19601,7 +19601,7 @@ func (m *ManagedRulesDefinition) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity. func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "principalId", m.PrincipalID) populate(objectMap, "tenantId", m.TenantID) populate(objectMap, "type", m.Type) @@ -19640,7 +19640,7 @@ func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Manager. func (m Manager) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", m.Etag) populate(objectMap, "id", m.ID) populate(objectMap, "location", m.Location) @@ -19695,7 +19695,7 @@ func (m *Manager) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ManagerCommit. func (m ManagerCommit) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "commitId", m.CommitID) populate(objectMap, "commitType", m.CommitType) populate(objectMap, "configurationIds", m.ConfigurationIDs) @@ -19734,7 +19734,7 @@ func (m *ManagerCommit) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ManagerConnection. func (m ManagerConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", m.Etag) populate(objectMap, "id", m.ID) populate(objectMap, "name", m.Name) @@ -19781,7 +19781,7 @@ func (m *ManagerConnection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ManagerConnectionListResult. func (m ManagerConnectionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", m.NextLink) populate(objectMap, "value", m.Value) return json.Marshal(objectMap) @@ -19812,7 +19812,7 @@ func (m *ManagerConnectionListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ManagerConnectionProperties. func (m ManagerConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "connectionState", m.ConnectionState) populate(objectMap, "description", m.Description) populate(objectMap, "networkManagerId", m.NetworkManagerID) @@ -19847,7 +19847,7 @@ func (m *ManagerConnectionProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ManagerDeploymentStatus. func (m ManagerDeploymentStatus) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populateTimeRFC3339(objectMap, "commitTime", m.CommitTime) populate(objectMap, "configurationIds", m.ConfigurationIDs) populate(objectMap, "deploymentStatus", m.DeploymentStatus) @@ -19894,7 +19894,7 @@ func (m *ManagerDeploymentStatus) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ManagerDeploymentStatusListResult. func (m ManagerDeploymentStatusListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "skipToken", m.SkipToken) populate(objectMap, "value", m.Value) return json.Marshal(objectMap) @@ -19925,7 +19925,7 @@ func (m *ManagerDeploymentStatusListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ManagerDeploymentStatusParameter. func (m ManagerDeploymentStatusParameter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "deploymentTypes", m.DeploymentTypes) populate(objectMap, "regions", m.Regions) populate(objectMap, "skipToken", m.SkipToken) @@ -19960,7 +19960,7 @@ func (m *ManagerDeploymentStatusParameter) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ManagerEffectiveConnectivityConfigurationListResult. func (m ManagerEffectiveConnectivityConfigurationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "skipToken", m.SkipToken) populate(objectMap, "value", m.Value) return json.Marshal(objectMap) @@ -19991,7 +19991,7 @@ func (m *ManagerEffectiveConnectivityConfigurationListResult) UnmarshalJSON(data // MarshalJSON implements the json.Marshaller interface for type ManagerEffectiveSecurityAdminRulesListResult. func (m ManagerEffectiveSecurityAdminRulesListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "skipToken", m.SkipToken) populate(objectMap, "value", m.Value) return json.Marshal(objectMap) @@ -20022,7 +20022,7 @@ func (m *ManagerEffectiveSecurityAdminRulesListResult) UnmarshalJSON(data []byte // MarshalJSON implements the json.Marshaller interface for type ManagerListResult. func (m ManagerListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", m.NextLink) populate(objectMap, "value", m.Value) return json.Marshal(objectMap) @@ -20053,7 +20053,7 @@ func (m *ManagerListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ManagerProperties. func (m ManagerProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", m.Description) populate(objectMap, "networkManagerScopeAccesses", m.NetworkManagerScopeAccesses) populate(objectMap, "networkManagerScopes", m.NetworkManagerScopes) @@ -20092,7 +20092,7 @@ func (m *ManagerProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ManagerPropertiesNetworkManagerScopes. func (m ManagerPropertiesNetworkManagerScopes) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "crossTenantScopes", m.CrossTenantScopes) populate(objectMap, "managementGroups", m.ManagementGroups) populate(objectMap, "subscriptions", m.Subscriptions) @@ -20127,7 +20127,7 @@ func (m *ManagerPropertiesNetworkManagerScopes) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type ManagerSecurityGroupItem. func (m ManagerSecurityGroupItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "networkGroupId", m.NetworkGroupID) return json.Marshal(objectMap) } @@ -20154,7 +20154,7 @@ func (m *ManagerSecurityGroupItem) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type MatchCondition. func (m MatchCondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "matchValues", m.MatchValues) populate(objectMap, "matchVariables", m.MatchVariables) populate(objectMap, "negationConditon", m.NegationConditon) @@ -20197,7 +20197,7 @@ func (m *MatchCondition) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type MatchVariable. func (m MatchVariable) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "selector", m.Selector) populate(objectMap, "variableName", m.VariableName) return json.Marshal(objectMap) @@ -20228,7 +20228,7 @@ func (m *MatchVariable) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type MatchedRule. func (m MatchedRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "action", m.Action) populate(objectMap, "ruleName", m.RuleName) return json.Marshal(objectMap) @@ -20259,7 +20259,7 @@ func (m *MatchedRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type MetricSpecification. func (m MetricSpecification) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "aggregationType", m.AggregationType) populate(objectMap, "availabilities", m.Availabilities) populate(objectMap, "dimensions", m.Dimensions) @@ -20338,7 +20338,7 @@ func (m *MetricSpecification) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type NatGateway. func (n NatGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", n.Etag) populate(objectMap, "id", n.ID) populate(objectMap, "location", n.Location) @@ -20397,7 +20397,7 @@ func (n *NatGateway) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type NatGatewayListResult. func (n NatGatewayListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", n.NextLink) populate(objectMap, "value", n.Value) return json.Marshal(objectMap) @@ -20428,7 +20428,7 @@ func (n *NatGatewayListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type NatGatewayPropertiesFormat. func (n NatGatewayPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "idleTimeoutInMinutes", n.IdleTimeoutInMinutes) populate(objectMap, "provisioningState", n.ProvisioningState) populate(objectMap, "publicIpAddresses", n.PublicIPAddresses) @@ -20475,7 +20475,7 @@ func (n *NatGatewayPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type NatGatewaySKU. func (n NatGatewaySKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", n.Name) return json.Marshal(objectMap) } @@ -20502,7 +20502,7 @@ func (n *NatGatewaySKU) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type NatRule. func (n NatRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", n.Description) populate(objectMap, "destinationAddresses", n.DestinationAddresses) populate(objectMap, "destinationPorts", n.DestinationPorts) @@ -20569,7 +20569,7 @@ func (n *NatRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type NatRulePortMapping. func (n NatRulePortMapping) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "backendPort", n.BackendPort) populate(objectMap, "frontendPort", n.FrontendPort) populate(objectMap, "inboundNatRuleName", n.InboundNatRuleName) @@ -20604,7 +20604,7 @@ func (n *NatRulePortMapping) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type NextHopParameters. func (n NextHopParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "destinationIPAddress", n.DestinationIPAddress) populate(objectMap, "sourceIPAddress", n.SourceIPAddress) populate(objectMap, "targetNicResourceId", n.TargetNicResourceID) @@ -20643,7 +20643,7 @@ func (n *NextHopParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type NextHopResult. func (n NextHopResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextHopIpAddress", n.NextHopIPAddress) populate(objectMap, "nextHopType", n.NextHopType) populate(objectMap, "routeTableId", n.RouteTableID) @@ -20678,7 +20678,7 @@ func (n *NextHopResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type O365BreakOutCategoryPolicies. func (o O365BreakOutCategoryPolicies) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "allow", o.Allow) populate(objectMap, "default", o.Default) populate(objectMap, "optimize", o.Optimize) @@ -20713,7 +20713,7 @@ func (o *O365BreakOutCategoryPolicies) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type O365PolicyProperties. func (o O365PolicyProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "breakOutCategories", o.BreakOutCategories) return json.Marshal(objectMap) } @@ -20740,7 +20740,7 @@ func (o *O365PolicyProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Office365PolicyProperties. func (o Office365PolicyProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "breakOutCategories", o.BreakOutCategories) return json.Marshal(objectMap) } @@ -20767,7 +20767,7 @@ func (o *Office365PolicyProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Operation. func (o Operation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "display", o.Display) populate(objectMap, "name", o.Name) populate(objectMap, "origin", o.Origin) @@ -20806,7 +20806,7 @@ func (o *Operation) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type OperationDisplay. func (o OperationDisplay) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", o.Description) populate(objectMap, "operation", o.Operation) populate(objectMap, "provider", o.Provider) @@ -20845,7 +20845,7 @@ func (o *OperationDisplay) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type OperationListResult. func (o OperationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", o.NextLink) populate(objectMap, "value", o.Value) return json.Marshal(objectMap) @@ -20876,7 +20876,7 @@ func (o *OperationListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type OperationPropertiesFormat. func (o OperationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "serviceSpecification", o.ServiceSpecification) return json.Marshal(objectMap) } @@ -20903,7 +20903,7 @@ func (o *OperationPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type OperationPropertiesFormatServiceSpecification. func (o OperationPropertiesFormatServiceSpecification) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "logSpecifications", o.LogSpecifications) populate(objectMap, "metricSpecifications", o.MetricSpecifications) return json.Marshal(objectMap) @@ -20934,7 +20934,7 @@ func (o *OperationPropertiesFormatServiceSpecification) UnmarshalJSON(data []byt // MarshalJSON implements the json.Marshaller interface for type OrderBy. func (o OrderBy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "field", o.Field) populate(objectMap, "order", o.Order) return json.Marshal(objectMap) @@ -20965,7 +20965,7 @@ func (o *OrderBy) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type OutboundRule. func (o OutboundRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", o.Etag) populate(objectMap, "id", o.ID) populate(objectMap, "name", o.Name) @@ -21008,7 +21008,7 @@ func (o *OutboundRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type OutboundRulePropertiesFormat. func (o OutboundRulePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "allocatedOutboundPorts", o.AllocatedOutboundPorts) populate(objectMap, "backendAddressPool", o.BackendAddressPool) populate(objectMap, "enableTcpReset", o.EnableTCPReset) @@ -21059,7 +21059,7 @@ func (o *OutboundRulePropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type OwaspCrsExclusionEntry. func (o OwaspCrsExclusionEntry) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "exclusionManagedRuleSets", o.ExclusionManagedRuleSets) populate(objectMap, "matchVariable", o.MatchVariable) populate(objectMap, "selector", o.Selector) @@ -21098,7 +21098,7 @@ func (o *OwaspCrsExclusionEntry) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type P2SConnectionConfiguration. func (p P2SConnectionConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", p.Etag) populate(objectMap, "id", p.ID) populate(objectMap, "name", p.Name) @@ -21137,7 +21137,7 @@ func (p *P2SConnectionConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type P2SConnectionConfigurationProperties. func (p P2SConnectionConfigurationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "configurationPolicyGroupAssociations", p.ConfigurationPolicyGroupAssociations) populate(objectMap, "enableInternetSecurity", p.EnableInternetSecurity) populate(objectMap, "previousConfigurationPolicyGroupAssociations", p.PreviousConfigurationPolicyGroupAssociations) @@ -21184,7 +21184,7 @@ func (p *P2SConnectionConfigurationProperties) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type P2SVPNConnectionHealth. func (p P2SVPNConnectionHealth) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "sasUrl", p.SasURL) return json.Marshal(objectMap) } @@ -21211,7 +21211,7 @@ func (p *P2SVPNConnectionHealth) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type P2SVPNConnectionHealthRequest. func (p P2SVPNConnectionHealthRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "outputBlobSasUrl", p.OutputBlobSasURL) populate(objectMap, "vpnUserNamesFilter", p.VPNUserNamesFilter) return json.Marshal(objectMap) @@ -21242,7 +21242,7 @@ func (p *P2SVPNConnectionHealthRequest) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type P2SVPNConnectionRequest. func (p P2SVPNConnectionRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "vpnConnectionIds", p.VPNConnectionIDs) return json.Marshal(objectMap) } @@ -21269,7 +21269,7 @@ func (p *P2SVPNConnectionRequest) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type P2SVPNGateway. func (p P2SVPNGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", p.Etag) populate(objectMap, "id", p.ID) populate(objectMap, "location", p.Location) @@ -21320,7 +21320,7 @@ func (p *P2SVPNGateway) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type P2SVPNGatewayProperties. func (p P2SVPNGatewayProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "customDnsServers", p.CustomDNSServers) populate(objectMap, "isRoutingPreferenceInternet", p.IsRoutingPreferenceInternet) populate(objectMap, "p2SConnectionConfigurations", p.P2SConnectionConfigurations) @@ -21375,7 +21375,7 @@ func (p *P2SVPNGatewayProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type P2SVPNProfileParameters. func (p P2SVPNProfileParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "authenticationMethod", p.AuthenticationMethod) return json.Marshal(objectMap) } @@ -21402,7 +21402,7 @@ func (p *P2SVPNProfileParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PacketCapture. func (p PacketCapture) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "properties", p.Properties) return json.Marshal(objectMap) } @@ -21429,7 +21429,7 @@ func (p *PacketCapture) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PacketCaptureFilter. func (p PacketCaptureFilter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "localIPAddress", p.LocalIPAddress) populate(objectMap, "localPort", p.LocalPort) populate(objectMap, "protocol", p.Protocol) @@ -21472,7 +21472,7 @@ func (p *PacketCaptureFilter) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PacketCaptureListResult. func (p PacketCaptureListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "value", p.Value) return json.Marshal(objectMap) } @@ -21499,7 +21499,7 @@ func (p *PacketCaptureListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PacketCaptureMachineScope. func (p PacketCaptureMachineScope) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "exclude", p.Exclude) populate(objectMap, "include", p.Include) return json.Marshal(objectMap) @@ -21530,7 +21530,7 @@ func (p *PacketCaptureMachineScope) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PacketCaptureParameters. func (p PacketCaptureParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "bytesToCapturePerPacket", p.BytesToCapturePerPacket) populate(objectMap, "filters", p.Filters) populate(objectMap, "scope", p.Scope) @@ -21585,7 +21585,7 @@ func (p *PacketCaptureParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PacketCaptureQueryStatusResult. func (p PacketCaptureQueryStatusResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populateTimeRFC3339(objectMap, "captureStartTime", p.CaptureStartTime) populate(objectMap, "id", p.ID) populate(objectMap, "name", p.Name) @@ -21632,7 +21632,7 @@ func (p *PacketCaptureQueryStatusResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PacketCaptureResult. func (p PacketCaptureResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", p.Etag) populate(objectMap, "id", p.ID) populate(objectMap, "name", p.Name) @@ -21671,7 +21671,7 @@ func (p *PacketCaptureResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PacketCaptureResultProperties. func (p PacketCaptureResultProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "bytesToCapturePerPacket", p.BytesToCapturePerPacket) populate(objectMap, "filters", p.Filters) populate(objectMap, "provisioningState", p.ProvisioningState) @@ -21730,7 +21730,7 @@ func (p *PacketCaptureResultProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PacketCaptureStorageLocation. func (p PacketCaptureStorageLocation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "filePath", p.FilePath) populate(objectMap, "storageId", p.StorageID) populate(objectMap, "storagePath", p.StoragePath) @@ -21765,7 +21765,7 @@ func (p *PacketCaptureStorageLocation) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Parameter. func (p Parameter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "asPath", p.AsPath) populate(objectMap, "community", p.Community) populate(objectMap, "routePrefix", p.RoutePrefix) @@ -21800,7 +21800,7 @@ func (p *Parameter) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PartnerManagedResourceProperties. func (p PartnerManagedResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", p.ID) populate(objectMap, "internalLoadBalancerId", p.InternalLoadBalancerID) populate(objectMap, "standardLoadBalancerId", p.StandardLoadBalancerID) @@ -21835,7 +21835,7 @@ func (p *PartnerManagedResourceProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PatchObject. func (p PatchObject) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "tags", p.Tags) return json.Marshal(objectMap) } @@ -21862,7 +21862,7 @@ func (p *PatchObject) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PatchRouteFilter. func (p PatchRouteFilter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", p.Etag) populate(objectMap, "id", p.ID) populate(objectMap, "name", p.Name) @@ -21909,7 +21909,7 @@ func (p *PatchRouteFilter) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PatchRouteFilterRule. func (p PatchRouteFilterRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", p.Etag) populate(objectMap, "id", p.ID) populate(objectMap, "name", p.Name) @@ -21948,7 +21948,7 @@ func (p *PatchRouteFilterRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PeerExpressRouteCircuitConnection. func (p PeerExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", p.Etag) populate(objectMap, "id", p.ID) populate(objectMap, "name", p.Name) @@ -21991,7 +21991,7 @@ func (p *PeerExpressRouteCircuitConnection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PeerExpressRouteCircuitConnectionListResult. func (p PeerExpressRouteCircuitConnectionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", p.NextLink) populate(objectMap, "value", p.Value) return json.Marshal(objectMap) @@ -22022,7 +22022,7 @@ func (p *PeerExpressRouteCircuitConnectionListResult) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type PeerExpressRouteCircuitConnectionPropertiesFormat. func (p PeerExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "addressPrefix", p.AddressPrefix) populate(objectMap, "authResourceGuid", p.AuthResourceGUID) populate(objectMap, "circuitConnectionStatus", p.CircuitConnectionStatus) @@ -22073,7 +22073,7 @@ func (p *PeerExpressRouteCircuitConnectionPropertiesFormat) UnmarshalJSON(data [ // MarshalJSON implements the json.Marshaller interface for type PeerRoute. func (p PeerRoute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "asPath", p.AsPath) populate(objectMap, "localAddress", p.LocalAddress) populate(objectMap, "network", p.Network) @@ -22124,7 +22124,7 @@ func (p *PeerRoute) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PeerRouteList. func (p PeerRouteList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "value", p.Value) return json.Marshal(objectMap) } @@ -22151,7 +22151,7 @@ func (p *PeerRouteList) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PolicySettings. func (p PolicySettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "customBlockResponseBody", p.CustomBlockResponseBody) populate(objectMap, "customBlockResponseStatusCode", p.CustomBlockResponseStatusCode) populate(objectMap, "fileUploadLimitInMb", p.FileUploadLimitInMb) @@ -22202,7 +22202,7 @@ func (p *PolicySettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PrepareNetworkPoliciesRequest. func (p PrepareNetworkPoliciesRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "networkIntentPolicyConfigurations", p.NetworkIntentPolicyConfigurations) populate(objectMap, "serviceName", p.ServiceName) return json.Marshal(objectMap) @@ -22233,7 +22233,7 @@ func (p *PrepareNetworkPoliciesRequest) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PrivateDNSZoneConfig. func (p PrivateDNSZoneConfig) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", p.Name) populate(objectMap, "properties", p.Properties) return json.Marshal(objectMap) @@ -22264,7 +22264,7 @@ func (p *PrivateDNSZoneConfig) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PrivateDNSZoneGroup. func (p PrivateDNSZoneGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", p.Etag) populate(objectMap, "id", p.ID) populate(objectMap, "name", p.Name) @@ -22303,7 +22303,7 @@ func (p *PrivateDNSZoneGroup) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PrivateDNSZoneGroupListResult. func (p PrivateDNSZoneGroupListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", p.NextLink) populate(objectMap, "value", p.Value) return json.Marshal(objectMap) @@ -22334,7 +22334,7 @@ func (p *PrivateDNSZoneGroupListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PrivateDNSZoneGroupPropertiesFormat. func (p PrivateDNSZoneGroupPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "privateDnsZoneConfigs", p.PrivateDNSZoneConfigs) populate(objectMap, "provisioningState", p.ProvisioningState) return json.Marshal(objectMap) @@ -22365,7 +22365,7 @@ func (p *PrivateDNSZoneGroupPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PrivateDNSZonePropertiesFormat. func (p PrivateDNSZonePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "privateDnsZoneId", p.PrivateDNSZoneID) populate(objectMap, "recordSets", p.RecordSets) return json.Marshal(objectMap) @@ -22396,7 +22396,7 @@ func (p *PrivateDNSZonePropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint. func (p PrivateEndpoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", p.Etag) populate(objectMap, "extendedLocation", p.ExtendedLocation) populate(objectMap, "id", p.ID) @@ -22451,7 +22451,7 @@ func (p *PrivateEndpoint) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection. func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", p.Etag) populate(objectMap, "id", p.ID) populate(objectMap, "name", p.Name) @@ -22494,7 +22494,7 @@ func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult. func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", p.NextLink) populate(objectMap, "value", p.Value) return json.Marshal(objectMap) @@ -22525,7 +22525,7 @@ func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties. func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "linkIdentifier", p.LinkIdentifier) populate(objectMap, "privateEndpoint", p.PrivateEndpoint) populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState) @@ -22564,7 +22564,7 @@ func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PrivateEndpointIPConfiguration. func (p PrivateEndpointIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", p.Etag) populate(objectMap, "name", p.Name) populate(objectMap, "properties", p.Properties) @@ -22603,7 +22603,7 @@ func (p *PrivateEndpointIPConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PrivateEndpointIPConfigurationProperties. func (p PrivateEndpointIPConfigurationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "groupId", p.GroupID) populate(objectMap, "memberName", p.MemberName) populate(objectMap, "privateIPAddress", p.PrivateIPAddress) @@ -22638,7 +22638,7 @@ func (p *PrivateEndpointIPConfigurationProperties) UnmarshalJSON(data []byte) er // MarshalJSON implements the json.Marshaller interface for type PrivateEndpointListResult. func (p PrivateEndpointListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", p.NextLink) populate(objectMap, "value", p.Value) return json.Marshal(objectMap) @@ -22669,7 +22669,7 @@ func (p *PrivateEndpointListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PrivateEndpointProperties. func (p PrivateEndpointProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "applicationSecurityGroups", p.ApplicationSecurityGroups) populate(objectMap, "customDnsConfigs", p.CustomDNSConfigs) populate(objectMap, "customNetworkInterfaceName", p.CustomNetworkInterfaceName) @@ -22728,7 +22728,7 @@ func (p *PrivateEndpointProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PrivateLinkService. func (p PrivateLinkService) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", p.Etag) populate(objectMap, "extendedLocation", p.ExtendedLocation) populate(objectMap, "id", p.ID) @@ -22783,7 +22783,7 @@ func (p *PrivateLinkService) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnection. func (p PrivateLinkServiceConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", p.Etag) populate(objectMap, "id", p.ID) populate(objectMap, "name", p.Name) @@ -22826,7 +22826,7 @@ func (p *PrivateLinkServiceConnection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionProperties. func (p PrivateLinkServiceConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "groupIds", p.GroupIDs) populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState) populate(objectMap, "privateLinkServiceId", p.PrivateLinkServiceID) @@ -22869,7 +22869,7 @@ func (p *PrivateLinkServiceConnectionProperties) UnmarshalJSON(data []byte) erro // MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState. func (p PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "actionsRequired", p.ActionsRequired) populate(objectMap, "description", p.Description) populate(objectMap, "status", p.Status) @@ -22904,7 +22904,7 @@ func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceIPConfiguration. func (p PrivateLinkServiceIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", p.Etag) populate(objectMap, "id", p.ID) populate(objectMap, "name", p.Name) @@ -22947,7 +22947,7 @@ func (p *PrivateLinkServiceIPConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceIPConfigurationProperties. func (p PrivateLinkServiceIPConfigurationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "primary", p.Primary) populate(objectMap, "privateIPAddress", p.PrivateIPAddress) populate(objectMap, "privateIPAddressVersion", p.PrivateIPAddressVersion) @@ -22994,7 +22994,7 @@ func (p *PrivateLinkServiceIPConfigurationProperties) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceListResult. func (p PrivateLinkServiceListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", p.NextLink) populate(objectMap, "value", p.Value) return json.Marshal(objectMap) @@ -23025,7 +23025,7 @@ func (p *PrivateLinkServiceListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceProperties. func (p PrivateLinkServiceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "alias", p.Alias) populate(objectMap, "autoApproval", p.AutoApproval) populate(objectMap, "enableProxyProtocol", p.EnableProxyProtocol) @@ -23088,7 +23088,7 @@ func (p *PrivateLinkServiceProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PrivateLinkServicePropertiesAutoApproval. func (p PrivateLinkServicePropertiesAutoApproval) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "subscriptions", p.Subscriptions) return json.Marshal(objectMap) } @@ -23115,7 +23115,7 @@ func (p *PrivateLinkServicePropertiesAutoApproval) UnmarshalJSON(data []byte) er // MarshalJSON implements the json.Marshaller interface for type PrivateLinkServicePropertiesVisibility. func (p PrivateLinkServicePropertiesVisibility) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "subscriptions", p.Subscriptions) return json.Marshal(objectMap) } @@ -23142,7 +23142,7 @@ func (p *PrivateLinkServicePropertiesVisibility) UnmarshalJSON(data []byte) erro // MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceVisibility. func (p PrivateLinkServiceVisibility) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "visible", p.Visible) return json.Marshal(objectMap) } @@ -23169,7 +23169,7 @@ func (p *PrivateLinkServiceVisibility) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Probe. func (p Probe) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", p.Etag) populate(objectMap, "id", p.ID) populate(objectMap, "name", p.Name) @@ -23212,7 +23212,7 @@ func (p *Probe) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ProbePropertiesFormat. func (p ProbePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "intervalInSeconds", p.IntervalInSeconds) populate(objectMap, "loadBalancingRules", p.LoadBalancingRules) populate(objectMap, "numberOfProbes", p.NumberOfProbes) @@ -23267,7 +23267,7 @@ func (p *ProbePropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Profile. func (p Profile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", p.Etag) populate(objectMap, "id", p.ID) populate(objectMap, "location", p.Location) @@ -23318,7 +23318,7 @@ func (p *Profile) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ProfileListResult. func (p ProfileListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", p.NextLink) populate(objectMap, "value", p.Value) return json.Marshal(objectMap) @@ -23349,7 +23349,7 @@ func (p *ProfileListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ProfilePropertiesFormat. func (p ProfilePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "containerNetworkInterfaceConfigurations", p.ContainerNetworkInterfaceConfigurations) populate(objectMap, "containerNetworkInterfaces", p.ContainerNetworkInterfaces) populate(objectMap, "provisioningState", p.ProvisioningState) @@ -23388,7 +23388,7 @@ func (p *ProfilePropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PropagatedRouteTable. func (p PropagatedRouteTable) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "ids", p.IDs) populate(objectMap, "labels", p.Labels) return json.Marshal(objectMap) @@ -23419,7 +23419,7 @@ func (p *PropagatedRouteTable) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ProtocolConfiguration. func (p ProtocolConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "HTTPConfiguration", p.HTTPConfiguration) return json.Marshal(objectMap) } @@ -23446,7 +23446,7 @@ func (p *ProtocolConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PublicIPAddress. func (p PublicIPAddress) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", p.Etag) populate(objectMap, "extendedLocation", p.ExtendedLocation) populate(objectMap, "id", p.ID) @@ -23509,7 +23509,7 @@ func (p *PublicIPAddress) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PublicIPAddressDNSSettings. func (p PublicIPAddressDNSSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "domainNameLabel", p.DomainNameLabel) populate(objectMap, "fqdn", p.Fqdn) populate(objectMap, "reverseFqdn", p.ReverseFqdn) @@ -23544,7 +23544,7 @@ func (p *PublicIPAddressDNSSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PublicIPAddressListResult. func (p PublicIPAddressListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", p.NextLink) populate(objectMap, "value", p.Value) return json.Marshal(objectMap) @@ -23575,7 +23575,7 @@ func (p *PublicIPAddressListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PublicIPAddressPropertiesFormat. func (p PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "dnsSettings", p.DNSSettings) populate(objectMap, "ddosSettings", p.DdosSettings) populate(objectMap, "deleteOption", p.DeleteOption) @@ -23662,7 +23662,7 @@ func (p *PublicIPAddressPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PublicIPAddressSKU. func (p PublicIPAddressSKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", p.Name) populate(objectMap, "tier", p.Tier) return json.Marshal(objectMap) @@ -23693,7 +23693,7 @@ func (p *PublicIPAddressSKU) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PublicIPDdosProtectionStatusResult. func (p PublicIPDdosProtectionStatusResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "ddosProtectionPlanId", p.DdosProtectionPlanID) populate(objectMap, "isWorkloadProtected", p.IsWorkloadProtected) populate(objectMap, "publicIpAddress", p.PublicIPAddress) @@ -23732,7 +23732,7 @@ func (p *PublicIPDdosProtectionStatusResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PublicIPPrefix. func (p PublicIPPrefix) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", p.Etag) populate(objectMap, "extendedLocation", p.ExtendedLocation) populate(objectMap, "id", p.ID) @@ -23795,7 +23795,7 @@ func (p *PublicIPPrefix) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PublicIPPrefixListResult. func (p PublicIPPrefixListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", p.NextLink) populate(objectMap, "value", p.Value) return json.Marshal(objectMap) @@ -23826,7 +23826,7 @@ func (p *PublicIPPrefixListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PublicIPPrefixPropertiesFormat. func (p PublicIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "customIPPrefix", p.CustomIPPrefix) populate(objectMap, "ipPrefix", p.IPPrefix) populate(objectMap, "ipTags", p.IPTags) @@ -23889,7 +23889,7 @@ func (p *PublicIPPrefixPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PublicIPPrefixSKU. func (p PublicIPPrefixSKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", p.Name) populate(objectMap, "tier", p.Tier) return json.Marshal(objectMap) @@ -23920,7 +23920,7 @@ func (p *PublicIPPrefixSKU) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type QosDefinition. func (q QosDefinition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "destinationIpRanges", q.DestinationIPRanges) populate(objectMap, "destinationPortRanges", q.DestinationPortRanges) populate(objectMap, "markings", q.Markings) @@ -23967,7 +23967,7 @@ func (q *QosDefinition) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type QosIPRange. func (q QosIPRange) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "endIP", q.EndIP) populate(objectMap, "startIP", q.StartIP) return json.Marshal(objectMap) @@ -23998,7 +23998,7 @@ func (q *QosIPRange) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type QosPortRange. func (q QosPortRange) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "end", q.End) populate(objectMap, "start", q.Start) return json.Marshal(objectMap) @@ -24029,7 +24029,7 @@ func (q *QosPortRange) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type QueryInboundNatRulePortMappingRequest. func (q QueryInboundNatRulePortMappingRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "ipAddress", q.IPAddress) populate(objectMap, "ipConfiguration", q.IPConfiguration) return json.Marshal(objectMap) @@ -24060,7 +24060,7 @@ func (q *QueryInboundNatRulePortMappingRequest) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type QueryRequestOptions. func (q QueryRequestOptions) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "skipToken", q.SkipToken) return json.Marshal(objectMap) } @@ -24087,7 +24087,7 @@ func (q *QueryRequestOptions) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type QueryResults. func (q QueryResults) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "matchingRecordsCount", q.MatchingRecordsCount) populate(objectMap, "signatures", q.Signatures) return json.Marshal(objectMap) @@ -24118,7 +24118,7 @@ func (q *QueryResults) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type QueryTroubleshootingParameters. func (q QueryTroubleshootingParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "targetResourceId", q.TargetResourceID) return json.Marshal(objectMap) } @@ -24145,7 +24145,7 @@ func (q *QueryTroubleshootingParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RadiusServer. func (r RadiusServer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "radiusServerAddress", r.RadiusServerAddress) populate(objectMap, "radiusServerScore", r.RadiusServerScore) populate(objectMap, "radiusServerSecret", r.RadiusServerSecret) @@ -24180,7 +24180,7 @@ func (r *RadiusServer) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RecordSet. func (r RecordSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "fqdn", r.Fqdn) populate(objectMap, "ipAddresses", r.IPAddresses) populate(objectMap, "provisioningState", r.ProvisioningState) @@ -24227,7 +24227,7 @@ func (r *RecordSet) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ReferencedPublicIPAddress. func (r ReferencedPublicIPAddress) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", r.ID) return json.Marshal(objectMap) } @@ -24254,7 +24254,7 @@ func (r *ReferencedPublicIPAddress) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Resource. func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", r.ID) populate(objectMap, "location", r.Location) populate(objectMap, "name", r.Name) @@ -24297,7 +24297,7 @@ func (r *Resource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ResourceNavigationLink. func (r ResourceNavigationLink) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", r.Etag) populate(objectMap, "id", r.ID) populate(objectMap, "name", r.Name) @@ -24340,7 +24340,7 @@ func (r *ResourceNavigationLink) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ResourceNavigationLinkFormat. func (r ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "link", r.Link) populate(objectMap, "linkedResourceType", r.LinkedResourceType) populate(objectMap, "provisioningState", r.ProvisioningState) @@ -24375,7 +24375,7 @@ func (r *ResourceNavigationLinkFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ResourceNavigationLinksListResult. func (r ResourceNavigationLinksListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", r.NextLink) populate(objectMap, "value", r.Value) return json.Marshal(objectMap) @@ -24406,7 +24406,7 @@ func (r *ResourceNavigationLinksListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ResourceSet. func (r ResourceSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "subscriptions", r.Subscriptions) return json.Marshal(objectMap) } @@ -24433,7 +24433,7 @@ func (r *ResourceSet) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RetentionPolicyParameters. func (r RetentionPolicyParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "days", r.Days) populate(objectMap, "enabled", r.Enabled) return json.Marshal(objectMap) @@ -24464,7 +24464,7 @@ func (r *RetentionPolicyParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Route. func (r Route) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", r.Etag) populate(objectMap, "id", r.ID) populate(objectMap, "name", r.Name) @@ -24507,7 +24507,7 @@ func (r *Route) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RouteFilter. func (r RouteFilter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", r.Etag) populate(objectMap, "id", r.ID) populate(objectMap, "location", r.Location) @@ -24558,7 +24558,7 @@ func (r *RouteFilter) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RouteFilterListResult. func (r RouteFilterListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", r.NextLink) populate(objectMap, "value", r.Value) return json.Marshal(objectMap) @@ -24589,7 +24589,7 @@ func (r *RouteFilterListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RouteFilterPropertiesFormat. func (r RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "ipv6Peerings", r.IPv6Peerings) populate(objectMap, "peerings", r.Peerings) populate(objectMap, "provisioningState", r.ProvisioningState) @@ -24628,7 +24628,7 @@ func (r *RouteFilterPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RouteFilterRule. func (r RouteFilterRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", r.Etag) populate(objectMap, "id", r.ID) populate(objectMap, "location", r.Location) @@ -24671,7 +24671,7 @@ func (r *RouteFilterRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RouteFilterRuleListResult. func (r RouteFilterRuleListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", r.NextLink) populate(objectMap, "value", r.Value) return json.Marshal(objectMap) @@ -24702,7 +24702,7 @@ func (r *RouteFilterRuleListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RouteFilterRulePropertiesFormat. func (r RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "access", r.Access) populate(objectMap, "communities", r.Communities) populate(objectMap, "provisioningState", r.ProvisioningState) @@ -24741,7 +24741,7 @@ func (r *RouteFilterRulePropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RouteListResult. func (r RouteListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", r.NextLink) populate(objectMap, "value", r.Value) return json.Marshal(objectMap) @@ -24772,7 +24772,7 @@ func (r *RouteListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RouteMap. func (r RouteMap) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", r.Etag) populate(objectMap, "id", r.ID) populate(objectMap, "name", r.Name) @@ -24815,7 +24815,7 @@ func (r *RouteMap) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RouteMapProperties. func (r RouteMapProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "associatedInboundConnections", r.AssociatedInboundConnections) populate(objectMap, "associatedOutboundConnections", r.AssociatedOutboundConnections) populate(objectMap, "provisioningState", r.ProvisioningState) @@ -24854,7 +24854,7 @@ func (r *RouteMapProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RouteMapRule. func (r RouteMapRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "actions", r.Actions) populate(objectMap, "matchCriteria", r.MatchCriteria) populate(objectMap, "name", r.Name) @@ -24893,7 +24893,7 @@ func (r *RouteMapRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RoutePropertiesFormat. func (r RoutePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "addressPrefix", r.AddressPrefix) populate(objectMap, "hasBgpOverride", r.HasBgpOverride) populate(objectMap, "nextHopIpAddress", r.NextHopIPAddress) @@ -24936,7 +24936,7 @@ func (r *RoutePropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RouteTable. func (r RouteTable) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", r.Etag) populate(objectMap, "id", r.ID) populate(objectMap, "location", r.Location) @@ -24987,7 +24987,7 @@ func (r *RouteTable) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RouteTableListResult. func (r RouteTableListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", r.NextLink) populate(objectMap, "value", r.Value) return json.Marshal(objectMap) @@ -25018,7 +25018,7 @@ func (r *RouteTableListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RouteTablePropertiesFormat. func (r RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "disableBgpRoutePropagation", r.DisableBgpRoutePropagation) populate(objectMap, "provisioningState", r.ProvisioningState) populate(objectMap, "resourceGuid", r.ResourceGUID) @@ -25061,7 +25061,7 @@ func (r *RouteTablePropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RoutingConfiguration. func (r RoutingConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "associatedRouteTable", r.AssociatedRouteTable) populate(objectMap, "inboundRouteMap", r.InboundRouteMap) populate(objectMap, "outboundRouteMap", r.OutboundRouteMap) @@ -25104,7 +25104,7 @@ func (r *RoutingConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RoutingIntent. func (r RoutingIntent) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", r.Etag) populate(objectMap, "id", r.ID) populate(objectMap, "name", r.Name) @@ -25147,7 +25147,7 @@ func (r *RoutingIntent) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RoutingIntentProperties. func (r RoutingIntentProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "provisioningState", r.ProvisioningState) populate(objectMap, "routingPolicies", r.RoutingPolicies) return json.Marshal(objectMap) @@ -25178,7 +25178,7 @@ func (r *RoutingIntentProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RoutingPolicy. func (r RoutingPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "destinations", r.Destinations) populate(objectMap, "name", r.Name) populate(objectMap, "nextHop", r.NextHop) @@ -25213,7 +25213,7 @@ func (r *RoutingPolicy) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Rule. func (r Rule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", r.Description) populate(objectMap, "destinationAddresses", r.DestinationAddresses) populate(objectMap, "destinationFqdns", r.DestinationFqdns) @@ -25276,7 +25276,7 @@ func (r *Rule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SKU. func (s SKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", s.Name) return json.Marshal(objectMap) } @@ -25303,7 +25303,7 @@ func (s *SKU) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ScopeConnection. func (s ScopeConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", s.Etag) populate(objectMap, "id", s.ID) populate(objectMap, "name", s.Name) @@ -25350,7 +25350,7 @@ func (s *ScopeConnection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ScopeConnectionListResult. func (s ScopeConnectionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", s.NextLink) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) @@ -25381,7 +25381,7 @@ func (s *ScopeConnectionListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ScopeConnectionProperties. func (s ScopeConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "connectionState", s.ConnectionState) populate(objectMap, "description", s.Description) populate(objectMap, "resourceId", s.ResourceID) @@ -25420,7 +25420,7 @@ func (s *ScopeConnectionProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SecurityAdminConfiguration. func (s SecurityAdminConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", s.Etag) populate(objectMap, "id", s.ID) populate(objectMap, "name", s.Name) @@ -25467,7 +25467,7 @@ func (s *SecurityAdminConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SecurityAdminConfigurationListResult. func (s SecurityAdminConfigurationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", s.NextLink) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) @@ -25498,7 +25498,7 @@ func (s *SecurityAdminConfigurationListResult) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type SecurityAdminConfigurationPropertiesFormat. func (s SecurityAdminConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "applyOnNetworkIntentPolicyBasedServices", s.ApplyOnNetworkIntentPolicyBasedServices) populate(objectMap, "description", s.Description) populate(objectMap, "provisioningState", s.ProvisioningState) @@ -25533,7 +25533,7 @@ func (s *SecurityAdminConfigurationPropertiesFormat) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type SecurityGroup. func (s SecurityGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", s.Etag) populate(objectMap, "id", s.ID) populate(objectMap, "location", s.Location) @@ -25584,7 +25584,7 @@ func (s *SecurityGroup) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SecurityGroupListResult. func (s SecurityGroupListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", s.NextLink) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) @@ -25615,7 +25615,7 @@ func (s *SecurityGroupListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SecurityGroupNetworkInterface. func (s SecurityGroupNetworkInterface) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", s.ID) populate(objectMap, "securityRuleAssociations", s.SecurityRuleAssociations) return json.Marshal(objectMap) @@ -25646,7 +25646,7 @@ func (s *SecurityGroupNetworkInterface) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SecurityGroupPropertiesFormat. func (s SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "defaultSecurityRules", s.DefaultSecurityRules) populate(objectMap, "flowLogs", s.FlowLogs) populate(objectMap, "flushConnection", s.FlushConnection) @@ -25701,7 +25701,7 @@ func (s *SecurityGroupPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SecurityGroupResult. func (s SecurityGroupResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "evaluatedNetworkSecurityGroups", s.EvaluatedNetworkSecurityGroups) populate(objectMap, "securityRuleAccessResult", s.SecurityRuleAccessResult) return json.Marshal(objectMap) @@ -25732,7 +25732,7 @@ func (s *SecurityGroupResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SecurityGroupViewParameters. func (s SecurityGroupViewParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "targetResourceId", s.TargetResourceID) return json.Marshal(objectMap) } @@ -25759,7 +25759,7 @@ func (s *SecurityGroupViewParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SecurityGroupViewResult. func (s SecurityGroupViewResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "networkInterfaces", s.NetworkInterfaces) return json.Marshal(objectMap) } @@ -25786,7 +25786,7 @@ func (s *SecurityGroupViewResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SecurityPartnerProvider. func (s SecurityPartnerProvider) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", s.Etag) populate(objectMap, "id", s.ID) populate(objectMap, "location", s.Location) @@ -25837,7 +25837,7 @@ func (s *SecurityPartnerProvider) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SecurityPartnerProviderListResult. func (s SecurityPartnerProviderListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", s.NextLink) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) @@ -25868,7 +25868,7 @@ func (s *SecurityPartnerProviderListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SecurityPartnerProviderPropertiesFormat. func (s SecurityPartnerProviderPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "connectionStatus", s.ConnectionStatus) populate(objectMap, "provisioningState", s.ProvisioningState) populate(objectMap, "securityProviderName", s.SecurityProviderName) @@ -25907,7 +25907,7 @@ func (s *SecurityPartnerProviderPropertiesFormat) UnmarshalJSON(data []byte) err // MarshalJSON implements the json.Marshaller interface for type SecurityRule. func (s SecurityRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", s.Etag) populate(objectMap, "id", s.ID) populate(objectMap, "name", s.Name) @@ -25950,7 +25950,7 @@ func (s *SecurityRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SecurityRuleAssociations. func (s SecurityRuleAssociations) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "defaultSecurityRules", s.DefaultSecurityRules) populate(objectMap, "effectiveSecurityRules", s.EffectiveSecurityRules) populate(objectMap, "networkInterfaceAssociation", s.NetworkInterfaceAssociation) @@ -25989,7 +25989,7 @@ func (s *SecurityRuleAssociations) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SecurityRuleListResult. func (s SecurityRuleListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", s.NextLink) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) @@ -26020,7 +26020,7 @@ func (s *SecurityRuleListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SecurityRulePropertiesFormat. func (s SecurityRulePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "access", s.Access) populate(objectMap, "description", s.Description) populate(objectMap, "destinationAddressPrefix", s.DestinationAddressPrefix) @@ -26107,7 +26107,7 @@ func (s *SecurityRulePropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SecurityRulesEvaluationResult. func (s SecurityRulesEvaluationResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "destinationMatched", s.DestinationMatched) populate(objectMap, "destinationPortMatched", s.DestinationPortMatched) populate(objectMap, "name", s.Name) @@ -26154,7 +26154,7 @@ func (s *SecurityRulesEvaluationResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServiceAssociationLink. func (s ServiceAssociationLink) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", s.Etag) populate(objectMap, "id", s.ID) populate(objectMap, "name", s.Name) @@ -26197,7 +26197,7 @@ func (s *ServiceAssociationLink) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServiceAssociationLinkPropertiesFormat. func (s ServiceAssociationLinkPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "allowDelete", s.AllowDelete) populate(objectMap, "link", s.Link) populate(objectMap, "linkedResourceType", s.LinkedResourceType) @@ -26240,7 +26240,7 @@ func (s *ServiceAssociationLinkPropertiesFormat) UnmarshalJSON(data []byte) erro // MarshalJSON implements the json.Marshaller interface for type ServiceAssociationLinksListResult. func (s ServiceAssociationLinksListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", s.NextLink) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) @@ -26271,7 +26271,7 @@ func (s *ServiceAssociationLinksListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServiceDelegationPropertiesFormat. func (s ServiceDelegationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "actions", s.Actions) populate(objectMap, "provisioningState", s.ProvisioningState) populate(objectMap, "serviceName", s.ServiceName) @@ -26306,7 +26306,7 @@ func (s *ServiceDelegationPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPolicy. func (s ServiceEndpointPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", s.Etag) populate(objectMap, "id", s.ID) populate(objectMap, "kind", s.Kind) @@ -26361,7 +26361,7 @@ func (s *ServiceEndpointPolicy) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPolicyDefinition. func (s ServiceEndpointPolicyDefinition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", s.Etag) populate(objectMap, "id", s.ID) populate(objectMap, "name", s.Name) @@ -26404,7 +26404,7 @@ func (s *ServiceEndpointPolicyDefinition) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPolicyDefinitionListResult. func (s ServiceEndpointPolicyDefinitionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", s.NextLink) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) @@ -26435,7 +26435,7 @@ func (s *ServiceEndpointPolicyDefinitionListResult) UnmarshalJSON(data []byte) e // MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPolicyDefinitionPropertiesFormat. func (s ServiceEndpointPolicyDefinitionPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", s.Description) populate(objectMap, "provisioningState", s.ProvisioningState) populate(objectMap, "service", s.Service) @@ -26474,7 +26474,7 @@ func (s *ServiceEndpointPolicyDefinitionPropertiesFormat) UnmarshalJSON(data []b // MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPolicyListResult. func (s ServiceEndpointPolicyListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", s.NextLink) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) @@ -26505,7 +26505,7 @@ func (s *ServiceEndpointPolicyListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPolicyPropertiesFormat. func (s ServiceEndpointPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "contextualServiceEndpointPolicies", s.ContextualServiceEndpointPolicies) populate(objectMap, "provisioningState", s.ProvisioningState) populate(objectMap, "resourceGuid", s.ResourceGUID) @@ -26552,7 +26552,7 @@ func (s *ServiceEndpointPolicyPropertiesFormat) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPropertiesFormat. func (s ServiceEndpointPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "locations", s.Locations) populate(objectMap, "provisioningState", s.ProvisioningState) populate(objectMap, "service", s.Service) @@ -26587,7 +26587,7 @@ func (s *ServiceEndpointPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServiceTagInformation. func (s ServiceTagInformation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", s.ID) populate(objectMap, "name", s.Name) populate(objectMap, "properties", s.Properties) @@ -26626,7 +26626,7 @@ func (s *ServiceTagInformation) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServiceTagInformationListResult. func (s ServiceTagInformationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", s.NextLink) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) @@ -26657,7 +26657,7 @@ func (s *ServiceTagInformationListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServiceTagInformationPropertiesFormat. func (s ServiceTagInformationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "addressPrefixes", s.AddressPrefixes) populate(objectMap, "changeNumber", s.ChangeNumber) populate(objectMap, "region", s.Region) @@ -26700,7 +26700,7 @@ func (s *ServiceTagInformationPropertiesFormat) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type ServiceTagsListResult. func (s ServiceTagsListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "changeNumber", s.ChangeNumber) populate(objectMap, "cloud", s.Cloud) populate(objectMap, "id", s.ID) @@ -26751,7 +26751,7 @@ func (s *ServiceTagsListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SessionIDs. func (s SessionIDs) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "sessionIds", s.SessionIDs) return json.Marshal(objectMap) } @@ -26778,7 +26778,7 @@ func (s *SessionIDs) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SignatureOverridesFilterValuesQuery. func (s SignatureOverridesFilterValuesQuery) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "filterName", s.FilterName) return json.Marshal(objectMap) } @@ -26805,7 +26805,7 @@ func (s *SignatureOverridesFilterValuesQuery) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SignatureOverridesFilterValuesResponse. func (s SignatureOverridesFilterValuesResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "filterValues", s.FilterValues) return json.Marshal(objectMap) } @@ -26832,7 +26832,7 @@ func (s *SignatureOverridesFilterValuesResponse) UnmarshalJSON(data []byte) erro // MarshalJSON implements the json.Marshaller interface for type SignaturesOverrides. func (s SignaturesOverrides) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", s.ID) populate(objectMap, "name", s.Name) populate(objectMap, "properties", s.Properties) @@ -26871,7 +26871,7 @@ func (s *SignaturesOverrides) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SignaturesOverridesList. func (s SignaturesOverridesList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) } @@ -26898,7 +26898,7 @@ func (s *SignaturesOverridesList) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SignaturesOverridesProperties. func (s SignaturesOverridesProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "signatures", s.Signatures) return json.Marshal(objectMap) } @@ -26925,7 +26925,7 @@ func (s *SignaturesOverridesProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SingleQueryResult. func (s SingleQueryResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", s.Description) populate(objectMap, "destinationPorts", s.DestinationPorts) populate(objectMap, "direction", s.Direction) @@ -26992,7 +26992,7 @@ func (s *SingleQueryResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type StaticMember. func (s StaticMember) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", s.Etag) populate(objectMap, "id", s.ID) populate(objectMap, "name", s.Name) @@ -27039,7 +27039,7 @@ func (s *StaticMember) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type StaticMemberListResult. func (s StaticMemberListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", s.NextLink) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) @@ -27070,7 +27070,7 @@ func (s *StaticMemberListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type StaticMemberProperties. func (s StaticMemberProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "provisioningState", s.ProvisioningState) populate(objectMap, "region", s.Region) populate(objectMap, "resourceId", s.ResourceID) @@ -27105,7 +27105,7 @@ func (s *StaticMemberProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type StaticRoute. func (s StaticRoute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "addressPrefixes", s.AddressPrefixes) populate(objectMap, "name", s.Name) populate(objectMap, "nextHopIpAddress", s.NextHopIPAddress) @@ -27140,7 +27140,7 @@ func (s *StaticRoute) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type StaticRoutesConfig. func (s StaticRoutesConfig) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "propagateStaticRoutes", s.PropagateStaticRoutes) populate(objectMap, "vnetLocalRouteOverrideCriteria", s.VnetLocalRouteOverrideCriteria) return json.Marshal(objectMap) @@ -27171,7 +27171,7 @@ func (s *StaticRoutesConfig) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SubResource. func (s SubResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", s.ID) return json.Marshal(objectMap) } @@ -27198,7 +27198,7 @@ func (s *SubResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Subnet. func (s Subnet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", s.Etag) populate(objectMap, "id", s.ID) populate(objectMap, "name", s.Name) @@ -27241,7 +27241,7 @@ func (s *Subnet) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SubnetAssociation. func (s SubnetAssociation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", s.ID) populate(objectMap, "securityRules", s.SecurityRules) return json.Marshal(objectMap) @@ -27272,7 +27272,7 @@ func (s *SubnetAssociation) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SubnetListResult. func (s SubnetListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", s.NextLink) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) @@ -27303,7 +27303,7 @@ func (s *SubnetListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SubnetPropertiesFormat. func (s SubnetPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "addressPrefix", s.AddressPrefix) populate(objectMap, "addressPrefixes", s.AddressPrefixes) populate(objectMap, "applicationGatewayIpConfigurations", s.ApplicationGatewayIPConfigurations) @@ -27402,7 +27402,7 @@ func (s *SubnetPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SwapResource. func (s SwapResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", s.ID) populate(objectMap, "name", s.Name) populate(objectMap, "properties", s.Properties) @@ -27441,7 +27441,7 @@ func (s *SwapResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SwapResourceListResult. func (s SwapResourceListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) } @@ -27468,7 +27468,7 @@ func (s *SwapResourceListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SwapResourceProperties. func (s SwapResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "slotType", s.SlotType) return json.Marshal(objectMap) } @@ -27495,7 +27495,7 @@ func (s *SwapResourceProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SystemData. func (s SystemData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) populate(objectMap, "createdBy", s.CreatedBy) populate(objectMap, "createdByType", s.CreatedByType) @@ -27542,7 +27542,7 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TagsObject. func (t TagsObject) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "tags", t.Tags) return json.Marshal(objectMap) } @@ -27569,7 +27569,7 @@ func (t *TagsObject) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Topology. func (t Topology) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populateTimeRFC3339(objectMap, "createdDateTime", t.CreatedDateTime) populate(objectMap, "id", t.ID) populateTimeRFC3339(objectMap, "lastModified", t.LastModified) @@ -27608,7 +27608,7 @@ func (t *Topology) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TopologyAssociation. func (t TopologyAssociation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "associationType", t.AssociationType) populate(objectMap, "name", t.Name) populate(objectMap, "resourceId", t.ResourceID) @@ -27643,7 +27643,7 @@ func (t *TopologyAssociation) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TopologyParameters. func (t TopologyParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "targetResourceGroupName", t.TargetResourceGroupName) populate(objectMap, "targetSubnet", t.TargetSubnet) populate(objectMap, "targetVirtualNetwork", t.TargetVirtualNetwork) @@ -27678,7 +27678,7 @@ func (t *TopologyParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TopologyResource. func (t TopologyResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "associations", t.Associations) populate(objectMap, "id", t.ID) populate(objectMap, "location", t.Location) @@ -27717,7 +27717,7 @@ func (t *TopologyResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TrafficAnalyticsConfigurationProperties. func (t TrafficAnalyticsConfigurationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "enabled", t.Enabled) populate(objectMap, "trafficAnalyticsInterval", t.TrafficAnalyticsInterval) populate(objectMap, "workspaceId", t.WorkspaceID) @@ -27760,7 +27760,7 @@ func (t *TrafficAnalyticsConfigurationProperties) UnmarshalJSON(data []byte) err // MarshalJSON implements the json.Marshaller interface for type TrafficAnalyticsProperties. func (t TrafficAnalyticsProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "networkWatcherFlowAnalyticsConfiguration", t.NetworkWatcherFlowAnalyticsConfiguration) return json.Marshal(objectMap) } @@ -27787,7 +27787,7 @@ func (t *TrafficAnalyticsProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TrafficSelectorPolicy. func (t TrafficSelectorPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "localAddressRanges", t.LocalAddressRanges) populate(objectMap, "remoteAddressRanges", t.RemoteAddressRanges) return json.Marshal(objectMap) @@ -27818,7 +27818,7 @@ func (t *TrafficSelectorPolicy) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TroubleshootingDetails. func (t TroubleshootingDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "detail", t.Detail) populate(objectMap, "id", t.ID) populate(objectMap, "reasonType", t.ReasonType) @@ -27861,7 +27861,7 @@ func (t *TroubleshootingDetails) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TroubleshootingParameters. func (t TroubleshootingParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "properties", t.Properties) populate(objectMap, "targetResourceId", t.TargetResourceID) return json.Marshal(objectMap) @@ -27892,7 +27892,7 @@ func (t *TroubleshootingParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TroubleshootingProperties. func (t TroubleshootingProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "storageId", t.StorageID) populate(objectMap, "storagePath", t.StoragePath) return json.Marshal(objectMap) @@ -27923,7 +27923,7 @@ func (t *TroubleshootingProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TroubleshootingRecommendedActions. func (t TroubleshootingRecommendedActions) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "actionId", t.ActionID) populate(objectMap, "actionText", t.ActionText) populate(objectMap, "actionUri", t.ActionURI) @@ -27962,7 +27962,7 @@ func (t *TroubleshootingRecommendedActions) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TroubleshootingResult. func (t TroubleshootingResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "code", t.Code) populateTimeRFC3339(objectMap, "endTime", t.EndTime) populate(objectMap, "results", t.Results) @@ -28001,7 +28001,7 @@ func (t *TroubleshootingResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TunnelConnectionHealth. func (t TunnelConnectionHealth) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "connectionStatus", t.ConnectionStatus) populate(objectMap, "egressBytesTransferred", t.EgressBytesTransferred) populate(objectMap, "ingressBytesTransferred", t.IngressBytesTransferred) @@ -28044,7 +28044,7 @@ func (t *TunnelConnectionHealth) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type UnprepareNetworkPoliciesRequest. func (u UnprepareNetworkPoliciesRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "serviceName", u.ServiceName) return json.Marshal(objectMap) } @@ -28071,7 +28071,7 @@ func (u *UnprepareNetworkPoliciesRequest) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Usage. func (u Usage) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "currentValue", u.CurrentValue) populate(objectMap, "id", u.ID) populate(objectMap, "limit", u.Limit) @@ -28114,7 +28114,7 @@ func (u *Usage) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type UsageName. func (u UsageName) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "localizedValue", u.LocalizedValue) populate(objectMap, "value", u.Value) return json.Marshal(objectMap) @@ -28145,7 +28145,7 @@ func (u *UsageName) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type UsagesListResult. func (u UsagesListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", u.NextLink) populate(objectMap, "value", u.Value) return json.Marshal(objectMap) @@ -28176,7 +28176,7 @@ func (u *UsagesListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VM. func (v VM) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", v.ID) populate(objectMap, "location", v.Location) populate(objectMap, "name", v.Name) @@ -28219,7 +28219,7 @@ func (v *VM) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VPNClientConfiguration. func (v VPNClientConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "aadAudience", v.AADAudience) populate(objectMap, "aadIssuer", v.AADIssuer) populate(objectMap, "aadTenant", v.AADTenant) @@ -28294,7 +28294,7 @@ func (v *VPNClientConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VPNClientConnectionHealth. func (v VPNClientConnectionHealth) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "allocatedIpAddresses", v.AllocatedIPAddresses) populate(objectMap, "totalEgressBytesTransferred", v.TotalEgressBytesTransferred) populate(objectMap, "totalIngressBytesTransferred", v.TotalIngressBytesTransferred) @@ -28333,7 +28333,7 @@ func (v *VPNClientConnectionHealth) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VPNClientConnectionHealthDetail. func (v VPNClientConnectionHealthDetail) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "egressBytesTransferred", v.EgressBytesTransferred) populate(objectMap, "egressPacketsTransferred", v.EgressPacketsTransferred) populate(objectMap, "ingressBytesTransferred", v.IngressBytesTransferred) @@ -28404,7 +28404,7 @@ func (v *VPNClientConnectionHealthDetail) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VPNClientConnectionHealthDetailListResult. func (v VPNClientConnectionHealthDetailListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "value", v.Value) return json.Marshal(objectMap) } @@ -28431,7 +28431,7 @@ func (v *VPNClientConnectionHealthDetailListResult) UnmarshalJSON(data []byte) e // MarshalJSON implements the json.Marshaller interface for type VPNClientIPsecParameters. func (v VPNClientIPsecParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "dhGroup", v.DhGroup) populate(objectMap, "ipsecEncryption", v.IPSecEncryption) populate(objectMap, "ipsecIntegrity", v.IPSecIntegrity) @@ -28486,7 +28486,7 @@ func (v *VPNClientIPsecParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VPNClientParameters. func (v VPNClientParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "authenticationMethod", v.AuthenticationMethod) populate(objectMap, "clientRootCertificates", v.ClientRootCertificates) populate(objectMap, "processorArchitecture", v.ProcessorArchitecture) @@ -28525,7 +28525,7 @@ func (v *VPNClientParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VPNClientRevokedCertificate. func (v VPNClientRevokedCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", v.Etag) populate(objectMap, "id", v.ID) populate(objectMap, "name", v.Name) @@ -28564,7 +28564,7 @@ func (v *VPNClientRevokedCertificate) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VPNClientRevokedCertificatePropertiesFormat. func (v VPNClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "provisioningState", v.ProvisioningState) populate(objectMap, "thumbprint", v.Thumbprint) return json.Marshal(objectMap) @@ -28595,7 +28595,7 @@ func (v *VPNClientRevokedCertificatePropertiesFormat) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type VPNClientRootCertificate. func (v VPNClientRootCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", v.Etag) populate(objectMap, "id", v.ID) populate(objectMap, "name", v.Name) @@ -28634,7 +28634,7 @@ func (v *VPNClientRootCertificate) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VPNClientRootCertificatePropertiesFormat. func (v VPNClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "provisioningState", v.ProvisioningState) populate(objectMap, "publicCertData", v.PublicCertData) return json.Marshal(objectMap) @@ -28665,7 +28665,7 @@ func (v *VPNClientRootCertificatePropertiesFormat) UnmarshalJSON(data []byte) er // MarshalJSON implements the json.Marshaller interface for type VPNConnection. func (v VPNConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", v.Etag) populate(objectMap, "id", v.ID) populate(objectMap, "name", v.Name) @@ -28704,7 +28704,7 @@ func (v *VPNConnection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VPNConnectionPacketCaptureStartParameters. func (v VPNConnectionPacketCaptureStartParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "filterData", v.FilterData) populate(objectMap, "linkConnectionNames", v.LinkConnectionNames) return json.Marshal(objectMap) @@ -28735,7 +28735,7 @@ func (v *VPNConnectionPacketCaptureStartParameters) UnmarshalJSON(data []byte) e // MarshalJSON implements the json.Marshaller interface for type VPNConnectionPacketCaptureStopParameters. func (v VPNConnectionPacketCaptureStopParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "linkConnectionNames", v.LinkConnectionNames) populate(objectMap, "sasUrl", v.SasURL) return json.Marshal(objectMap) @@ -28766,7 +28766,7 @@ func (v *VPNConnectionPacketCaptureStopParameters) UnmarshalJSON(data []byte) er // MarshalJSON implements the json.Marshaller interface for type VPNConnectionProperties. func (v VPNConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "connectionBandwidth", v.ConnectionBandwidth) populate(objectMap, "connectionStatus", v.ConnectionStatus) populate(objectMap, "dpdTimeoutSeconds", v.DpdTimeoutSeconds) @@ -28865,7 +28865,7 @@ func (v *VPNConnectionProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VPNDeviceScriptParameters. func (v VPNDeviceScriptParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "deviceFamily", v.DeviceFamily) populate(objectMap, "firmwareVersion", v.FirmwareVersion) populate(objectMap, "vendor", v.Vendor) @@ -28900,7 +28900,7 @@ func (v *VPNDeviceScriptParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VPNGateway. func (v VPNGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", v.Etag) populate(objectMap, "id", v.ID) populate(objectMap, "location", v.Location) @@ -28951,7 +28951,7 @@ func (v *VPNGateway) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VPNGatewayIPConfiguration. func (v VPNGatewayIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", v.ID) populate(objectMap, "privateIpAddress", v.PrivateIPAddress) populate(objectMap, "publicIpAddress", v.PublicIPAddress) @@ -28986,7 +28986,7 @@ func (v *VPNGatewayIPConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VPNGatewayNatRule. func (v VPNGatewayNatRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", v.Etag) populate(objectMap, "id", v.ID) populate(objectMap, "name", v.Name) @@ -29029,7 +29029,7 @@ func (v *VPNGatewayNatRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VPNGatewayNatRuleProperties. func (v VPNGatewayNatRuleProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "egressVpnSiteLinkConnections", v.EgressVPNSiteLinkConnections) populate(objectMap, "externalMappings", v.ExternalMappings) populate(objectMap, "ipConfigurationId", v.IPConfigurationID) @@ -29084,7 +29084,7 @@ func (v *VPNGatewayNatRuleProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VPNGatewayPacketCaptureStartParameters. func (v VPNGatewayPacketCaptureStartParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "filterData", v.FilterData) return json.Marshal(objectMap) } @@ -29111,7 +29111,7 @@ func (v *VPNGatewayPacketCaptureStartParameters) UnmarshalJSON(data []byte) erro // MarshalJSON implements the json.Marshaller interface for type VPNGatewayPacketCaptureStopParameters. func (v VPNGatewayPacketCaptureStopParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "sasUrl", v.SasURL) return json.Marshal(objectMap) } @@ -29138,7 +29138,7 @@ func (v *VPNGatewayPacketCaptureStopParameters) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type VPNGatewayProperties. func (v VPNGatewayProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "bgpSettings", v.BgpSettings) populate(objectMap, "connections", v.Connections) populate(objectMap, "enableBgpRouteTranslationForNat", v.EnableBgpRouteTranslationForNat) @@ -29197,7 +29197,7 @@ func (v *VPNGatewayProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VPNLinkBgpSettings. func (v VPNLinkBgpSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "asn", v.Asn) populate(objectMap, "bgpPeeringAddress", v.BgpPeeringAddress) return json.Marshal(objectMap) @@ -29228,7 +29228,7 @@ func (v *VPNLinkBgpSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VPNLinkProviderProperties. func (v VPNLinkProviderProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "linkProviderName", v.LinkProviderName) populate(objectMap, "linkSpeedInMbps", v.LinkSpeedInMbps) return json.Marshal(objectMap) @@ -29259,7 +29259,7 @@ func (v *VPNLinkProviderProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VPNNatRuleMapping. func (v VPNNatRuleMapping) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "addressSpace", v.AddressSpace) populate(objectMap, "portRange", v.PortRange) return json.Marshal(objectMap) @@ -29290,7 +29290,7 @@ func (v *VPNNatRuleMapping) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VPNPacketCaptureStartParameters. func (v VPNPacketCaptureStartParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "filterData", v.FilterData) return json.Marshal(objectMap) } @@ -29317,7 +29317,7 @@ func (v *VPNPacketCaptureStartParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VPNPacketCaptureStopParameters. func (v VPNPacketCaptureStopParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "sasUrl", v.SasURL) return json.Marshal(objectMap) } @@ -29344,7 +29344,7 @@ func (v *VPNPacketCaptureStopParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VPNProfileResponse. func (v VPNProfileResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "profileUrl", v.ProfileURL) return json.Marshal(objectMap) } @@ -29371,7 +29371,7 @@ func (v *VPNProfileResponse) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VPNServerConfigRadiusClientRootCertificate. func (v VPNServerConfigRadiusClientRootCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", v.Name) populate(objectMap, "thumbprint", v.Thumbprint) return json.Marshal(objectMap) @@ -29402,7 +29402,7 @@ func (v *VPNServerConfigRadiusClientRootCertificate) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type VPNServerConfigRadiusServerRootCertificate. func (v VPNServerConfigRadiusServerRootCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", v.Name) populate(objectMap, "publicCertData", v.PublicCertData) return json.Marshal(objectMap) @@ -29433,7 +29433,7 @@ func (v *VPNServerConfigRadiusServerRootCertificate) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type VPNServerConfigVPNClientRevokedCertificate. func (v VPNServerConfigVPNClientRevokedCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", v.Name) populate(objectMap, "thumbprint", v.Thumbprint) return json.Marshal(objectMap) @@ -29464,7 +29464,7 @@ func (v *VPNServerConfigVPNClientRevokedCertificate) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type VPNServerConfigVPNClientRootCertificate. func (v VPNServerConfigVPNClientRootCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", v.Name) populate(objectMap, "publicCertData", v.PublicCertData) return json.Marshal(objectMap) @@ -29495,7 +29495,7 @@ func (v *VPNServerConfigVPNClientRootCertificate) UnmarshalJSON(data []byte) err // MarshalJSON implements the json.Marshaller interface for type VPNServerConfiguration. func (v VPNServerConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", v.Etag) populate(objectMap, "id", v.ID) populate(objectMap, "location", v.Location) @@ -29546,7 +29546,7 @@ func (v *VPNServerConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VPNServerConfigurationPolicyGroup. func (v VPNServerConfigurationPolicyGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", v.Etag) populate(objectMap, "id", v.ID) populate(objectMap, "name", v.Name) @@ -29589,7 +29589,7 @@ func (v *VPNServerConfigurationPolicyGroup) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VPNServerConfigurationPolicyGroupMember. func (v VPNServerConfigurationPolicyGroupMember) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "attributeType", v.AttributeType) populate(objectMap, "attributeValue", v.AttributeValue) populate(objectMap, "name", v.Name) @@ -29624,7 +29624,7 @@ func (v *VPNServerConfigurationPolicyGroupMember) UnmarshalJSON(data []byte) err // MarshalJSON implements the json.Marshaller interface for type VPNServerConfigurationPolicyGroupProperties. func (v VPNServerConfigurationPolicyGroupProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "isDefault", v.IsDefault) populate(objectMap, "p2SConnectionConfigurations", v.P2SConnectionConfigurations) populate(objectMap, "policyMembers", v.PolicyMembers) @@ -29667,7 +29667,7 @@ func (v *VPNServerConfigurationPolicyGroupProperties) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type VPNServerConfigurationProperties. func (v VPNServerConfigurationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "aadAuthenticationParameters", v.AADAuthenticationParameters) populate(objectMap, "configurationPolicyGroups", v.ConfigurationPolicyGroups) populate(objectMap, "etag", v.Etag) @@ -29754,7 +29754,7 @@ func (v *VPNServerConfigurationProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VPNServerConfigurationsResponse. func (v VPNServerConfigurationsResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "vpnServerConfigurationResourceIds", v.VPNServerConfigurationResourceIDs) return json.Marshal(objectMap) } @@ -29781,7 +29781,7 @@ func (v *VPNServerConfigurationsResponse) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VPNSite. func (v VPNSite) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", v.Etag) populate(objectMap, "id", v.ID) populate(objectMap, "location", v.Location) @@ -29832,7 +29832,7 @@ func (v *VPNSite) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VPNSiteID. func (v VPNSiteID) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "vpnSite", v.VPNSite) return json.Marshal(objectMap) } @@ -29859,7 +29859,7 @@ func (v *VPNSiteID) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VPNSiteLink. func (v VPNSiteLink) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", v.Etag) populate(objectMap, "id", v.ID) populate(objectMap, "name", v.Name) @@ -29902,7 +29902,7 @@ func (v *VPNSiteLink) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VPNSiteLinkConnection. func (v VPNSiteLinkConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", v.Etag) populate(objectMap, "id", v.ID) populate(objectMap, "name", v.Name) @@ -29945,7 +29945,7 @@ func (v *VPNSiteLinkConnection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VPNSiteLinkConnectionProperties. func (v VPNSiteLinkConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "connectionBandwidth", v.ConnectionBandwidth) populate(objectMap, "connectionStatus", v.ConnectionStatus) populate(objectMap, "egressBytesTransferred", v.EgressBytesTransferred) @@ -30040,7 +30040,7 @@ func (v *VPNSiteLinkConnectionProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VPNSiteLinkProperties. func (v VPNSiteLinkProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "bgpProperties", v.BgpProperties) populate(objectMap, "fqdn", v.Fqdn) populate(objectMap, "ipAddress", v.IPAddress) @@ -30083,7 +30083,7 @@ func (v *VPNSiteLinkProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VPNSiteProperties. func (v VPNSiteProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "addressSpace", v.AddressSpace) populate(objectMap, "bgpProperties", v.BgpProperties) populate(objectMap, "deviceProperties", v.DeviceProperties) @@ -30146,7 +30146,7 @@ func (v *VPNSiteProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VerificationIPFlowParameters. func (v VerificationIPFlowParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "direction", v.Direction) populate(objectMap, "localIPAddress", v.LocalIPAddress) populate(objectMap, "localPort", v.LocalPort) @@ -30201,7 +30201,7 @@ func (v *VerificationIPFlowParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VerificationIPFlowResult. func (v VerificationIPFlowResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "access", v.Access) populate(objectMap, "ruleName", v.RuleName) return json.Marshal(objectMap) @@ -30232,7 +30232,7 @@ func (v *VerificationIPFlowResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualAppliance. func (v VirtualAppliance) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", v.Etag) populate(objectMap, "id", v.ID) populate(objectMap, "identity", v.Identity) @@ -30287,7 +30287,7 @@ func (v *VirtualAppliance) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualApplianceListResult. func (v VirtualApplianceListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", v.NextLink) populate(objectMap, "value", v.Value) return json.Marshal(objectMap) @@ -30318,7 +30318,7 @@ func (v *VirtualApplianceListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualApplianceNicProperties. func (v VirtualApplianceNicProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", v.Name) populate(objectMap, "privateIpAddress", v.PrivateIPAddress) populate(objectMap, "publicIpAddress", v.PublicIPAddress) @@ -30353,7 +30353,7 @@ func (v *VirtualApplianceNicProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualAppliancePropertiesFormat. func (v VirtualAppliancePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "addressPrefix", v.AddressPrefix) populate(objectMap, "bootStrapConfigurationBlobs", v.BootStrapConfigurationBlobs) populate(objectMap, "cloudInitConfiguration", v.CloudInitConfiguration) @@ -30436,7 +30436,7 @@ func (v *VirtualAppliancePropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualApplianceSKU. func (v VirtualApplianceSKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", v.Etag) populate(objectMap, "id", v.ID) populate(objectMap, "location", v.Location) @@ -30487,7 +30487,7 @@ func (v *VirtualApplianceSKU) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualApplianceSKUInstances. func (v VirtualApplianceSKUInstances) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "instanceCount", v.InstanceCount) populate(objectMap, "scaleUnit", v.ScaleUnit) return json.Marshal(objectMap) @@ -30518,7 +30518,7 @@ func (v *VirtualApplianceSKUInstances) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualApplianceSKUListResult. func (v VirtualApplianceSKUListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", v.NextLink) populate(objectMap, "value", v.Value) return json.Marshal(objectMap) @@ -30549,7 +30549,7 @@ func (v *VirtualApplianceSKUListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualApplianceSKUProperties. func (v VirtualApplianceSKUProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "bundledScaleUnit", v.BundledScaleUnit) populate(objectMap, "marketPlaceVersion", v.MarketPlaceVersion) populate(objectMap, "vendor", v.Vendor) @@ -30584,7 +30584,7 @@ func (v *VirtualApplianceSKUProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualApplianceSKUPropertiesFormat. func (v VirtualApplianceSKUPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "availableScaleUnits", v.AvailableScaleUnits) populate(objectMap, "availableVersions", v.AvailableVersions) populate(objectMap, "vendor", v.Vendor) @@ -30619,7 +30619,7 @@ func (v *VirtualApplianceSKUPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualApplianceSite. func (v VirtualApplianceSite) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", v.Etag) populate(objectMap, "id", v.ID) populate(objectMap, "name", v.Name) @@ -30662,7 +30662,7 @@ func (v *VirtualApplianceSite) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualApplianceSiteListResult. func (v VirtualApplianceSiteListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", v.NextLink) populate(objectMap, "value", v.Value) return json.Marshal(objectMap) @@ -30693,7 +30693,7 @@ func (v *VirtualApplianceSiteListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualApplianceSiteProperties. func (v VirtualApplianceSiteProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "addressPrefix", v.AddressPrefix) populate(objectMap, "o365Policy", v.O365Policy) populate(objectMap, "provisioningState", v.ProvisioningState) @@ -30728,7 +30728,7 @@ func (v *VirtualApplianceSiteProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualHub. func (v VirtualHub) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", v.Etag) populate(objectMap, "id", v.ID) populate(objectMap, "kind", v.Kind) @@ -30783,7 +30783,7 @@ func (v *VirtualHub) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualHubEffectiveRoute. func (v VirtualHubEffectiveRoute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "addressPrefixes", v.AddressPrefixes) populate(objectMap, "asPath", v.AsPath) populate(objectMap, "nextHopType", v.NextHopType) @@ -30826,7 +30826,7 @@ func (v *VirtualHubEffectiveRoute) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualHubEffectiveRouteList. func (v VirtualHubEffectiveRouteList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "value", v.Value) return json.Marshal(objectMap) } @@ -30853,7 +30853,7 @@ func (v *VirtualHubEffectiveRouteList) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualHubID. func (v VirtualHubID) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", v.ID) return json.Marshal(objectMap) } @@ -30880,7 +30880,7 @@ func (v *VirtualHubID) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualHubProperties. func (v VirtualHubProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "addressPrefix", v.AddressPrefix) populate(objectMap, "allowBranchToBranchTraffic", v.AllowBranchToBranchTraffic) populate(objectMap, "azureFirewall", v.AzureFirewall) @@ -30991,7 +30991,7 @@ func (v *VirtualHubProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualHubRoute. func (v VirtualHubRoute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "addressPrefixes", v.AddressPrefixes) populate(objectMap, "nextHopIpAddress", v.NextHopIPAddress) return json.Marshal(objectMap) @@ -31022,7 +31022,7 @@ func (v *VirtualHubRoute) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualHubRouteTable. func (v VirtualHubRouteTable) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "routes", v.Routes) return json.Marshal(objectMap) } @@ -31049,7 +31049,7 @@ func (v *VirtualHubRouteTable) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualHubRouteTableV2. func (v VirtualHubRouteTableV2) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", v.Etag) populate(objectMap, "id", v.ID) populate(objectMap, "name", v.Name) @@ -31088,7 +31088,7 @@ func (v *VirtualHubRouteTableV2) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualHubRouteTableV2Properties. func (v VirtualHubRouteTableV2Properties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "attachedConnections", v.AttachedConnections) populate(objectMap, "provisioningState", v.ProvisioningState) populate(objectMap, "routes", v.Routes) @@ -31123,7 +31123,7 @@ func (v *VirtualHubRouteTableV2Properties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualHubRouteV2. func (v VirtualHubRouteV2) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "destinationType", v.DestinationType) populate(objectMap, "destinations", v.Destinations) populate(objectMap, "nextHopType", v.NextHopType) @@ -31162,7 +31162,7 @@ func (v *VirtualHubRouteV2) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualNetwork. func (v VirtualNetwork) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", v.Etag) populate(objectMap, "extendedLocation", v.ExtendedLocation) populate(objectMap, "id", v.ID) @@ -31217,7 +31217,7 @@ func (v *VirtualNetwork) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkBgpCommunities. func (v VirtualNetworkBgpCommunities) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "regionalCommunity", v.RegionalCommunity) populate(objectMap, "virtualNetworkCommunity", v.VirtualNetworkCommunity) return json.Marshal(objectMap) @@ -31248,7 +31248,7 @@ func (v *VirtualNetworkBgpCommunities) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkConnectionGatewayReference. func (v VirtualNetworkConnectionGatewayReference) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", v.ID) return json.Marshal(objectMap) } @@ -31275,7 +31275,7 @@ func (v *VirtualNetworkConnectionGatewayReference) UnmarshalJSON(data []byte) er // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkDdosProtectionStatusResult. func (v VirtualNetworkDdosProtectionStatusResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", v.NextLink) populate(objectMap, "value", v.Value) return json.Marshal(objectMap) @@ -31306,7 +31306,7 @@ func (v *VirtualNetworkDdosProtectionStatusResult) UnmarshalJSON(data []byte) er // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkEncryption. func (v VirtualNetworkEncryption) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "enabled", v.Enabled) populate(objectMap, "enforcement", v.Enforcement) return json.Marshal(objectMap) @@ -31337,7 +31337,7 @@ func (v *VirtualNetworkEncryption) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGateway. func (v VirtualNetworkGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", v.Etag) populate(objectMap, "extendedLocation", v.ExtendedLocation) populate(objectMap, "id", v.ID) @@ -31392,7 +31392,7 @@ func (v *VirtualNetworkGateway) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayConnection. func (v VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", v.Etag) populate(objectMap, "id", v.ID) populate(objectMap, "location", v.Location) @@ -31443,7 +31443,7 @@ func (v *VirtualNetworkGatewayConnection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayConnectionListEntity. func (v VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", v.Etag) populate(objectMap, "id", v.ID) populate(objectMap, "location", v.Location) @@ -31494,7 +31494,7 @@ func (v *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(data []byte) e // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayConnectionListEntityPropertiesFormat. func (v VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "authorizationKey", v.AuthorizationKey) populate(objectMap, "connectionMode", v.ConnectionMode) populate(objectMap, "connectionProtocol", v.ConnectionProtocol) @@ -31609,7 +31609,7 @@ func (v *VirtualNetworkGatewayConnectionListEntityPropertiesFormat) UnmarshalJSO // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayConnectionListResult. func (v VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", v.NextLink) populate(objectMap, "value", v.Value) return json.Marshal(objectMap) @@ -31640,7 +31640,7 @@ func (v *VirtualNetworkGatewayConnectionListResult) UnmarshalJSON(data []byte) e // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayConnectionPropertiesFormat. func (v VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "authorizationKey", v.AuthorizationKey) populate(objectMap, "connectionMode", v.ConnectionMode) populate(objectMap, "connectionProtocol", v.ConnectionProtocol) @@ -31771,7 +31771,7 @@ func (v *VirtualNetworkGatewayConnectionPropertiesFormat) UnmarshalJSON(data []b // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayIPConfiguration. func (v VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", v.Etag) populate(objectMap, "id", v.ID) populate(objectMap, "name", v.Name) @@ -31810,7 +31810,7 @@ func (v *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayIPConfigurationPropertiesFormat. func (v VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "privateIPAddress", v.PrivateIPAddress) populate(objectMap, "privateIPAllocationMethod", v.PrivateIPAllocationMethod) populate(objectMap, "provisioningState", v.ProvisioningState) @@ -31853,7 +31853,7 @@ func (v *VirtualNetworkGatewayIPConfigurationPropertiesFormat) UnmarshalJSON(dat // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayListConnectionsResult. func (v VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", v.NextLink) populate(objectMap, "value", v.Value) return json.Marshal(objectMap) @@ -31884,7 +31884,7 @@ func (v *VirtualNetworkGatewayListConnectionsResult) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayListResult. func (v VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", v.NextLink) populate(objectMap, "value", v.Value) return json.Marshal(objectMap) @@ -31915,7 +31915,7 @@ func (v *VirtualNetworkGatewayListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayNatRule. func (v VirtualNetworkGatewayNatRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", v.Etag) populate(objectMap, "id", v.ID) populate(objectMap, "name", v.Name) @@ -31958,7 +31958,7 @@ func (v *VirtualNetworkGatewayNatRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayNatRuleProperties. func (v VirtualNetworkGatewayNatRuleProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "externalMappings", v.ExternalMappings) populate(objectMap, "ipConfigurationId", v.IPConfigurationID) populate(objectMap, "internalMappings", v.InternalMappings) @@ -32005,7 +32005,7 @@ func (v *VirtualNetworkGatewayNatRuleProperties) UnmarshalJSON(data []byte) erro // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayPolicyGroup. func (v VirtualNetworkGatewayPolicyGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", v.Etag) populate(objectMap, "id", v.ID) populate(objectMap, "name", v.Name) @@ -32044,7 +32044,7 @@ func (v *VirtualNetworkGatewayPolicyGroup) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayPolicyGroupMember. func (v VirtualNetworkGatewayPolicyGroupMember) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "attributeType", v.AttributeType) populate(objectMap, "attributeValue", v.AttributeValue) populate(objectMap, "name", v.Name) @@ -32079,7 +32079,7 @@ func (v *VirtualNetworkGatewayPolicyGroupMember) UnmarshalJSON(data []byte) erro // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayPolicyGroupProperties. func (v VirtualNetworkGatewayPolicyGroupProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "isDefault", v.IsDefault) populate(objectMap, "policyMembers", v.PolicyMembers) populate(objectMap, "priority", v.Priority) @@ -32122,7 +32122,7 @@ func (v *VirtualNetworkGatewayPolicyGroupProperties) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayPropertiesFormat. func (v VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "activeActive", v.Active) populate(objectMap, "allowRemoteVnetTraffic", v.AllowRemoteVnetTraffic) populate(objectMap, "allowVirtualWanTraffic", v.AllowVirtualWanTraffic) @@ -32237,7 +32237,7 @@ func (v *VirtualNetworkGatewayPropertiesFormat) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewaySKU. func (v VirtualNetworkGatewaySKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "capacity", v.Capacity) populate(objectMap, "name", v.Name) populate(objectMap, "tier", v.Tier) @@ -32272,7 +32272,7 @@ func (v *VirtualNetworkGatewaySKU) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkListResult. func (v VirtualNetworkListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", v.NextLink) populate(objectMap, "value", v.Value) return json.Marshal(objectMap) @@ -32303,7 +32303,7 @@ func (v *VirtualNetworkListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkListUsageResult. func (v VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", v.NextLink) populate(objectMap, "value", v.Value) return json.Marshal(objectMap) @@ -32334,7 +32334,7 @@ func (v *VirtualNetworkListUsageResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkPeering. func (v VirtualNetworkPeering) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", v.Etag) populate(objectMap, "id", v.ID) populate(objectMap, "name", v.Name) @@ -32377,7 +32377,7 @@ func (v *VirtualNetworkPeering) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkPeeringListResult. func (v VirtualNetworkPeeringListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", v.NextLink) populate(objectMap, "value", v.Value) return json.Marshal(objectMap) @@ -32408,7 +32408,7 @@ func (v *VirtualNetworkPeeringListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkPeeringPropertiesFormat. func (v VirtualNetworkPeeringPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "allowForwardedTraffic", v.AllowForwardedTraffic) populate(objectMap, "allowGatewayTransit", v.AllowGatewayTransit) populate(objectMap, "allowVirtualNetworkAccess", v.AllowVirtualNetworkAccess) @@ -32487,7 +32487,7 @@ func (v *VirtualNetworkPeeringPropertiesFormat) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkPropertiesFormat. func (v VirtualNetworkPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "addressSpace", v.AddressSpace) populate(objectMap, "bgpCommunities", v.BgpCommunities) populate(objectMap, "ddosProtectionPlan", v.DdosProtectionPlan) @@ -32562,7 +32562,7 @@ func (v *VirtualNetworkPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkTap. func (v VirtualNetworkTap) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", v.Etag) populate(objectMap, "id", v.ID) populate(objectMap, "location", v.Location) @@ -32613,7 +32613,7 @@ func (v *VirtualNetworkTap) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkTapListResult. func (v VirtualNetworkTapListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", v.NextLink) populate(objectMap, "value", v.Value) return json.Marshal(objectMap) @@ -32644,7 +32644,7 @@ func (v *VirtualNetworkTapListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkTapPropertiesFormat. func (v VirtualNetworkTapPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "destinationLoadBalancerFrontEndIPConfiguration", v.DestinationLoadBalancerFrontEndIPConfiguration) populate(objectMap, "destinationNetworkInterfaceIPConfiguration", v.DestinationNetworkInterfaceIPConfiguration) populate(objectMap, "destinationPort", v.DestinationPort) @@ -32691,7 +32691,7 @@ func (v *VirtualNetworkTapPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkUsage. func (v VirtualNetworkUsage) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "currentValue", v.CurrentValue) populate(objectMap, "id", v.ID) populate(objectMap, "limit", v.Limit) @@ -32734,7 +32734,7 @@ func (v *VirtualNetworkUsage) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkUsageName. func (v VirtualNetworkUsageName) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "localizedValue", v.LocalizedValue) populate(objectMap, "value", v.Value) return json.Marshal(objectMap) @@ -32765,7 +32765,7 @@ func (v *VirtualNetworkUsageName) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualRouter. func (v VirtualRouter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", v.Etag) populate(objectMap, "id", v.ID) populate(objectMap, "location", v.Location) @@ -32816,7 +32816,7 @@ func (v *VirtualRouter) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualRouterAutoScaleConfiguration. func (v VirtualRouterAutoScaleConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "minCapacity", v.MinCapacity) return json.Marshal(objectMap) } @@ -32843,7 +32843,7 @@ func (v *VirtualRouterAutoScaleConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualRouterListResult. func (v VirtualRouterListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", v.NextLink) populate(objectMap, "value", v.Value) return json.Marshal(objectMap) @@ -32874,7 +32874,7 @@ func (v *VirtualRouterListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualRouterPeering. func (v VirtualRouterPeering) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", v.Etag) populate(objectMap, "id", v.ID) populate(objectMap, "name", v.Name) @@ -32917,7 +32917,7 @@ func (v *VirtualRouterPeering) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualRouterPeeringListResult. func (v VirtualRouterPeeringListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", v.NextLink) populate(objectMap, "value", v.Value) return json.Marshal(objectMap) @@ -32948,7 +32948,7 @@ func (v *VirtualRouterPeeringListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualRouterPeeringProperties. func (v VirtualRouterPeeringProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "peerAsn", v.PeerAsn) populate(objectMap, "peerIp", v.PeerIP) populate(objectMap, "provisioningState", v.ProvisioningState) @@ -32983,7 +32983,7 @@ func (v *VirtualRouterPeeringProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualRouterPropertiesFormat. func (v VirtualRouterPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "hostedGateway", v.HostedGateway) populate(objectMap, "hostedSubnet", v.HostedSubnet) populate(objectMap, "peerings", v.Peerings) @@ -33030,7 +33030,7 @@ func (v *VirtualRouterPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualWAN. func (v VirtualWAN) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", v.Etag) populate(objectMap, "id", v.ID) populate(objectMap, "location", v.Location) @@ -33081,7 +33081,7 @@ func (v *VirtualWAN) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualWanProperties. func (v VirtualWanProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "allowBranchToBranchTraffic", v.AllowBranchToBranchTraffic) populate(objectMap, "allowVnetToVnetTraffic", v.AllowVnetToVnetTraffic) populate(objectMap, "disableVpnEncryption", v.DisableVPNEncryption) @@ -33136,7 +33136,7 @@ func (v *VirtualWanProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualWanSecurityProvider. func (v VirtualWanSecurityProvider) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", v.Name) populate(objectMap, "type", v.Type) populate(objectMap, "url", v.URL) @@ -33171,7 +33171,7 @@ func (v *VirtualWanSecurityProvider) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualWanSecurityProviders. func (v VirtualWanSecurityProviders) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "supportedProviders", v.SupportedProviders) return json.Marshal(objectMap) } @@ -33198,7 +33198,7 @@ func (v *VirtualWanSecurityProviders) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualWanVPNProfileParameters. func (v VirtualWanVPNProfileParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "authenticationMethod", v.AuthenticationMethod) populate(objectMap, "vpnServerConfigurationResourceId", v.VPNServerConfigurationResourceID) return json.Marshal(objectMap) @@ -33229,7 +33229,7 @@ func (v *VirtualWanVPNProfileParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VnetRoute. func (v VnetRoute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "bgpConnections", v.BgpConnections) populate(objectMap, "staticRoutes", v.StaticRoutes) populate(objectMap, "staticRoutesConfig", v.StaticRoutesConfig) @@ -33264,7 +33264,7 @@ func (v *VnetRoute) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VngClientConnectionConfiguration. func (v VngClientConnectionConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", v.Etag) populate(objectMap, "id", v.ID) populate(objectMap, "name", v.Name) @@ -33303,7 +33303,7 @@ func (v *VngClientConnectionConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VngClientConnectionConfigurationProperties. func (v VngClientConnectionConfigurationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "provisioningState", v.ProvisioningState) populate(objectMap, "vpnClientAddressPool", v.VPNClientAddressPool) populate(objectMap, "virtualNetworkGatewayPolicyGroups", v.VirtualNetworkGatewayPolicyGroups) @@ -33338,7 +33338,7 @@ func (v *VngClientConnectionConfigurationProperties) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type Watcher. func (w Watcher) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", w.Etag) populate(objectMap, "id", w.ID) populate(objectMap, "location", w.Location) @@ -33389,7 +33389,7 @@ func (w *Watcher) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type WatcherListResult. func (w WatcherListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "value", w.Value) return json.Marshal(objectMap) } @@ -33416,7 +33416,7 @@ func (w *WatcherListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type WatcherPropertiesFormat. func (w WatcherPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "provisioningState", w.ProvisioningState) return json.Marshal(objectMap) } @@ -33443,7 +33443,7 @@ func (w *WatcherPropertiesFormat) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallCustomRule. func (w WebApplicationFirewallCustomRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "action", w.Action) populate(objectMap, "etag", w.Etag) populate(objectMap, "matchConditions", w.MatchConditions) @@ -33490,7 +33490,7 @@ func (w *WebApplicationFirewallCustomRule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallPolicy. func (w WebApplicationFirewallPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "etag", w.Etag) populate(objectMap, "id", w.ID) populate(objectMap, "location", w.Location) @@ -33541,7 +33541,7 @@ func (w *WebApplicationFirewallPolicy) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallPolicyListResult. func (w WebApplicationFirewallPolicyListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", w.NextLink) populate(objectMap, "value", w.Value) return json.Marshal(objectMap) @@ -33572,7 +33572,7 @@ func (w *WebApplicationFirewallPolicyListResult) UnmarshalJSON(data []byte) erro // MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallPolicyPropertiesFormat. func (w WebApplicationFirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "applicationGateways", w.ApplicationGateways) populate(objectMap, "customRules", w.CustomRules) populate(objectMap, "httpListeners", w.HTTPListeners) @@ -33625,7 +33625,7 @@ func (w *WebApplicationFirewallPolicyPropertiesFormat) UnmarshalJSON(data []byte return nil } -func populate(m map[string]interface{}, k string, v interface{}) { +func populate(m map[string]any, k string, v any) { if v == nil { return } else if azcore.IsNullValue(v) { @@ -33635,7 +33635,7 @@ func populate(m map[string]interface{}, k string, v interface{}) { } } -func unpopulate(data json.RawMessage, fn string, v interface{}) error { +func unpopulate(data json.RawMessage, fn string, v any) error { if data == nil { return nil } diff --git a/sdk/resourcemanager/network/armnetwork/natgateways_client.go b/sdk/resourcemanager/network/armnetwork/natgateways_client.go index 0161f017f4e6..ada0d7f8a2f6 100644 --- a/sdk/resourcemanager/network/armnetwork/natgateways_client.go +++ b/sdk/resourcemanager/network/armnetwork/natgateways_client.go @@ -32,10 +32,10 @@ type NatGatewaysClient struct { } // NewNatGatewaysClient creates a new instance of NatGatewaysClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewNatGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NatGatewaysClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewNatGatewaysClient(subscriptionID string, credential azcore.TokenCredenti // BeginCreateOrUpdate - Creates or updates a nat gateway. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// natGatewayName - The name of the nat gateway. -// parameters - Parameters supplied to the create or update nat gateway operation. -// options - NatGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the NatGatewaysClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - natGatewayName - The name of the nat gateway. +// - parameters - Parameters supplied to the create or update nat gateway operation. +// - options - NatGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the NatGatewaysClient.BeginCreateOrUpdate +// method. func (client *NatGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, natGatewayName string, parameters NatGateway, options *NatGatewaysClientBeginCreateOrUpdateOptions) (*runtime.Poller[NatGatewaysClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, natGatewayName, parameters, options) @@ -80,6 +81,7 @@ func (client *NatGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resour // CreateOrUpdate - Creates or updates a nat gateway. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *NatGatewaysClient) createOrUpdate(ctx context.Context, resourceGroupName string, natGatewayName string, parameters NatGateway, options *NatGatewaysClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, natGatewayName, parameters, options) @@ -124,10 +126,11 @@ func (client *NatGatewaysClient) createOrUpdateCreateRequest(ctx context.Context // BeginDelete - Deletes the specified nat gateway. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// natGatewayName - The name of the nat gateway. -// options - NatGatewaysClientBeginDeleteOptions contains the optional parameters for the NatGatewaysClient.BeginDelete method. +// - resourceGroupName - The name of the resource group. +// - natGatewayName - The name of the nat gateway. +// - options - NatGatewaysClientBeginDeleteOptions contains the optional parameters for the NatGatewaysClient.BeginDelete method. func (client *NatGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, natGatewayName string, options *NatGatewaysClientBeginDeleteOptions) (*runtime.Poller[NatGatewaysClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, natGatewayName, options) @@ -144,6 +147,7 @@ func (client *NatGatewaysClient) BeginDelete(ctx context.Context, resourceGroupN // Delete - Deletes the specified nat gateway. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *NatGatewaysClient) deleteOperation(ctx context.Context, resourceGroupName string, natGatewayName string, options *NatGatewaysClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, natGatewayName, options) @@ -188,10 +192,11 @@ func (client *NatGatewaysClient) deleteCreateRequest(ctx context.Context, resour // Get - Gets the specified nat gateway in a specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// natGatewayName - The name of the nat gateway. -// options - NatGatewaysClientGetOptions contains the optional parameters for the NatGatewaysClient.Get method. +// - resourceGroupName - The name of the resource group. +// - natGatewayName - The name of the nat gateway. +// - options - NatGatewaysClientGetOptions contains the optional parameters for the NatGatewaysClient.Get method. func (client *NatGatewaysClient) Get(ctx context.Context, resourceGroupName string, natGatewayName string, options *NatGatewaysClientGetOptions) (NatGatewaysClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, natGatewayName, options) if err != nil { @@ -246,9 +251,10 @@ func (client *NatGatewaysClient) getHandleResponse(resp *http.Response) (NatGate } // NewListPager - Gets all nat gateways in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - NatGatewaysClientListOptions contains the optional parameters for the NatGatewaysClient.List method. +// - resourceGroupName - The name of the resource group. +// - options - NatGatewaysClientListOptions contains the optional parameters for the NatGatewaysClient.NewListPager method. func (client *NatGatewaysClient) NewListPager(resourceGroupName string, options *NatGatewaysClientListOptions) *runtime.Pager[NatGatewaysClientListResponse] { return runtime.NewPager(runtime.PagingHandler[NatGatewaysClientListResponse]{ More: func(page NatGatewaysClientListResponse) bool { @@ -309,8 +315,9 @@ func (client *NatGatewaysClient) listHandleResponse(resp *http.Response) (NatGat } // NewListAllPager - Gets all the Nat Gateways in a subscription. +// // Generated from API version 2022-07-01 -// options - NatGatewaysClientListAllOptions contains the optional parameters for the NatGatewaysClient.ListAll method. +// - options - NatGatewaysClientListAllOptions contains the optional parameters for the NatGatewaysClient.NewListAllPager method. func (client *NatGatewaysClient) NewListAllPager(options *NatGatewaysClientListAllOptions) *runtime.Pager[NatGatewaysClientListAllResponse] { return runtime.NewPager(runtime.PagingHandler[NatGatewaysClientListAllResponse]{ More: func(page NatGatewaysClientListAllResponse) bool { @@ -368,11 +375,12 @@ func (client *NatGatewaysClient) listAllHandleResponse(resp *http.Response) (Nat // UpdateTags - Updates nat gateway tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// natGatewayName - The name of the nat gateway. -// parameters - Parameters supplied to update nat gateway tags. -// options - NatGatewaysClientUpdateTagsOptions contains the optional parameters for the NatGatewaysClient.UpdateTags method. +// - resourceGroupName - The name of the resource group. +// - natGatewayName - The name of the nat gateway. +// - parameters - Parameters supplied to update nat gateway tags. +// - options - NatGatewaysClientUpdateTagsOptions contains the optional parameters for the NatGatewaysClient.UpdateTags method. func (client *NatGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, natGatewayName string, parameters TagsObject, options *NatGatewaysClientUpdateTagsOptions) (NatGatewaysClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, natGatewayName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/natgateways_client_example_test.go b/sdk/resourcemanager/network/armnetwork/natgateways_client_example_test.go deleted file mode 100644 index 5a2886eaf132..000000000000 --- a/sdk/resourcemanager/network/armnetwork/natgateways_client_example_test.go +++ /dev/null @@ -1,168 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NatGatewayDelete.json -func ExampleNatGatewaysClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewNatGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "test-natGateway", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NatGatewayGet.json -func ExampleNatGatewaysClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewNatGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "test-natGateway", &armnetwork.NatGatewaysClientGetOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NatGatewayCreateOrUpdate.json -func ExampleNatGatewaysClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewNatGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "test-natgateway", armnetwork.NatGateway{ - Location: to.Ptr("westus"), - Properties: &armnetwork.NatGatewayPropertiesFormat{ - PublicIPAddresses: []*armnetwork.SubResource{ - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/PublicIpAddress1"), - }}, - PublicIPPrefixes: []*armnetwork.SubResource{ - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/PublicIpPrefix1"), - }}, - }, - SKU: &armnetwork.NatGatewaySKU{ - Name: to.Ptr(armnetwork.NatGatewaySKUNameStandard), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NatGatewayUpdateTags.json -func ExampleNatGatewaysClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewNatGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, "rg1", "test-natGateway", armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NatGatewayListAll.json -func ExampleNatGatewaysClient_NewListAllPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewNatGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListAllPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NatGatewayList.json -func ExampleNatGatewaysClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewNatGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/natrules_client.go b/sdk/resourcemanager/network/armnetwork/natrules_client.go index 8fcc8a3bce35..389bd917ef2e 100644 --- a/sdk/resourcemanager/network/armnetwork/natrules_client.go +++ b/sdk/resourcemanager/network/armnetwork/natrules_client.go @@ -32,10 +32,10 @@ type NatRulesClient struct { } // NewNatRulesClient creates a new instance of NatRulesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewNatRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NatRulesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewNatRulesClient(subscriptionID string, credential azcore.TokenCredential, // BeginCreateOrUpdate - Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VpnGateway. -// gatewayName - The name of the gateway. -// natRuleName - The name of the nat rule. -// natRuleParameters - Parameters supplied to create or Update a Nat Rule. -// options - NatRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the NatRulesClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - natRuleName - The name of the nat rule. +// - natRuleParameters - Parameters supplied to create or Update a Nat Rule. +// - options - NatRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the NatRulesClient.BeginCreateOrUpdate +// method. func (client *NatRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string, natRuleParameters VPNGatewayNatRule, options *NatRulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[NatRulesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, gatewayName, natRuleName, natRuleParameters, options) @@ -81,6 +82,7 @@ func (client *NatRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceG // CreateOrUpdate - Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *NatRulesClient) createOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string, natRuleParameters VPNGatewayNatRule, options *NatRulesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, gatewayName, natRuleName, natRuleParameters, options) @@ -129,11 +131,12 @@ func (client *NatRulesClient) createOrUpdateCreateRequest(ctx context.Context, r // BeginDelete - Deletes a nat rule. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VpnGateway. -// gatewayName - The name of the gateway. -// natRuleName - The name of the nat rule. -// options - NatRulesClientBeginDeleteOptions contains the optional parameters for the NatRulesClient.BeginDelete method. +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - natRuleName - The name of the nat rule. +// - options - NatRulesClientBeginDeleteOptions contains the optional parameters for the NatRulesClient.BeginDelete method. func (client *NatRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string, options *NatRulesClientBeginDeleteOptions) (*runtime.Poller[NatRulesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, gatewayName, natRuleName, options) @@ -150,6 +153,7 @@ func (client *NatRulesClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Deletes a nat rule. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *NatRulesClient) deleteOperation(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string, options *NatRulesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, gatewayName, natRuleName, options) @@ -198,11 +202,12 @@ func (client *NatRulesClient) deleteCreateRequest(ctx context.Context, resourceG // Get - Retrieves the details of a nat ruleGet. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VpnGateway. -// gatewayName - The name of the gateway. -// natRuleName - The name of the nat rule. -// options - NatRulesClientGetOptions contains the optional parameters for the NatRulesClient.Get method. +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - natRuleName - The name of the nat rule. +// - options - NatRulesClientGetOptions contains the optional parameters for the NatRulesClient.Get method. func (client *NatRulesClient) Get(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string, options *NatRulesClientGetOptions) (NatRulesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, gatewayName, natRuleName, options) if err != nil { @@ -258,11 +263,12 @@ func (client *NatRulesClient) getHandleResponse(resp *http.Response) (NatRulesCl } // NewListByVPNGatewayPager - Retrieves all nat rules for a particular virtual wan vpn gateway. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VpnGateway. -// gatewayName - The name of the gateway. -// options - NatRulesClientListByVPNGatewayOptions contains the optional parameters for the NatRulesClient.ListByVPNGateway -// method. +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - options - NatRulesClientListByVPNGatewayOptions contains the optional parameters for the NatRulesClient.NewListByVPNGatewayPager +// method. func (client *NatRulesClient) NewListByVPNGatewayPager(resourceGroupName string, gatewayName string, options *NatRulesClientListByVPNGatewayOptions) *runtime.Pager[NatRulesClientListByVPNGatewayResponse] { return runtime.NewPager(runtime.PagingHandler[NatRulesClientListByVPNGatewayResponse]{ More: func(page NatRulesClientListByVPNGatewayResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/natrules_client_example_test.go b/sdk/resourcemanager/network/armnetwork/natrules_client_example_test.go deleted file mode 100644 index 7b182c82f105..000000000000 --- a/sdk/resourcemanager/network/armnetwork/natrules_client_example_test.go +++ /dev/null @@ -1,119 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NatRuleGet.json -func ExampleNatRulesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewNatRulesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "gateway1", "natRule1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NatRulePut.json -func ExampleNatRulesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewNatRulesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "gateway1", "natRule1", armnetwork.VPNGatewayNatRule{ - Properties: &armnetwork.VPNGatewayNatRuleProperties{ - Type: to.Ptr(armnetwork.VPNNatRuleTypeStatic), - ExternalMappings: []*armnetwork.VPNNatRuleMapping{ - { - AddressSpace: to.Ptr("192.168.21.0/24"), - }}, - InternalMappings: []*armnetwork.VPNNatRuleMapping{ - { - AddressSpace: to.Ptr("10.4.0.0/24"), - }}, - IPConfigurationID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/cloudnet1-VNG/ipConfigurations/default"), - Mode: to.Ptr(armnetwork.VPNNatRuleModeEgressSnat), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NatRuleDelete.json -func ExampleNatRulesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewNatRulesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "gateway1", "natRule1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NatRuleList.json -func ExampleNatRulesClient_NewListByVPNGatewayPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewNatRulesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByVPNGatewayPager("rg1", "gateway1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/operations_client.go b/sdk/resourcemanager/network/armnetwork/operations_client.go index 81f4179ddc9a..3d29c9d66358 100644 --- a/sdk/resourcemanager/network/armnetwork/operations_client.go +++ b/sdk/resourcemanager/network/armnetwork/operations_client.go @@ -28,8 +28,8 @@ type OperationsClient struct { } // NewOperationsClient creates a new instance of OperationsClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -50,8 +50,9 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO } // NewListPager - Lists all of the available Network Rest API operations. +// // Generated from API version 2022-07-01 -// options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. +// - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ More: func(page OperationsClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/operations_client_example_test.go b/sdk/resourcemanager/network/armnetwork/operations_client_example_test.go deleted file mode 100644 index fb2b5612c0ac..000000000000 --- a/sdk/resourcemanager/network/armnetwork/operations_client_example_test.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/OperationList.json -func ExampleOperationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewOperationsClient(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/p2svpngateways_client.go b/sdk/resourcemanager/network/armnetwork/p2svpngateways_client.go index 4849d5e50148..477ac51b70a4 100644 --- a/sdk/resourcemanager/network/armnetwork/p2svpngateways_client.go +++ b/sdk/resourcemanager/network/armnetwork/p2svpngateways_client.go @@ -32,10 +32,10 @@ type P2SVPNGatewaysClient struct { } // NewP2SVPNGatewaysClient creates a new instance of P2SVPNGatewaysClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewP2SVPNGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*P2SVPNGatewaysClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewP2SVPNGatewaysClient(subscriptionID string, credential azcore.TokenCrede // BeginCreateOrUpdate - Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the P2SVpnGateway. -// gatewayName - The name of the gateway. -// p2SVPNGatewayParameters - Parameters supplied to create or Update a virtual wan p2s vpn gateway. -// options - P2SVPNGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The resource group name of the P2SVpnGateway. +// - gatewayName - The name of the gateway. +// - p2SVPNGatewayParameters - Parameters supplied to create or Update a virtual wan p2s vpn gateway. +// - options - P2SVPNGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginCreateOrUpdate +// method. func (client *P2SVPNGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, p2SVPNGatewayParameters P2SVPNGateway, options *P2SVPNGatewaysClientBeginCreateOrUpdateOptions) (*runtime.Poller[P2SVPNGatewaysClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, gatewayName, p2SVPNGatewayParameters, options) @@ -80,6 +81,7 @@ func (client *P2SVPNGatewaysClient) BeginCreateOrUpdate(ctx context.Context, res // CreateOrUpdate - Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *P2SVPNGatewaysClient) createOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, p2SVPNGatewayParameters P2SVPNGateway, options *P2SVPNGatewaysClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, gatewayName, p2SVPNGatewayParameters, options) @@ -124,11 +126,12 @@ func (client *P2SVPNGatewaysClient) createOrUpdateCreateRequest(ctx context.Cont // BeginDelete - Deletes a virtual wan p2s vpn gateway. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the P2SVpnGateway. -// gatewayName - The name of the gateway. -// options - P2SVPNGatewaysClientBeginDeleteOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginDelete -// method. +// - resourceGroupName - The resource group name of the P2SVpnGateway. +// - gatewayName - The name of the gateway. +// - options - P2SVPNGatewaysClientBeginDeleteOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginDelete +// method. func (client *P2SVPNGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientBeginDeleteOptions) (*runtime.Poller[P2SVPNGatewaysClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, gatewayName, options) @@ -145,6 +148,7 @@ func (client *P2SVPNGatewaysClient) BeginDelete(ctx context.Context, resourceGro // Delete - Deletes a virtual wan p2s vpn gateway. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *P2SVPNGatewaysClient) deleteOperation(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, gatewayName, options) @@ -190,12 +194,13 @@ func (client *P2SVPNGatewaysClient) deleteCreateRequest(ctx context.Context, res // BeginDisconnectP2SVPNConnections - Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource // group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// p2SVPNGatewayName - The name of the P2S Vpn Gateway. -// request - The parameters are supplied to disconnect p2s vpn connections. -// options - P2SVPNGatewaysClientBeginDisconnectP2SVPNConnectionsOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginDisconnectP2SVPNConnections -// method. +// - resourceGroupName - The name of the resource group. +// - p2SVPNGatewayName - The name of the P2S Vpn Gateway. +// - request - The parameters are supplied to disconnect p2s vpn connections. +// - options - P2SVPNGatewaysClientBeginDisconnectP2SVPNConnectionsOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginDisconnectP2SVPNConnections +// method. func (client *P2SVPNGatewaysClient) BeginDisconnectP2SVPNConnections(ctx context.Context, resourceGroupName string, p2SVPNGatewayName string, request P2SVPNConnectionRequest, options *P2SVPNGatewaysClientBeginDisconnectP2SVPNConnectionsOptions) (*runtime.Poller[P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.disconnectP2SVPNConnections(ctx, resourceGroupName, p2SVPNGatewayName, request, options) @@ -213,6 +218,7 @@ func (client *P2SVPNGatewaysClient) BeginDisconnectP2SVPNConnections(ctx context // DisconnectP2SVPNConnections - Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource // group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *P2SVPNGatewaysClient) disconnectP2SVPNConnections(ctx context.Context, resourceGroupName string, p2SVPNGatewayName string, request P2SVPNConnectionRequest, options *P2SVPNGatewaysClientBeginDisconnectP2SVPNConnectionsOptions) (*http.Response, error) { req, err := client.disconnectP2SVPNConnectionsCreateRequest(ctx, resourceGroupName, p2SVPNGatewayName, request, options) @@ -257,12 +263,13 @@ func (client *P2SVPNGatewaysClient) disconnectP2SVPNConnectionsCreateRequest(ctx // BeginGenerateVPNProfile - Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// gatewayName - The name of the P2SVpnGateway. -// parameters - Parameters supplied to the generate P2SVpnGateway VPN client package operation. -// options - P2SVPNGatewaysClientBeginGenerateVPNProfileOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginGenerateVPNProfile -// method. +// - resourceGroupName - The name of the resource group. +// - gatewayName - The name of the P2SVpnGateway. +// - parameters - Parameters supplied to the generate P2SVpnGateway VPN client package operation. +// - options - P2SVPNGatewaysClientBeginGenerateVPNProfileOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginGenerateVPNProfile +// method. func (client *P2SVPNGatewaysClient) BeginGenerateVPNProfile(ctx context.Context, resourceGroupName string, gatewayName string, parameters P2SVPNProfileParameters, options *P2SVPNGatewaysClientBeginGenerateVPNProfileOptions) (*runtime.Poller[P2SVPNGatewaysClientGenerateVPNProfileResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.generateVPNProfile(ctx, resourceGroupName, gatewayName, parameters, options) @@ -279,6 +286,7 @@ func (client *P2SVPNGatewaysClient) BeginGenerateVPNProfile(ctx context.Context, // GenerateVPNProfile - Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *P2SVPNGatewaysClient) generateVPNProfile(ctx context.Context, resourceGroupName string, gatewayName string, parameters P2SVPNProfileParameters, options *P2SVPNGatewaysClientBeginGenerateVPNProfileOptions) (*http.Response, error) { req, err := client.generateVPNProfileCreateRequest(ctx, resourceGroupName, gatewayName, parameters, options) @@ -323,10 +331,11 @@ func (client *P2SVPNGatewaysClient) generateVPNProfileCreateRequest(ctx context. // Get - Retrieves the details of a virtual wan p2s vpn gateway. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the P2SVpnGateway. -// gatewayName - The name of the gateway. -// options - P2SVPNGatewaysClientGetOptions contains the optional parameters for the P2SVPNGatewaysClient.Get method. +// - resourceGroupName - The resource group name of the P2SVpnGateway. +// - gatewayName - The name of the gateway. +// - options - P2SVPNGatewaysClientGetOptions contains the optional parameters for the P2SVPNGatewaysClient.Get method. func (client *P2SVPNGatewaysClient) Get(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientGetOptions) (P2SVPNGatewaysClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, gatewayName, options) if err != nil { @@ -380,11 +389,12 @@ func (client *P2SVPNGatewaysClient) getHandleResponse(resp *http.Response) (P2SV // BeginGetP2SVPNConnectionHealth - Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified // resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// gatewayName - The name of the P2SVpnGateway. -// options - P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginGetP2SVPNConnectionHealth -// method. +// - resourceGroupName - The name of the resource group. +// - gatewayName - The name of the P2SVpnGateway. +// - options - P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginGetP2SVPNConnectionHealth +// method. func (client *P2SVPNGatewaysClient) BeginGetP2SVPNConnectionHealth(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthOptions) (*runtime.Poller[P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.getP2SVPNConnectionHealth(ctx, resourceGroupName, gatewayName, options) @@ -402,6 +412,7 @@ func (client *P2SVPNGatewaysClient) BeginGetP2SVPNConnectionHealth(ctx context.C // GetP2SVPNConnectionHealth - Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified // resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *P2SVPNGatewaysClient) getP2SVPNConnectionHealth(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthOptions) (*http.Response, error) { req, err := client.getP2SVPNConnectionHealthCreateRequest(ctx, resourceGroupName, gatewayName, options) @@ -447,12 +458,13 @@ func (client *P2SVPNGatewaysClient) getP2SVPNConnectionHealthCreateRequest(ctx c // BeginGetP2SVPNConnectionHealthDetailed - Gets the sas url to get the connection health detail of P2S clients of the virtual // wan P2SVpnGateway in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// gatewayName - The name of the P2SVpnGateway. -// request - Request parameters supplied to get p2s vpn connections detailed health. -// options - P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthDetailedOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginGetP2SVPNConnectionHealthDetailed -// method. +// - resourceGroupName - The name of the resource group. +// - gatewayName - The name of the P2SVpnGateway. +// - request - Request parameters supplied to get p2s vpn connections detailed health. +// - options - P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthDetailedOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginGetP2SVPNConnectionHealthDetailed +// method. func (client *P2SVPNGatewaysClient) BeginGetP2SVPNConnectionHealthDetailed(ctx context.Context, resourceGroupName string, gatewayName string, request P2SVPNConnectionHealthRequest, options *P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthDetailedOptions) (*runtime.Poller[P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.getP2SVPNConnectionHealthDetailed(ctx, resourceGroupName, gatewayName, request, options) @@ -470,6 +482,7 @@ func (client *P2SVPNGatewaysClient) BeginGetP2SVPNConnectionHealthDetailed(ctx c // GetP2SVPNConnectionHealthDetailed - Gets the sas url to get the connection health detail of P2S clients of the virtual // wan P2SVpnGateway in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *P2SVPNGatewaysClient) getP2SVPNConnectionHealthDetailed(ctx context.Context, resourceGroupName string, gatewayName string, request P2SVPNConnectionHealthRequest, options *P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthDetailedOptions) (*http.Response, error) { req, err := client.getP2SVPNConnectionHealthDetailedCreateRequest(ctx, resourceGroupName, gatewayName, request, options) @@ -513,8 +526,9 @@ func (client *P2SVPNGatewaysClient) getP2SVPNConnectionHealthDetailedCreateReque } // NewListPager - Lists all the P2SVpnGateways in a subscription. +// // Generated from API version 2022-07-01 -// options - P2SVPNGatewaysClientListOptions contains the optional parameters for the P2SVPNGatewaysClient.List method. +// - options - P2SVPNGatewaysClientListOptions contains the optional parameters for the P2SVPNGatewaysClient.NewListPager method. func (client *P2SVPNGatewaysClient) NewListPager(options *P2SVPNGatewaysClientListOptions) *runtime.Pager[P2SVPNGatewaysClientListResponse] { return runtime.NewPager(runtime.PagingHandler[P2SVPNGatewaysClientListResponse]{ More: func(page P2SVPNGatewaysClientListResponse) bool { @@ -571,10 +585,11 @@ func (client *P2SVPNGatewaysClient) listHandleResponse(resp *http.Response) (P2S } // NewListByResourceGroupPager - Lists all the P2SVpnGateways in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the P2SVpnGateway. -// options - P2SVPNGatewaysClientListByResourceGroupOptions contains the optional parameters for the P2SVPNGatewaysClient.ListByResourceGroup -// method. +// - resourceGroupName - The resource group name of the P2SVpnGateway. +// - options - P2SVPNGatewaysClientListByResourceGroupOptions contains the optional parameters for the P2SVPNGatewaysClient.NewListByResourceGroupPager +// method. func (client *P2SVPNGatewaysClient) NewListByResourceGroupPager(resourceGroupName string, options *P2SVPNGatewaysClientListByResourceGroupOptions) *runtime.Pager[P2SVPNGatewaysClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[P2SVPNGatewaysClientListByResourceGroupResponse]{ More: func(page P2SVPNGatewaysClientListByResourceGroupResponse) bool { @@ -636,11 +651,12 @@ func (client *P2SVPNGatewaysClient) listByResourceGroupHandleResponse(resp *http // BeginReset - Resets the primary of the p2s vpn gateway in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the P2SVpnGateway. -// gatewayName - The name of the gateway. -// options - P2SVPNGatewaysClientBeginResetOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginReset -// method. +// - resourceGroupName - The resource group name of the P2SVpnGateway. +// - gatewayName - The name of the gateway. +// - options - P2SVPNGatewaysClientBeginResetOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginReset +// method. func (client *P2SVPNGatewaysClient) BeginReset(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientBeginResetOptions) (*runtime.Poller[P2SVPNGatewaysClientResetResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.reset(ctx, resourceGroupName, gatewayName, options) @@ -657,6 +673,7 @@ func (client *P2SVPNGatewaysClient) BeginReset(ctx context.Context, resourceGrou // Reset - Resets the primary of the p2s vpn gateway in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *P2SVPNGatewaysClient) reset(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientBeginResetOptions) (*http.Response, error) { req, err := client.resetCreateRequest(ctx, resourceGroupName, gatewayName, options) @@ -701,12 +718,13 @@ func (client *P2SVPNGatewaysClient) resetCreateRequest(ctx context.Context, reso // BeginUpdateTags - Updates virtual wan p2s vpn gateway tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the P2SVpnGateway. -// gatewayName - The name of the gateway. -// p2SVPNGatewayParameters - Parameters supplied to update a virtual wan p2s vpn gateway tags. -// options - P2SVPNGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginUpdateTags -// method. +// - resourceGroupName - The resource group name of the P2SVpnGateway. +// - gatewayName - The name of the gateway. +// - p2SVPNGatewayParameters - Parameters supplied to update a virtual wan p2s vpn gateway tags. +// - options - P2SVPNGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginUpdateTags +// method. func (client *P2SVPNGatewaysClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, p2SVPNGatewayParameters TagsObject, options *P2SVPNGatewaysClientBeginUpdateTagsOptions) (*runtime.Poller[P2SVPNGatewaysClientUpdateTagsResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.updateTags(ctx, resourceGroupName, gatewayName, p2SVPNGatewayParameters, options) @@ -723,6 +741,7 @@ func (client *P2SVPNGatewaysClient) BeginUpdateTags(ctx context.Context, resourc // UpdateTags - Updates virtual wan p2s vpn gateway tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *P2SVPNGatewaysClient) updateTags(ctx context.Context, resourceGroupName string, gatewayName string, p2SVPNGatewayParameters TagsObject, options *P2SVPNGatewaysClientBeginUpdateTagsOptions) (*http.Response, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, gatewayName, p2SVPNGatewayParameters, options) diff --git a/sdk/resourcemanager/network/armnetwork/p2svpngateways_client_example_test.go b/sdk/resourcemanager/network/armnetwork/p2svpngateways_client_example_test.go deleted file mode 100644 index 446507993a3c..000000000000 --- a/sdk/resourcemanager/network/armnetwork/p2svpngateways_client_example_test.go +++ /dev/null @@ -1,333 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/P2SVpnGatewayGet.json -func ExampleP2SVPNGatewaysClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewP2SVPNGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "p2sVpnGateway1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/P2SVpnGatewayPut.json -func ExampleP2SVPNGatewaysClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewP2SVPNGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "p2sVpnGateway1", armnetwork.P2SVPNGateway{ - Location: to.Ptr("West US"), - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - }, - Properties: &armnetwork.P2SVPNGatewayProperties{ - CustomDNSServers: []*string{ - to.Ptr("1.1.1.1"), - to.Ptr("2.2.2.2")}, - IsRoutingPreferenceInternet: to.Ptr(false), - P2SConnectionConfigurations: []*armnetwork.P2SConnectionConfiguration{ - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/p2sVpnGateways/p2sVpnGateway1/p2sConnectionConfigurations/P2SConnectionConfig1"), - Name: to.Ptr("P2SConnectionConfig1"), - Properties: &armnetwork.P2SConnectionConfigurationProperties{ - RoutingConfiguration: &armnetwork.RoutingConfiguration{ - AssociatedRouteTable: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1"), - }, - PropagatedRouteTables: &armnetwork.PropagatedRouteTable{ - IDs: []*armnetwork.SubResource{ - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1"), - }, - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable2"), - }, - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable3"), - }}, - Labels: []*string{ - to.Ptr("label1"), - to.Ptr("label2")}, - }, - VnetRoutes: &armnetwork.VnetRoute{ - StaticRoutes: []*armnetwork.StaticRoute{}, - }, - }, - VPNClientAddressPool: &armnetwork.AddressSpace{ - AddressPrefixes: []*string{ - to.Ptr("101.3.0.0/16")}, - }, - }, - }}, - VirtualHub: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1"), - }, - VPNGatewayScaleUnit: to.Ptr[int32](1), - VPNServerConfiguration: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfiguration1"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/P2SVpnGatewayUpdateTags.json -func ExampleP2SVPNGatewaysClient_BeginUpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewP2SVPNGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdateTags(ctx, "rg1", "p2sVpnGateway1", armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/P2SVpnGatewayDelete.json -func ExampleP2SVPNGatewaysClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewP2SVPNGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "p2sVpnGateway1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/P2SVpnGatewayListByResourceGroup.json -func ExampleP2SVPNGatewaysClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewP2SVPNGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/P2SVpnGatewayList.json -func ExampleP2SVPNGatewaysClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewP2SVPNGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/P2SVpnGatewayReset.json -func ExampleP2SVPNGatewaysClient_BeginReset() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewP2SVPNGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginReset(ctx, "rg1", "p2sVpnGateway1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/P2SVpnGatewayGenerateVpnProfile.json -func ExampleP2SVPNGatewaysClient_BeginGenerateVPNProfile() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewP2SVPNGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGenerateVPNProfile(ctx, "rg1", "p2sVpnGateway1", armnetwork.P2SVPNProfileParameters{ - AuthenticationMethod: to.Ptr(armnetwork.AuthenticationMethodEAPTLS), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/P2SVpnGatewayGetConnectionHealth.json -func ExampleP2SVPNGatewaysClient_BeginGetP2SVPNConnectionHealth() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewP2SVPNGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGetP2SVPNConnectionHealth(ctx, "rg1", "p2sVpnGateway1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/P2SVpnGatewayGetConnectionHealthDetailed.json -func ExampleP2SVPNGatewaysClient_BeginGetP2SVPNConnectionHealthDetailed() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewP2SVPNGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGetP2SVPNConnectionHealthDetailed(ctx, "p2s-vpn-gateway-test", "p2svpngateway", armnetwork.P2SVPNConnectionHealthRequest{ - OutputBlobSasURL: to.Ptr("https://blobcortextesturl.blob.core.windows.net/folderforconfig/p2sconnectionhealths?sp=rw&se=2018-01-10T03%3A42%3A04Z&sv=2017-04-17&sig=WvXrT5bDmDFfgHs%2Brz%2BjAu123eRCNE9BO0eQYcPDT7pY%3D&sr=b"), - VPNUserNamesFilter: []*string{ - to.Ptr("vpnUser1"), - to.Ptr("vpnUser2")}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/P2sVpnGatewaysDisconnectP2sVpnConnections.json -func ExampleP2SVPNGatewaysClient_BeginDisconnectP2SVPNConnections() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewP2SVPNGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDisconnectP2SVPNConnections(ctx, "p2s-vpn-gateway-test", "p2svpngateway", armnetwork.P2SVPNConnectionRequest{ - VPNConnectionIDs: []*string{ - to.Ptr("vpnconnId1"), - to.Ptr("vpnconnId2")}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/network/armnetwork/packetcaptures_client.go b/sdk/resourcemanager/network/armnetwork/packetcaptures_client.go index b7bb30931d38..c7fc96d73de3 100644 --- a/sdk/resourcemanager/network/armnetwork/packetcaptures_client.go +++ b/sdk/resourcemanager/network/armnetwork/packetcaptures_client.go @@ -32,10 +32,10 @@ type PacketCapturesClient struct { } // NewPacketCapturesClient creates a new instance of PacketCapturesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewPacketCapturesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PacketCapturesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewPacketCapturesClient(subscriptionID string, credential azcore.TokenCrede // BeginCreate - Create and start a packet capture on the specified VM. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// packetCaptureName - The name of the packet capture session. -// parameters - Parameters that define the create packet capture operation. -// options - PacketCapturesClientBeginCreateOptions contains the optional parameters for the PacketCapturesClient.BeginCreate -// method. +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - packetCaptureName - The name of the packet capture session. +// - parameters - Parameters that define the create packet capture operation. +// - options - PacketCapturesClientBeginCreateOptions contains the optional parameters for the PacketCapturesClient.BeginCreate +// method. func (client *PacketCapturesClient) BeginCreate(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, parameters PacketCapture, options *PacketCapturesClientBeginCreateOptions) (*runtime.Poller[PacketCapturesClientCreateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.create(ctx, resourceGroupName, networkWatcherName, packetCaptureName, parameters, options) @@ -81,6 +82,7 @@ func (client *PacketCapturesClient) BeginCreate(ctx context.Context, resourceGro // Create - Create and start a packet capture on the specified VM. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *PacketCapturesClient) create(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, parameters PacketCapture, options *PacketCapturesClientBeginCreateOptions) (*http.Response, error) { req, err := client.createCreateRequest(ctx, resourceGroupName, networkWatcherName, packetCaptureName, parameters, options) @@ -129,12 +131,13 @@ func (client *PacketCapturesClient) createCreateRequest(ctx context.Context, res // BeginDelete - Deletes the specified packet capture session. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// packetCaptureName - The name of the packet capture session. -// options - PacketCapturesClientBeginDeleteOptions contains the optional parameters for the PacketCapturesClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - packetCaptureName - The name of the packet capture session. +// - options - PacketCapturesClientBeginDeleteOptions contains the optional parameters for the PacketCapturesClient.BeginDelete +// method. func (client *PacketCapturesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientBeginDeleteOptions) (*runtime.Poller[PacketCapturesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, networkWatcherName, packetCaptureName, options) @@ -151,6 +154,7 @@ func (client *PacketCapturesClient) BeginDelete(ctx context.Context, resourceGro // Delete - Deletes the specified packet capture session. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *PacketCapturesClient) deleteOperation(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkWatcherName, packetCaptureName, options) @@ -199,11 +203,12 @@ func (client *PacketCapturesClient) deleteCreateRequest(ctx context.Context, res // Get - Gets a packet capture session by name. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// packetCaptureName - The name of the packet capture session. -// options - PacketCapturesClientGetOptions contains the optional parameters for the PacketCapturesClient.Get method. +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - packetCaptureName - The name of the packet capture session. +// - options - PacketCapturesClientGetOptions contains the optional parameters for the PacketCapturesClient.Get method. func (client *PacketCapturesClient) Get(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientGetOptions) (PacketCapturesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, networkWatcherName, packetCaptureName, options) if err != nil { @@ -260,12 +265,13 @@ func (client *PacketCapturesClient) getHandleResponse(resp *http.Response) (Pack // BeginGetStatus - Query the status of a running packet capture session. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the Network Watcher resource. -// packetCaptureName - The name given to the packet capture session. -// options - PacketCapturesClientBeginGetStatusOptions contains the optional parameters for the PacketCapturesClient.BeginGetStatus -// method. +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the Network Watcher resource. +// - packetCaptureName - The name given to the packet capture session. +// - options - PacketCapturesClientBeginGetStatusOptions contains the optional parameters for the PacketCapturesClient.BeginGetStatus +// method. func (client *PacketCapturesClient) BeginGetStatus(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientBeginGetStatusOptions) (*runtime.Poller[PacketCapturesClientGetStatusResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.getStatus(ctx, resourceGroupName, networkWatcherName, packetCaptureName, options) @@ -282,6 +288,7 @@ func (client *PacketCapturesClient) BeginGetStatus(ctx context.Context, resource // GetStatus - Query the status of a running packet capture session. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *PacketCapturesClient) getStatus(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientBeginGetStatusOptions) (*http.Response, error) { req, err := client.getStatusCreateRequest(ctx, resourceGroupName, networkWatcherName, packetCaptureName, options) @@ -329,10 +336,11 @@ func (client *PacketCapturesClient) getStatusCreateRequest(ctx context.Context, } // NewListPager - Lists all packet capture sessions within the specified resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the Network Watcher resource. -// options - PacketCapturesClientListOptions contains the optional parameters for the PacketCapturesClient.List method. +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the Network Watcher resource. +// - options - PacketCapturesClientListOptions contains the optional parameters for the PacketCapturesClient.NewListPager method. func (client *PacketCapturesClient) NewListPager(resourceGroupName string, networkWatcherName string, options *PacketCapturesClientListOptions) *runtime.Pager[PacketCapturesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[PacketCapturesClientListResponse]{ More: func(page PacketCapturesClientListResponse) bool { @@ -392,12 +400,13 @@ func (client *PacketCapturesClient) listHandleResponse(resp *http.Response) (Pac // BeginStop - Stops a specified packet capture session. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// packetCaptureName - The name of the packet capture session. -// options - PacketCapturesClientBeginStopOptions contains the optional parameters for the PacketCapturesClient.BeginStop -// method. +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - packetCaptureName - The name of the packet capture session. +// - options - PacketCapturesClientBeginStopOptions contains the optional parameters for the PacketCapturesClient.BeginStop +// method. func (client *PacketCapturesClient) BeginStop(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientBeginStopOptions) (*runtime.Poller[PacketCapturesClientStopResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.stop(ctx, resourceGroupName, networkWatcherName, packetCaptureName, options) @@ -414,6 +423,7 @@ func (client *PacketCapturesClient) BeginStop(ctx context.Context, resourceGroup // Stop - Stops a specified packet capture session. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *PacketCapturesClient) stop(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientBeginStopOptions) (*http.Response, error) { req, err := client.stopCreateRequest(ctx, resourceGroupName, networkWatcherName, packetCaptureName, options) diff --git a/sdk/resourcemanager/network/armnetwork/packetcaptures_client_example_test.go b/sdk/resourcemanager/network/armnetwork/packetcaptures_client_example_test.go deleted file mode 100644 index 85e8664dd13a..000000000000 --- a/sdk/resourcemanager/network/armnetwork/packetcaptures_client_example_test.go +++ /dev/null @@ -1,165 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherPacketCaptureCreate.json -func ExamplePacketCapturesClient_BeginCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPacketCapturesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreate(ctx, "rg1", "nw1", "pc1", armnetwork.PacketCapture{ - Properties: &armnetwork.PacketCaptureParameters{ - BytesToCapturePerPacket: to.Ptr[int64](10000), - Filters: []*armnetwork.PacketCaptureFilter{ - { - LocalIPAddress: to.Ptr("10.0.0.4"), - LocalPort: to.Ptr("80"), - Protocol: to.Ptr(armnetwork.PcProtocolTCP), - }}, - StorageLocation: &armnetwork.PacketCaptureStorageLocation{ - FilePath: to.Ptr("D:\\capture\\pc1.cap"), - StorageID: to.Ptr("/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Storage/storageAccounts/pcstore"), - StoragePath: to.Ptr("https://mytestaccountname.blob.core.windows.net/capture/pc1.cap"), - }, - Target: to.Ptr("/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1"), - TimeLimitInSeconds: to.Ptr[int32](100), - TotalBytesPerSession: to.Ptr[int64](100000), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherPacketCaptureGet.json -func ExamplePacketCapturesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPacketCapturesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "nw1", "pc1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherPacketCaptureDelete.json -func ExamplePacketCapturesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPacketCapturesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "nw1", "pc1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherPacketCaptureStop.json -func ExamplePacketCapturesClient_BeginStop() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPacketCapturesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStop(ctx, "rg1", "nw1", "pc1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherPacketCaptureQueryStatus.json -func ExamplePacketCapturesClient_BeginGetStatus() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPacketCapturesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGetStatus(ctx, "rg1", "nw1", "pc1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherPacketCapturesList.json -func ExamplePacketCapturesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPacketCapturesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", "nw1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/peerexpressroutecircuitconnections_client.go b/sdk/resourcemanager/network/armnetwork/peerexpressroutecircuitconnections_client.go index 761c54a944cd..6c6e25f709e2 100644 --- a/sdk/resourcemanager/network/armnetwork/peerexpressroutecircuitconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/peerexpressroutecircuitconnections_client.go @@ -32,10 +32,10 @@ type PeerExpressRouteCircuitConnectionsClient struct { } // NewPeerExpressRouteCircuitConnectionsClient creates a new instance of PeerExpressRouteCircuitConnectionsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewPeerExpressRouteCircuitConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PeerExpressRouteCircuitConnectionsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewPeerExpressRouteCircuitConnectionsClient(subscriptionID string, credenti // Get - Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the express route circuit. -// peeringName - The name of the peering. -// connectionName - The name of the peer express route circuit connection. -// options - PeerExpressRouteCircuitConnectionsClientGetOptions contains the optional parameters for the PeerExpressRouteCircuitConnectionsClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the express route circuit. +// - peeringName - The name of the peering. +// - connectionName - The name of the peer express route circuit connection. +// - options - PeerExpressRouteCircuitConnectionsClientGetOptions contains the optional parameters for the PeerExpressRouteCircuitConnectionsClient.Get +// method. func (client *PeerExpressRouteCircuitConnectionsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, options *PeerExpressRouteCircuitConnectionsClientGetOptions) (PeerExpressRouteCircuitConnectionsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, circuitName, peeringName, connectionName, options) if err != nil { @@ -124,12 +125,13 @@ func (client *PeerExpressRouteCircuitConnectionsClient) getHandleResponse(resp * } // NewListPager - Gets all global reach peer connections associated with a private peering in an express route circuit. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// circuitName - The name of the circuit. -// peeringName - The name of the peering. -// options - PeerExpressRouteCircuitConnectionsClientListOptions contains the optional parameters for the PeerExpressRouteCircuitConnectionsClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - circuitName - The name of the circuit. +// - peeringName - The name of the peering. +// - options - PeerExpressRouteCircuitConnectionsClientListOptions contains the optional parameters for the PeerExpressRouteCircuitConnectionsClient.NewListPager +// method. func (client *PeerExpressRouteCircuitConnectionsClient) NewListPager(resourceGroupName string, circuitName string, peeringName string, options *PeerExpressRouteCircuitConnectionsClientListOptions) *runtime.Pager[PeerExpressRouteCircuitConnectionsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[PeerExpressRouteCircuitConnectionsClientListResponse]{ More: func(page PeerExpressRouteCircuitConnectionsClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/peerexpressroutecircuitconnections_client_example_test.go b/sdk/resourcemanager/network/armnetwork/peerexpressroutecircuitconnections_client_example_test.go deleted file mode 100644 index c6ae86572a60..000000000000 --- a/sdk/resourcemanager/network/armnetwork/peerexpressroutecircuitconnections_client_example_test.go +++ /dev/null @@ -1,60 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PeerExpressRouteCircuitConnectionGet.json -func ExamplePeerExpressRouteCircuitConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPeerExpressRouteCircuitConnectionsClient("subid1", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "ExpressRouteARMCircuitA", "AzurePrivatePeering", "60aee347-e889-4a42-8c1b-0aae8b1e4013", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PeerExpressRouteCircuitConnectionList.json -func ExamplePeerExpressRouteCircuitConnectionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPeerExpressRouteCircuitConnectionsClient("subid1", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", "ExpressRouteARMCircuitA", "AzurePrivatePeering", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/polymorphic_helpers.go b/sdk/resourcemanager/network/armnetwork/polymorphic_helpers.go index b109bf529626..882756d3f505 100644 --- a/sdk/resourcemanager/network/armnetwork/polymorphic_helpers.go +++ b/sdk/resourcemanager/network/armnetwork/polymorphic_helpers.go @@ -15,7 +15,7 @@ func unmarshalActiveBaseSecurityAdminRuleClassification(rawMsg json.RawMessage) if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -54,7 +54,7 @@ func unmarshalBaseAdminRuleClassification(rawMsg json.RawMessage) (BaseAdminRule if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -93,7 +93,7 @@ func unmarshalEffectiveBaseSecurityAdminRuleClassification(rawMsg json.RawMessag if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -132,7 +132,7 @@ func unmarshalFirewallPolicyRuleClassification(rawMsg json.RawMessage) (Firewall if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -173,7 +173,7 @@ func unmarshalFirewallPolicyRuleCollectionClassification(rawMsg json.RawMessage) if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } diff --git a/sdk/resourcemanager/network/armnetwork/privatednszonegroups_client.go b/sdk/resourcemanager/network/armnetwork/privatednszonegroups_client.go index 217a4729418d..09211414bf06 100644 --- a/sdk/resourcemanager/network/armnetwork/privatednszonegroups_client.go +++ b/sdk/resourcemanager/network/armnetwork/privatednszonegroups_client.go @@ -32,10 +32,10 @@ type PrivateDNSZoneGroupsClient struct { } // NewPrivateDNSZoneGroupsClient creates a new instance of PrivateDNSZoneGroupsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewPrivateDNSZoneGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateDNSZoneGroupsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewPrivateDNSZoneGroupsClient(subscriptionID string, credential azcore.Toke // BeginCreateOrUpdate - Creates or updates a private dns zone group in the specified private endpoint. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// privateEndpointName - The name of the private endpoint. -// privateDNSZoneGroupName - The name of the private dns zone group. -// parameters - Parameters supplied to the create or update private dns zone group operation. -// options - PrivateDNSZoneGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - privateEndpointName - The name of the private endpoint. +// - privateDNSZoneGroupName - The name of the private dns zone group. +// - parameters - Parameters supplied to the create or update private dns zone group operation. +// - options - PrivateDNSZoneGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.BeginCreateOrUpdate +// method. func (client *PrivateDNSZoneGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string, parameters PrivateDNSZoneGroup, options *PrivateDNSZoneGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[PrivateDNSZoneGroupsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, privateEndpointName, privateDNSZoneGroupName, parameters, options) @@ -81,6 +82,7 @@ func (client *PrivateDNSZoneGroupsClient) BeginCreateOrUpdate(ctx context.Contex // CreateOrUpdate - Creates or updates a private dns zone group in the specified private endpoint. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *PrivateDNSZoneGroupsClient) createOrUpdate(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string, parameters PrivateDNSZoneGroup, options *PrivateDNSZoneGroupsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, privateEndpointName, privateDNSZoneGroupName, parameters, options) @@ -129,12 +131,13 @@ func (client *PrivateDNSZoneGroupsClient) createOrUpdateCreateRequest(ctx contex // BeginDelete - Deletes the specified private dns zone group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// privateEndpointName - The name of the private endpoint. -// privateDNSZoneGroupName - The name of the private dns zone group. -// options - PrivateDNSZoneGroupsClientBeginDeleteOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - privateEndpointName - The name of the private endpoint. +// - privateDNSZoneGroupName - The name of the private dns zone group. +// - options - PrivateDNSZoneGroupsClientBeginDeleteOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.BeginDelete +// method. func (client *PrivateDNSZoneGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string, options *PrivateDNSZoneGroupsClientBeginDeleteOptions) (*runtime.Poller[PrivateDNSZoneGroupsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, privateEndpointName, privateDNSZoneGroupName, options) @@ -151,6 +154,7 @@ func (client *PrivateDNSZoneGroupsClient) BeginDelete(ctx context.Context, resou // Delete - Deletes the specified private dns zone group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *PrivateDNSZoneGroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string, options *PrivateDNSZoneGroupsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, privateEndpointName, privateDNSZoneGroupName, options) @@ -199,12 +203,13 @@ func (client *PrivateDNSZoneGroupsClient) deleteCreateRequest(ctx context.Contex // Get - Gets the private dns zone group resource by specified private dns zone group name. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// privateEndpointName - The name of the private endpoint. -// privateDNSZoneGroupName - The name of the private dns zone group. -// options - PrivateDNSZoneGroupsClientGetOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - privateEndpointName - The name of the private endpoint. +// - privateDNSZoneGroupName - The name of the private dns zone group. +// - options - PrivateDNSZoneGroupsClientGetOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.Get +// method. func (client *PrivateDNSZoneGroupsClient) Get(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string, options *PrivateDNSZoneGroupsClientGetOptions) (PrivateDNSZoneGroupsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, privateEndpointName, privateDNSZoneGroupName, options) if err != nil { @@ -260,11 +265,12 @@ func (client *PrivateDNSZoneGroupsClient) getHandleResponse(resp *http.Response) } // NewListPager - Gets all private dns zone groups in a private endpoint. +// // Generated from API version 2022-07-01 -// privateEndpointName - The name of the private endpoint. -// resourceGroupName - The name of the resource group. -// options - PrivateDNSZoneGroupsClientListOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.List -// method. +// - privateEndpointName - The name of the private endpoint. +// - resourceGroupName - The name of the resource group. +// - options - PrivateDNSZoneGroupsClientListOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.NewListPager +// method. func (client *PrivateDNSZoneGroupsClient) NewListPager(privateEndpointName string, resourceGroupName string, options *PrivateDNSZoneGroupsClientListOptions) *runtime.Pager[PrivateDNSZoneGroupsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[PrivateDNSZoneGroupsClientListResponse]{ More: func(page PrivateDNSZoneGroupsClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/privatednszonegroups_client_example_test.go b/sdk/resourcemanager/network/armnetwork/privatednszonegroups_client_example_test.go deleted file mode 100644 index a9976af3b824..000000000000 --- a/sdk/resourcemanager/network/armnetwork/privatednszonegroups_client_example_test.go +++ /dev/null @@ -1,114 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PrivateEndpointDnsZoneGroupDelete.json -func ExamplePrivateDNSZoneGroupsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPrivateDNSZoneGroupsClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "testPe", "testPdnsgroup", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PrivateEndpointDnsZoneGroupGet.json -func ExamplePrivateDNSZoneGroupsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPrivateDNSZoneGroupsClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "testPe", "testPdnsgroup", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PrivateEndpointDnsZoneGroupCreate.json -func ExamplePrivateDNSZoneGroupsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPrivateDNSZoneGroupsClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "testPe", "testPdnsgroup", armnetwork.PrivateDNSZoneGroup{ - Properties: &armnetwork.PrivateDNSZoneGroupPropertiesFormat{ - PrivateDNSZoneConfigs: []*armnetwork.PrivateDNSZoneConfig{ - { - Properties: &armnetwork.PrivateDNSZonePropertiesFormat{ - PrivateDNSZoneID: to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateDnsZones/zone1.com"), - }, - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PrivateEndpointDnsZoneGroupList.json -func ExamplePrivateDNSZoneGroupsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPrivateDNSZoneGroupsClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("testPe", "rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/privateendpoints_client.go b/sdk/resourcemanager/network/armnetwork/privateendpoints_client.go index 1528da94d97d..ea8f69f4db31 100644 --- a/sdk/resourcemanager/network/armnetwork/privateendpoints_client.go +++ b/sdk/resourcemanager/network/armnetwork/privateendpoints_client.go @@ -32,10 +32,10 @@ type PrivateEndpointsClient struct { } // NewPrivateEndpointsClient creates a new instance of PrivateEndpointsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewPrivateEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewPrivateEndpointsClient(subscriptionID string, credential azcore.TokenCre // BeginCreateOrUpdate - Creates or updates an private endpoint in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// privateEndpointName - The name of the private endpoint. -// parameters - Parameters supplied to the create or update private endpoint operation. -// options - PrivateEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - privateEndpointName - The name of the private endpoint. +// - parameters - Parameters supplied to the create or update private endpoint operation. +// - options - PrivateEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointsClient.BeginCreateOrUpdate +// method. func (client *PrivateEndpointsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, privateEndpointName string, parameters PrivateEndpoint, options *PrivateEndpointsClientBeginCreateOrUpdateOptions) (*runtime.Poller[PrivateEndpointsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, privateEndpointName, parameters, options) @@ -80,6 +81,7 @@ func (client *PrivateEndpointsClient) BeginCreateOrUpdate(ctx context.Context, r // CreateOrUpdate - Creates or updates an private endpoint in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *PrivateEndpointsClient) createOrUpdate(ctx context.Context, resourceGroupName string, privateEndpointName string, parameters PrivateEndpoint, options *PrivateEndpointsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, privateEndpointName, parameters, options) @@ -124,11 +126,12 @@ func (client *PrivateEndpointsClient) createOrUpdateCreateRequest(ctx context.Co // BeginDelete - Deletes the specified private endpoint. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// privateEndpointName - The name of the private endpoint. -// options - PrivateEndpointsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - privateEndpointName - The name of the private endpoint. +// - options - PrivateEndpointsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointsClient.BeginDelete +// method. func (client *PrivateEndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, privateEndpointName string, options *PrivateEndpointsClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, privateEndpointName, options) @@ -145,6 +148,7 @@ func (client *PrivateEndpointsClient) BeginDelete(ctx context.Context, resourceG // Delete - Deletes the specified private endpoint. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *PrivateEndpointsClient) deleteOperation(ctx context.Context, resourceGroupName string, privateEndpointName string, options *PrivateEndpointsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, privateEndpointName, options) @@ -189,10 +193,11 @@ func (client *PrivateEndpointsClient) deleteCreateRequest(ctx context.Context, r // Get - Gets the specified private endpoint by resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// privateEndpointName - The name of the private endpoint. -// options - PrivateEndpointsClientGetOptions contains the optional parameters for the PrivateEndpointsClient.Get method. +// - resourceGroupName - The name of the resource group. +// - privateEndpointName - The name of the private endpoint. +// - options - PrivateEndpointsClientGetOptions contains the optional parameters for the PrivateEndpointsClient.Get method. func (client *PrivateEndpointsClient) Get(ctx context.Context, resourceGroupName string, privateEndpointName string, options *PrivateEndpointsClientGetOptions) (PrivateEndpointsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, privateEndpointName, options) if err != nil { @@ -247,9 +252,11 @@ func (client *PrivateEndpointsClient) getHandleResponse(resp *http.Response) (Pr } // NewListPager - Gets all private endpoints in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - PrivateEndpointsClientListOptions contains the optional parameters for the PrivateEndpointsClient.List method. +// - resourceGroupName - The name of the resource group. +// - options - PrivateEndpointsClientListOptions contains the optional parameters for the PrivateEndpointsClient.NewListPager +// method. func (client *PrivateEndpointsClient) NewListPager(resourceGroupName string, options *PrivateEndpointsClientListOptions) *runtime.Pager[PrivateEndpointsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[PrivateEndpointsClientListResponse]{ More: func(page PrivateEndpointsClientListResponse) bool { @@ -310,9 +317,10 @@ func (client *PrivateEndpointsClient) listHandleResponse(resp *http.Response) (P } // NewListBySubscriptionPager - Gets all private endpoints in a subscription. +// // Generated from API version 2022-07-01 -// options - PrivateEndpointsClientListBySubscriptionOptions contains the optional parameters for the PrivateEndpointsClient.ListBySubscription -// method. +// - options - PrivateEndpointsClientListBySubscriptionOptions contains the optional parameters for the PrivateEndpointsClient.NewListBySubscriptionPager +// method. func (client *PrivateEndpointsClient) NewListBySubscriptionPager(options *PrivateEndpointsClientListBySubscriptionOptions) *runtime.Pager[PrivateEndpointsClientListBySubscriptionResponse] { return runtime.NewPager(runtime.PagingHandler[PrivateEndpointsClientListBySubscriptionResponse]{ More: func(page PrivateEndpointsClientListBySubscriptionResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/privateendpoints_client_example_test.go b/sdk/resourcemanager/network/armnetwork/privateendpoints_client_example_test.go deleted file mode 100644 index ecdf0e239996..000000000000 --- a/sdk/resourcemanager/network/armnetwork/privateendpoints_client_example_test.go +++ /dev/null @@ -1,285 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PrivateEndpointDelete.json -func ExamplePrivateEndpointsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPrivateEndpointsClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "testPe", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PrivateEndpointGet.json -func ExamplePrivateEndpointsClient_Get_getPrivateEndpoint() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPrivateEndpointsClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "testPe", &armnetwork.PrivateEndpointsClientGetOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PrivateEndpointGetWithASG.json -func ExamplePrivateEndpointsClient_Get_getPrivateEndpointWithApplicationSecurityGroups() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPrivateEndpointsClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "testPe", &armnetwork.PrivateEndpointsClientGetOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PrivateEndpointGetForManualApproval.json -func ExamplePrivateEndpointsClient_Get_getPrivateEndpointWithManualApprovalConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPrivateEndpointsClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "testPe", &armnetwork.PrivateEndpointsClientGetOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PrivateEndpointCreate.json -func ExamplePrivateEndpointsClient_BeginCreateOrUpdate_createPrivateEndpoint() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPrivateEndpointsClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "testPe", armnetwork.PrivateEndpoint{ - Location: to.Ptr("eastus2euap"), - Properties: &armnetwork.PrivateEndpointProperties{ - CustomNetworkInterfaceName: to.Ptr("testPeNic"), - IPConfigurations: []*armnetwork.PrivateEndpointIPConfiguration{ - { - Name: to.Ptr("pestaticconfig"), - Properties: &armnetwork.PrivateEndpointIPConfigurationProperties{ - GroupID: to.Ptr("file"), - MemberName: to.Ptr("file"), - PrivateIPAddress: to.Ptr("192.168.0.6"), - }, - }}, - PrivateLinkServiceConnections: []*armnetwork.PrivateLinkServiceConnection{ - { - Properties: &armnetwork.PrivateLinkServiceConnectionProperties{ - GroupIDs: []*string{ - to.Ptr("groupIdFromResource")}, - PrivateLinkServiceID: to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/testPls"), - RequestMessage: to.Ptr("Please approve my connection."), - }, - }}, - Subnet: &armnetwork.Subnet{ - ID: to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PrivateEndpointCreateWithASG.json -func ExamplePrivateEndpointsClient_BeginCreateOrUpdate_createPrivateEndpointWithApplicationSecurityGroups() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPrivateEndpointsClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "testPe", armnetwork.PrivateEndpoint{ - Location: to.Ptr("eastus2euap"), - Properties: &armnetwork.PrivateEndpointProperties{ - ApplicationSecurityGroups: []*armnetwork.ApplicationSecurityGroup{ - { - ID: to.Ptr("/subscriptions/subId/resourceGroups/rg1/provders/Microsoft.Network/applicationSecurityGroup/asg1"), - }}, - PrivateLinkServiceConnections: []*armnetwork.PrivateLinkServiceConnection{ - { - Properties: &armnetwork.PrivateLinkServiceConnectionProperties{ - GroupIDs: []*string{ - to.Ptr("groupIdFromResource")}, - PrivateLinkServiceID: to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/testPls"), - RequestMessage: to.Ptr("Please approve my connection."), - }, - }}, - Subnet: &armnetwork.Subnet{ - ID: to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PrivateEndpointCreateForManualApproval.json -func ExamplePrivateEndpointsClient_BeginCreateOrUpdate_createPrivateEndpointWithManualApprovalConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPrivateEndpointsClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "testPe", armnetwork.PrivateEndpoint{ - Location: to.Ptr("eastus"), - Properties: &armnetwork.PrivateEndpointProperties{ - CustomNetworkInterfaceName: to.Ptr("testPeNic"), - IPConfigurations: []*armnetwork.PrivateEndpointIPConfiguration{ - { - Name: to.Ptr("pestaticconfig"), - Properties: &armnetwork.PrivateEndpointIPConfigurationProperties{ - GroupID: to.Ptr("file"), - MemberName: to.Ptr("file"), - PrivateIPAddress: to.Ptr("192.168.0.5"), - }, - }}, - ManualPrivateLinkServiceConnections: []*armnetwork.PrivateLinkServiceConnection{ - { - Properties: &armnetwork.PrivateLinkServiceConnectionProperties{ - GroupIDs: []*string{ - to.Ptr("groupIdFromResource")}, - PrivateLinkServiceID: to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateLinkServices/testPls"), - RequestMessage: to.Ptr("Please manually approve my connection."), - }, - }}, - Subnet: &armnetwork.Subnet{ - ID: to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PrivateEndpointList.json -func ExamplePrivateEndpointsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPrivateEndpointsClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PrivateEndpointListAll.json -func ExamplePrivateEndpointsClient_NewListBySubscriptionPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPrivateEndpointsClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListBySubscriptionPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/privatelinkservices_client.go b/sdk/resourcemanager/network/armnetwork/privatelinkservices_client.go index 75f6f07afe0c..c9486412550c 100644 --- a/sdk/resourcemanager/network/armnetwork/privatelinkservices_client.go +++ b/sdk/resourcemanager/network/armnetwork/privatelinkservices_client.go @@ -32,10 +32,10 @@ type PrivateLinkServicesClient struct { } // NewPrivateLinkServicesClient creates a new instance of PrivateLinkServicesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewPrivateLinkServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkServicesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,11 +58,12 @@ func NewPrivateLinkServicesClient(subscriptionID string, credential azcore.Token // BeginCheckPrivateLinkServiceVisibility - Checks whether the subscription is visible to private link service. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// location - The location of the domain name. -// parameters - The request body of CheckPrivateLinkService API call. -// options - PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityOptions contains the optional parameters for the -// PrivateLinkServicesClient.BeginCheckPrivateLinkServiceVisibility method. +// - location - The location of the domain name. +// - parameters - The request body of CheckPrivateLinkService API call. +// - options - PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityOptions contains the optional parameters for the +// PrivateLinkServicesClient.BeginCheckPrivateLinkServiceVisibility method. func (client *PrivateLinkServicesClient) BeginCheckPrivateLinkServiceVisibility(ctx context.Context, location string, parameters CheckPrivateLinkServiceVisibilityRequest, options *PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityOptions) (*runtime.Poller[PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.checkPrivateLinkServiceVisibility(ctx, location, parameters, options) @@ -79,6 +80,7 @@ func (client *PrivateLinkServicesClient) BeginCheckPrivateLinkServiceVisibility( // CheckPrivateLinkServiceVisibility - Checks whether the subscription is visible to private link service. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *PrivateLinkServicesClient) checkPrivateLinkServiceVisibility(ctx context.Context, location string, parameters CheckPrivateLinkServiceVisibilityRequest, options *PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityOptions) (*http.Response, error) { req, err := client.checkPrivateLinkServiceVisibilityCreateRequest(ctx, location, parameters, options) @@ -120,12 +122,13 @@ func (client *PrivateLinkServicesClient) checkPrivateLinkServiceVisibilityCreate // BeginCheckPrivateLinkServiceVisibilityByResourceGroup - Checks whether the subscription is visible to private link service // in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// location - The location of the domain name. -// resourceGroupName - The name of the resource group. -// parameters - The request body of CheckPrivateLinkService API call. -// options - PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityByResourceGroupOptions contains the optional parameters -// for the PrivateLinkServicesClient.BeginCheckPrivateLinkServiceVisibilityByResourceGroup method. +// - location - The location of the domain name. +// - resourceGroupName - The name of the resource group. +// - parameters - The request body of CheckPrivateLinkService API call. +// - options - PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityByResourceGroupOptions contains the optional parameters +// for the PrivateLinkServicesClient.BeginCheckPrivateLinkServiceVisibilityByResourceGroup method. func (client *PrivateLinkServicesClient) BeginCheckPrivateLinkServiceVisibilityByResourceGroup(ctx context.Context, location string, resourceGroupName string, parameters CheckPrivateLinkServiceVisibilityRequest, options *PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityByResourceGroupOptions) (*runtime.Poller[PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.checkPrivateLinkServiceVisibilityByResourceGroup(ctx, location, resourceGroupName, parameters, options) @@ -143,6 +146,7 @@ func (client *PrivateLinkServicesClient) BeginCheckPrivateLinkServiceVisibilityB // CheckPrivateLinkServiceVisibilityByResourceGroup - Checks whether the subscription is visible to private link service in // the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *PrivateLinkServicesClient) checkPrivateLinkServiceVisibilityByResourceGroup(ctx context.Context, location string, resourceGroupName string, parameters CheckPrivateLinkServiceVisibilityRequest, options *PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityByResourceGroupOptions) (*http.Response, error) { req, err := client.checkPrivateLinkServiceVisibilityByResourceGroupCreateRequest(ctx, location, resourceGroupName, parameters, options) @@ -187,12 +191,13 @@ func (client *PrivateLinkServicesClient) checkPrivateLinkServiceVisibilityByReso // BeginCreateOrUpdate - Creates or updates an private link service in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// serviceName - The name of the private link service. -// parameters - Parameters supplied to the create or update private link service operation. -// options - PrivateLinkServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateLinkServicesClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - serviceName - The name of the private link service. +// - parameters - Parameters supplied to the create or update private link service operation. +// - options - PrivateLinkServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateLinkServicesClient.BeginCreateOrUpdate +// method. func (client *PrivateLinkServicesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters PrivateLinkService, options *PrivateLinkServicesClientBeginCreateOrUpdateOptions) (*runtime.Poller[PrivateLinkServicesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, parameters, options) @@ -209,6 +214,7 @@ func (client *PrivateLinkServicesClient) BeginCreateOrUpdate(ctx context.Context // CreateOrUpdate - Creates or updates an private link service in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *PrivateLinkServicesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters PrivateLinkService, options *PrivateLinkServicesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceName, parameters, options) @@ -253,11 +259,12 @@ func (client *PrivateLinkServicesClient) createOrUpdateCreateRequest(ctx context // BeginDelete - Deletes the specified private link service. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// serviceName - The name of the private link service. -// options - PrivateLinkServicesClientBeginDeleteOptions contains the optional parameters for the PrivateLinkServicesClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - serviceName - The name of the private link service. +// - options - PrivateLinkServicesClientBeginDeleteOptions contains the optional parameters for the PrivateLinkServicesClient.BeginDelete +// method. func (client *PrivateLinkServicesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, options *PrivateLinkServicesClientBeginDeleteOptions) (*runtime.Poller[PrivateLinkServicesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, options) @@ -274,6 +281,7 @@ func (client *PrivateLinkServicesClient) BeginDelete(ctx context.Context, resour // Delete - Deletes the specified private link service. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *PrivateLinkServicesClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceName string, options *PrivateLinkServicesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceName, options) @@ -318,12 +326,13 @@ func (client *PrivateLinkServicesClient) deleteCreateRequest(ctx context.Context // BeginDeletePrivateEndpointConnection - Delete private end point connection for a private link service in a subscription. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// serviceName - The name of the private link service. -// peConnectionName - The name of the private end point connection. -// options - PrivateLinkServicesClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the -// PrivateLinkServicesClient.BeginDeletePrivateEndpointConnection method. +// - resourceGroupName - The name of the resource group. +// - serviceName - The name of the private link service. +// - peConnectionName - The name of the private end point connection. +// - options - PrivateLinkServicesClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the +// PrivateLinkServicesClient.BeginDeletePrivateEndpointConnection method. func (client *PrivateLinkServicesClient) BeginDeletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, options *PrivateLinkServicesClientBeginDeletePrivateEndpointConnectionOptions) (*runtime.Poller[PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deletePrivateEndpointConnection(ctx, resourceGroupName, serviceName, peConnectionName, options) @@ -340,6 +349,7 @@ func (client *PrivateLinkServicesClient) BeginDeletePrivateEndpointConnection(ct // DeletePrivateEndpointConnection - Delete private end point connection for a private link service in a subscription. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *PrivateLinkServicesClient) deletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, options *PrivateLinkServicesClientBeginDeletePrivateEndpointConnectionOptions) (*http.Response, error) { req, err := client.deletePrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, serviceName, peConnectionName, options) @@ -388,10 +398,11 @@ func (client *PrivateLinkServicesClient) deletePrivateEndpointConnectionCreateRe // Get - Gets the specified private link service by resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// serviceName - The name of the private link service. -// options - PrivateLinkServicesClientGetOptions contains the optional parameters for the PrivateLinkServicesClient.Get method. +// - resourceGroupName - The name of the resource group. +// - serviceName - The name of the private link service. +// - options - PrivateLinkServicesClientGetOptions contains the optional parameters for the PrivateLinkServicesClient.Get method. func (client *PrivateLinkServicesClient) Get(ctx context.Context, resourceGroupName string, serviceName string, options *PrivateLinkServicesClientGetOptions) (PrivateLinkServicesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceName, options) if err != nil { @@ -448,12 +459,13 @@ func (client *PrivateLinkServicesClient) getHandleResponse(resp *http.Response) // GetPrivateEndpointConnection - Get the specific private end point connection by specific private link service in the resource // group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// serviceName - The name of the private link service. -// peConnectionName - The name of the private end point connection. -// options - PrivateLinkServicesClientGetPrivateEndpointConnectionOptions contains the optional parameters for the PrivateLinkServicesClient.GetPrivateEndpointConnection -// method. +// - resourceGroupName - The name of the resource group. +// - serviceName - The name of the private link service. +// - peConnectionName - The name of the private end point connection. +// - options - PrivateLinkServicesClientGetPrivateEndpointConnectionOptions contains the optional parameters for the PrivateLinkServicesClient.GetPrivateEndpointConnection +// method. func (client *PrivateLinkServicesClient) GetPrivateEndpointConnection(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, options *PrivateLinkServicesClientGetPrivateEndpointConnectionOptions) (PrivateLinkServicesClientGetPrivateEndpointConnectionResponse, error) { req, err := client.getPrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, serviceName, peConnectionName, options) if err != nil { @@ -512,10 +524,11 @@ func (client *PrivateLinkServicesClient) getPrivateEndpointConnectionHandleRespo } // NewListPager - Gets all private link services in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - PrivateLinkServicesClientListOptions contains the optional parameters for the PrivateLinkServicesClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - options - PrivateLinkServicesClientListOptions contains the optional parameters for the PrivateLinkServicesClient.NewListPager +// method. func (client *PrivateLinkServicesClient) NewListPager(resourceGroupName string, options *PrivateLinkServicesClientListOptions) *runtime.Pager[PrivateLinkServicesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[PrivateLinkServicesClientListResponse]{ More: func(page PrivateLinkServicesClientListResponse) bool { @@ -577,10 +590,11 @@ func (client *PrivateLinkServicesClient) listHandleResponse(resp *http.Response) // NewListAutoApprovedPrivateLinkServicesPager - Returns all of the private link service ids that can be linked to a Private // Endpoint with auto approved in this subscription in this region. +// // Generated from API version 2022-07-01 -// location - The location of the domain name. -// options - PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesOptions contains the optional parameters for the -// PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServices method. +// - location - The location of the domain name. +// - options - PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesOptions contains the optional parameters for the +// PrivateLinkServicesClient.NewListAutoApprovedPrivateLinkServicesPager method. func (client *PrivateLinkServicesClient) NewListAutoApprovedPrivateLinkServicesPager(location string, options *PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesOptions) *runtime.Pager[PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse] { return runtime.NewPager(runtime.PagingHandler[PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse]{ More: func(page PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse) bool { @@ -642,11 +656,12 @@ func (client *PrivateLinkServicesClient) listAutoApprovedPrivateLinkServicesHand // NewListAutoApprovedPrivateLinkServicesByResourceGroupPager - Returns all of the private link service ids that can be linked // to a Private Endpoint with auto approved in this subscription in this region. +// // Generated from API version 2022-07-01 -// location - The location of the domain name. -// resourceGroupName - The name of the resource group. -// options - PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupOptions contains the optional parameters -// for the PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServicesByResourceGroup method. +// - location - The location of the domain name. +// - resourceGroupName - The name of the resource group. +// - options - PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupOptions contains the optional parameters +// for the PrivateLinkServicesClient.NewListAutoApprovedPrivateLinkServicesByResourceGroupPager method. func (client *PrivateLinkServicesClient) NewListAutoApprovedPrivateLinkServicesByResourceGroupPager(location string, resourceGroupName string, options *PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupOptions) *runtime.Pager[PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse]{ More: func(page PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse) bool { @@ -711,9 +726,10 @@ func (client *PrivateLinkServicesClient) listAutoApprovedPrivateLinkServicesByRe } // NewListBySubscriptionPager - Gets all private link service in a subscription. +// // Generated from API version 2022-07-01 -// options - PrivateLinkServicesClientListBySubscriptionOptions contains the optional parameters for the PrivateLinkServicesClient.ListBySubscription -// method. +// - options - PrivateLinkServicesClientListBySubscriptionOptions contains the optional parameters for the PrivateLinkServicesClient.NewListBySubscriptionPager +// method. func (client *PrivateLinkServicesClient) NewListBySubscriptionPager(options *PrivateLinkServicesClientListBySubscriptionOptions) *runtime.Pager[PrivateLinkServicesClientListBySubscriptionResponse] { return runtime.NewPager(runtime.PagingHandler[PrivateLinkServicesClientListBySubscriptionResponse]{ More: func(page PrivateLinkServicesClientListBySubscriptionResponse) bool { @@ -770,11 +786,12 @@ func (client *PrivateLinkServicesClient) listBySubscriptionHandleResponse(resp * } // NewListPrivateEndpointConnectionsPager - Gets all private end point connections for a specific private link service. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// serviceName - The name of the private link service. -// options - PrivateLinkServicesClientListPrivateEndpointConnectionsOptions contains the optional parameters for the PrivateLinkServicesClient.ListPrivateEndpointConnections -// method. +// - resourceGroupName - The name of the resource group. +// - serviceName - The name of the private link service. +// - options - PrivateLinkServicesClientListPrivateEndpointConnectionsOptions contains the optional parameters for the PrivateLinkServicesClient.NewListPrivateEndpointConnectionsPager +// method. func (client *PrivateLinkServicesClient) NewListPrivateEndpointConnectionsPager(resourceGroupName string, serviceName string, options *PrivateLinkServicesClientListPrivateEndpointConnectionsOptions) *runtime.Pager[PrivateLinkServicesClientListPrivateEndpointConnectionsResponse] { return runtime.NewPager(runtime.PagingHandler[PrivateLinkServicesClientListPrivateEndpointConnectionsResponse]{ More: func(page PrivateLinkServicesClientListPrivateEndpointConnectionsResponse) bool { @@ -840,13 +857,14 @@ func (client *PrivateLinkServicesClient) listPrivateEndpointConnectionsHandleRes // UpdatePrivateEndpointConnection - Approve or reject private end point connection for a private link service in a subscription. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// serviceName - The name of the private link service. -// peConnectionName - The name of the private end point connection. -// parameters - Parameters supplied to approve or reject the private end point connection. -// options - PrivateLinkServicesClientUpdatePrivateEndpointConnectionOptions contains the optional parameters for the PrivateLinkServicesClient.UpdatePrivateEndpointConnection -// method. +// - resourceGroupName - The name of the resource group. +// - serviceName - The name of the private link service. +// - peConnectionName - The name of the private end point connection. +// - parameters - Parameters supplied to approve or reject the private end point connection. +// - options - PrivateLinkServicesClientUpdatePrivateEndpointConnectionOptions contains the optional parameters for the PrivateLinkServicesClient.UpdatePrivateEndpointConnection +// method. func (client *PrivateLinkServicesClient) UpdatePrivateEndpointConnection(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, parameters PrivateEndpointConnection, options *PrivateLinkServicesClientUpdatePrivateEndpointConnectionOptions) (PrivateLinkServicesClientUpdatePrivateEndpointConnectionResponse, error) { req, err := client.updatePrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, serviceName, peConnectionName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/privatelinkservices_client_example_test.go b/sdk/resourcemanager/network/armnetwork/privatelinkservices_client_example_test.go deleted file mode 100644 index 95b914a57fef..000000000000 --- a/sdk/resourcemanager/network/armnetwork/privatelinkservices_client_example_test.go +++ /dev/null @@ -1,356 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PrivateLinkServiceDelete.json -func ExamplePrivateLinkServicesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPrivateLinkServicesClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "testPls", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PrivateLinkServiceGet.json -func ExamplePrivateLinkServicesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPrivateLinkServicesClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "testPls", &armnetwork.PrivateLinkServicesClientGetOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PrivateLinkServiceCreate.json -func ExamplePrivateLinkServicesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPrivateLinkServicesClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "testPls", armnetwork.PrivateLinkService{ - Location: to.Ptr("eastus"), - Properties: &armnetwork.PrivateLinkServiceProperties{ - AutoApproval: &armnetwork.PrivateLinkServicePropertiesAutoApproval{ - Subscriptions: []*string{ - to.Ptr("subscription1"), - to.Ptr("subscription2")}, - }, - Fqdns: []*string{ - to.Ptr("fqdn1"), - to.Ptr("fqdn2"), - to.Ptr("fqdn3")}, - IPConfigurations: []*armnetwork.PrivateLinkServiceIPConfiguration{ - { - Name: to.Ptr("fe-lb"), - Properties: &armnetwork.PrivateLinkServiceIPConfigurationProperties{ - PrivateIPAddress: to.Ptr("10.0.1.4"), - PrivateIPAddressVersion: to.Ptr(armnetwork.IPVersionIPv4), - PrivateIPAllocationMethod: to.Ptr(armnetwork.IPAllocationMethodStatic), - Subnet: &armnetwork.Subnet{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb"), - }, - }, - }}, - LoadBalancerFrontendIPConfigurations: []*armnetwork.FrontendIPConfiguration{ - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb"), - }}, - Visibility: &armnetwork.PrivateLinkServicePropertiesVisibility{ - Subscriptions: []*string{ - to.Ptr("subscription1"), - to.Ptr("subscription2"), - to.Ptr("subscription3")}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PrivateLinkServiceList.json -func ExamplePrivateLinkServicesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPrivateLinkServicesClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PrivateLinkServiceListAll.json -func ExamplePrivateLinkServicesClient_NewListBySubscriptionPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPrivateLinkServicesClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListBySubscriptionPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json -func ExamplePrivateLinkServicesClient_GetPrivateEndpointConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPrivateLinkServicesClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetPrivateEndpointConnection(ctx, "rg1", "testPls", "testPlePeConnection", &armnetwork.PrivateLinkServicesClientGetPrivateEndpointConnectionOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PrivateLinkServiceUpdatePrivateEndpointConnection.json -func ExamplePrivateLinkServicesClient_UpdatePrivateEndpointConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPrivateLinkServicesClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdatePrivateEndpointConnection(ctx, "rg1", "testPls", "testPlePeConnection", armnetwork.PrivateEndpointConnection{ - Name: to.Ptr("testPlePeConnection"), - Properties: &armnetwork.PrivateEndpointConnectionProperties{ - PrivateEndpoint: &armnetwork.PrivateEndpoint{ - ID: to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/testPe"), - }, - PrivateLinkServiceConnectionState: &armnetwork.PrivateLinkServiceConnectionState{ - Description: to.Ptr("approved it for some reason."), - Status: to.Ptr("Approved"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PrivateLinkServiceDeletePrivateEndpointConnection.json -func ExamplePrivateLinkServicesClient_BeginDeletePrivateEndpointConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPrivateLinkServicesClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDeletePrivateEndpointConnection(ctx, "rg1", "testPls", "testPlePeConnection", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PrivateLinkServiceListPrivateEndpointConnection.json -func ExamplePrivateLinkServicesClient_NewListPrivateEndpointConnectionsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPrivateLinkServicesClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPrivateEndpointConnectionsPager("rg1", "testPls", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/CheckPrivateLinkServiceVisibility.json -func ExamplePrivateLinkServicesClient_BeginCheckPrivateLinkServiceVisibility() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPrivateLinkServicesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCheckPrivateLinkServiceVisibility(ctx, "westus", armnetwork.CheckPrivateLinkServiceVisibilityRequest{ - PrivateLinkServiceAlias: to.Ptr("mypls.00000000-0000-0000-0000-000000000000.azure.privatelinkservice"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/CheckPrivateLinkServiceVisibilityByResourceGroup.json -func ExamplePrivateLinkServicesClient_BeginCheckPrivateLinkServiceVisibilityByResourceGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPrivateLinkServicesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCheckPrivateLinkServiceVisibilityByResourceGroup(ctx, "westus", "rg1", armnetwork.CheckPrivateLinkServiceVisibilityRequest{ - PrivateLinkServiceAlias: to.Ptr("mypls.00000000-0000-0000-0000-000000000000.azure.privatelinkservice"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/AutoApprovedPrivateLinkServicesGet.json -func ExamplePrivateLinkServicesClient_NewListAutoApprovedPrivateLinkServicesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPrivateLinkServicesClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListAutoApprovedPrivateLinkServicesPager("regionName", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/AutoApprovedPrivateLinkServicesResourceGroupGet.json -func ExamplePrivateLinkServicesClient_NewListAutoApprovedPrivateLinkServicesByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPrivateLinkServicesClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListAutoApprovedPrivateLinkServicesByResourceGroupPager("regionName", "rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/profiles_client.go b/sdk/resourcemanager/network/armnetwork/profiles_client.go index 1350815eb19c..d70980433178 100644 --- a/sdk/resourcemanager/network/armnetwork/profiles_client.go +++ b/sdk/resourcemanager/network/armnetwork/profiles_client.go @@ -32,10 +32,10 @@ type ProfilesClient struct { } // NewProfilesClient creates a new instance of ProfilesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewProfilesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProfilesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,11 +58,12 @@ func NewProfilesClient(subscriptionID string, credential azcore.TokenCredential, // CreateOrUpdate - Creates or updates a network profile. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkProfileName - The name of the network profile. -// parameters - Parameters supplied to the create or update network profile operation. -// options - ProfilesClientCreateOrUpdateOptions contains the optional parameters for the ProfilesClient.CreateOrUpdate method. +// - resourceGroupName - The name of the resource group. +// - networkProfileName - The name of the network profile. +// - parameters - Parameters supplied to the create or update network profile operation. +// - options - ProfilesClientCreateOrUpdateOptions contains the optional parameters for the ProfilesClient.CreateOrUpdate method. func (client *ProfilesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkProfileName string, parameters Profile, options *ProfilesClientCreateOrUpdateOptions) (ProfilesClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkProfileName, parameters, options) if err != nil { @@ -115,10 +116,11 @@ func (client *ProfilesClient) createOrUpdateHandleResponse(resp *http.Response) // BeginDelete - Deletes the specified network profile. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkProfileName - The name of the NetworkProfile. -// options - ProfilesClientBeginDeleteOptions contains the optional parameters for the ProfilesClient.BeginDelete method. +// - resourceGroupName - The name of the resource group. +// - networkProfileName - The name of the NetworkProfile. +// - options - ProfilesClientBeginDeleteOptions contains the optional parameters for the ProfilesClient.BeginDelete method. func (client *ProfilesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkProfileName string, options *ProfilesClientBeginDeleteOptions) (*runtime.Poller[ProfilesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, networkProfileName, options) @@ -135,6 +137,7 @@ func (client *ProfilesClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Deletes the specified network profile. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ProfilesClient) deleteOperation(ctx context.Context, resourceGroupName string, networkProfileName string, options *ProfilesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkProfileName, options) @@ -179,10 +182,11 @@ func (client *ProfilesClient) deleteCreateRequest(ctx context.Context, resourceG // Get - Gets the specified network profile in a specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkProfileName - The name of the public IP prefix. -// options - ProfilesClientGetOptions contains the optional parameters for the ProfilesClient.Get method. +// - resourceGroupName - The name of the resource group. +// - networkProfileName - The name of the public IP prefix. +// - options - ProfilesClientGetOptions contains the optional parameters for the ProfilesClient.Get method. func (client *ProfilesClient) Get(ctx context.Context, resourceGroupName string, networkProfileName string, options *ProfilesClientGetOptions) (ProfilesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, networkProfileName, options) if err != nil { @@ -237,9 +241,10 @@ func (client *ProfilesClient) getHandleResponse(resp *http.Response) (ProfilesCl } // NewListPager - Gets all network profiles in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - ProfilesClientListOptions contains the optional parameters for the ProfilesClient.List method. +// - resourceGroupName - The name of the resource group. +// - options - ProfilesClientListOptions contains the optional parameters for the ProfilesClient.NewListPager method. func (client *ProfilesClient) NewListPager(resourceGroupName string, options *ProfilesClientListOptions) *runtime.Pager[ProfilesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ProfilesClientListResponse]{ More: func(page ProfilesClientListResponse) bool { @@ -300,8 +305,9 @@ func (client *ProfilesClient) listHandleResponse(resp *http.Response) (ProfilesC } // NewListAllPager - Gets all the network profiles in a subscription. +// // Generated from API version 2022-07-01 -// options - ProfilesClientListAllOptions contains the optional parameters for the ProfilesClient.ListAll method. +// - options - ProfilesClientListAllOptions contains the optional parameters for the ProfilesClient.NewListAllPager method. func (client *ProfilesClient) NewListAllPager(options *ProfilesClientListAllOptions) *runtime.Pager[ProfilesClientListAllResponse] { return runtime.NewPager(runtime.PagingHandler[ProfilesClientListAllResponse]{ More: func(page ProfilesClientListAllResponse) bool { @@ -359,11 +365,12 @@ func (client *ProfilesClient) listAllHandleResponse(resp *http.Response) (Profil // UpdateTags - Updates network profile tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkProfileName - The name of the network profile. -// parameters - Parameters supplied to update network profile tags. -// options - ProfilesClientUpdateTagsOptions contains the optional parameters for the ProfilesClient.UpdateTags method. +// - resourceGroupName - The name of the resource group. +// - networkProfileName - The name of the network profile. +// - parameters - Parameters supplied to update network profile tags. +// - options - ProfilesClientUpdateTagsOptions contains the optional parameters for the ProfilesClient.UpdateTags method. func (client *ProfilesClient) UpdateTags(ctx context.Context, resourceGroupName string, networkProfileName string, parameters TagsObject, options *ProfilesClientUpdateTagsOptions) (ProfilesClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, networkProfileName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/profiles_client_example_test.go b/sdk/resourcemanager/network/armnetwork/profiles_client_example_test.go deleted file mode 100644 index ab20f37c3189..000000000000 --- a/sdk/resourcemanager/network/armnetwork/profiles_client_example_test.go +++ /dev/null @@ -1,187 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkProfileDelete.json -func ExampleProfilesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewProfilesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "networkProfile1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkProfileGetConfigOnly.json -func ExampleProfilesClient_Get_getNetworkProfile() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewProfilesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "networkProfile1", &armnetwork.ProfilesClientGetOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkProfileGetWithContainerNic.json -func ExampleProfilesClient_Get_getNetworkProfileWithContainerNetworkInterfaces() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewProfilesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "networkProfile1", &armnetwork.ProfilesClientGetOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkProfileCreateConfigOnly.json -func ExampleProfilesClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewProfilesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, "rg1", "networkProfile1", armnetwork.Profile{ - Location: to.Ptr("westus"), - Properties: &armnetwork.ProfilePropertiesFormat{ - ContainerNetworkInterfaceConfigurations: []*armnetwork.ContainerNetworkInterfaceConfiguration{ - { - Name: to.Ptr("eth1"), - Properties: &armnetwork.ContainerNetworkInterfaceConfigurationPropertiesFormat{ - IPConfigurations: []*armnetwork.IPConfigurationProfile{ - { - Name: to.Ptr("ipconfig1"), - Properties: &armnetwork.IPConfigurationProfilePropertiesFormat{ - Subnet: &armnetwork.Subnet{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/networkProfileVnet/subnets/networkProfileSubnet1"), - }, - }, - }}, - }, - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkProfileUpdateTags.json -func ExampleProfilesClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewProfilesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, "rg1", "test-np", armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkProfileListAll.json -func ExampleProfilesClient_NewListAllPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewProfilesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListAllPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkProfileList.json -func ExampleProfilesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewProfilesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/publicipaddresses_client.go b/sdk/resourcemanager/network/armnetwork/publicipaddresses_client.go index be3aab210924..eea5c4f7814c 100644 --- a/sdk/resourcemanager/network/armnetwork/publicipaddresses_client.go +++ b/sdk/resourcemanager/network/armnetwork/publicipaddresses_client.go @@ -32,10 +32,10 @@ type PublicIPAddressesClient struct { } // NewPublicIPAddressesClient creates a new instance of PublicIPAddressesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewPublicIPAddressesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PublicIPAddressesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewPublicIPAddressesClient(subscriptionID string, credential azcore.TokenCr // BeginCreateOrUpdate - Creates or updates a static or dynamic public IP address. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// publicIPAddressName - The name of the public IP address. -// parameters - Parameters supplied to the create or update public IP address operation. -// options - PublicIPAddressesClientBeginCreateOrUpdateOptions contains the optional parameters for the PublicIPAddressesClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - publicIPAddressName - The name of the public IP address. +// - parameters - Parameters supplied to the create or update public IP address operation. +// - options - PublicIPAddressesClientBeginCreateOrUpdateOptions contains the optional parameters for the PublicIPAddressesClient.BeginCreateOrUpdate +// method. func (client *PublicIPAddressesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters PublicIPAddress, options *PublicIPAddressesClientBeginCreateOrUpdateOptions) (*runtime.Poller[PublicIPAddressesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, publicIPAddressName, parameters, options) @@ -80,6 +81,7 @@ func (client *PublicIPAddressesClient) BeginCreateOrUpdate(ctx context.Context, // CreateOrUpdate - Creates or updates a static or dynamic public IP address. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *PublicIPAddressesClient) createOrUpdate(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters PublicIPAddress, options *PublicIPAddressesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, publicIPAddressName, parameters, options) @@ -124,11 +126,12 @@ func (client *PublicIPAddressesClient) createOrUpdateCreateRequest(ctx context.C // BeginDdosProtectionStatus - Gets the Ddos Protection Status of a Public IP Address // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// publicIPAddressName - The name of the public IP address. -// options - PublicIPAddressesClientBeginDdosProtectionStatusOptions contains the optional parameters for the PublicIPAddressesClient.BeginDdosProtectionStatus -// method. +// - resourceGroupName - The name of the resource group. +// - publicIPAddressName - The name of the public IP address. +// - options - PublicIPAddressesClientBeginDdosProtectionStatusOptions contains the optional parameters for the PublicIPAddressesClient.BeginDdosProtectionStatus +// method. func (client *PublicIPAddressesClient) BeginDdosProtectionStatus(ctx context.Context, resourceGroupName string, publicIPAddressName string, options *PublicIPAddressesClientBeginDdosProtectionStatusOptions) (*runtime.Poller[PublicIPAddressesClientDdosProtectionStatusResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.ddosProtectionStatus(ctx, resourceGroupName, publicIPAddressName, options) @@ -145,6 +148,7 @@ func (client *PublicIPAddressesClient) BeginDdosProtectionStatus(ctx context.Con // DdosProtectionStatus - Gets the Ddos Protection Status of a Public IP Address // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *PublicIPAddressesClient) ddosProtectionStatus(ctx context.Context, resourceGroupName string, publicIPAddressName string, options *PublicIPAddressesClientBeginDdosProtectionStatusOptions) (*http.Response, error) { req, err := client.ddosProtectionStatusCreateRequest(ctx, resourceGroupName, publicIPAddressName, options) @@ -189,11 +193,12 @@ func (client *PublicIPAddressesClient) ddosProtectionStatusCreateRequest(ctx con // BeginDelete - Deletes the specified public IP address. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// publicIPAddressName - The name of the public IP address. -// options - PublicIPAddressesClientBeginDeleteOptions contains the optional parameters for the PublicIPAddressesClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - publicIPAddressName - The name of the public IP address. +// - options - PublicIPAddressesClientBeginDeleteOptions contains the optional parameters for the PublicIPAddressesClient.BeginDelete +// method. func (client *PublicIPAddressesClient) BeginDelete(ctx context.Context, resourceGroupName string, publicIPAddressName string, options *PublicIPAddressesClientBeginDeleteOptions) (*runtime.Poller[PublicIPAddressesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, publicIPAddressName, options) @@ -210,6 +215,7 @@ func (client *PublicIPAddressesClient) BeginDelete(ctx context.Context, resource // Delete - Deletes the specified public IP address. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *PublicIPAddressesClient) deleteOperation(ctx context.Context, resourceGroupName string, publicIPAddressName string, options *PublicIPAddressesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, publicIPAddressName, options) @@ -254,10 +260,11 @@ func (client *PublicIPAddressesClient) deleteCreateRequest(ctx context.Context, // Get - Gets the specified public IP address in a specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// publicIPAddressName - The name of the public IP address. -// options - PublicIPAddressesClientGetOptions contains the optional parameters for the PublicIPAddressesClient.Get method. +// - resourceGroupName - The name of the resource group. +// - publicIPAddressName - The name of the public IP address. +// - options - PublicIPAddressesClientGetOptions contains the optional parameters for the PublicIPAddressesClient.Get method. func (client *PublicIPAddressesClient) Get(ctx context.Context, resourceGroupName string, publicIPAddressName string, options *PublicIPAddressesClientGetOptions) (PublicIPAddressesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, publicIPAddressName, options) if err != nil { @@ -313,15 +320,16 @@ func (client *PublicIPAddressesClient) getHandleResponse(resp *http.Response) (P // GetCloudServicePublicIPAddress - Get the specified public IP address in a cloud service. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// cloudServiceName - The name of the cloud service. -// roleInstanceName - The role instance name. -// networkInterfaceName - The name of the network interface. -// ipConfigurationName - The name of the IP configuration. -// publicIPAddressName - The name of the public IP Address. -// options - PublicIPAddressesClientGetCloudServicePublicIPAddressOptions contains the optional parameters for the PublicIPAddressesClient.GetCloudServicePublicIPAddress -// method. +// - resourceGroupName - The name of the resource group. +// - cloudServiceName - The name of the cloud service. +// - roleInstanceName - The role instance name. +// - networkInterfaceName - The name of the network interface. +// - ipConfigurationName - The name of the IP configuration. +// - publicIPAddressName - The name of the public IP Address. +// - options - PublicIPAddressesClientGetCloudServicePublicIPAddressOptions contains the optional parameters for the PublicIPAddressesClient.GetCloudServicePublicIPAddress +// method. func (client *PublicIPAddressesClient) GetCloudServicePublicIPAddress(ctx context.Context, resourceGroupName string, cloudServiceName string, roleInstanceName string, networkInterfaceName string, ipConfigurationName string, publicIPAddressName string, options *PublicIPAddressesClientGetCloudServicePublicIPAddressOptions) (PublicIPAddressesClientGetCloudServicePublicIPAddressResponse, error) { req, err := client.getCloudServicePublicIPAddressCreateRequest(ctx, resourceGroupName, cloudServiceName, roleInstanceName, networkInterfaceName, ipConfigurationName, publicIPAddressName, options) if err != nil { @@ -393,15 +401,16 @@ func (client *PublicIPAddressesClient) getCloudServicePublicIPAddressHandleRespo // GetVirtualMachineScaleSetPublicIPAddress - Get the specified public IP address in a virtual machine scale set. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2018-10-01 -// resourceGroupName - The name of the resource group. -// virtualMachineScaleSetName - The name of the virtual machine scale set. -// virtualmachineIndex - The virtual machine index. -// networkInterfaceName - The name of the network interface. -// ipConfigurationName - The name of the IP configuration. -// publicIPAddressName - The name of the public IP Address. -// options - PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressOptions contains the optional parameters for the -// PublicIPAddressesClient.GetVirtualMachineScaleSetPublicIPAddress method. +// - resourceGroupName - The name of the resource group. +// - virtualMachineScaleSetName - The name of the virtual machine scale set. +// - virtualmachineIndex - The virtual machine index. +// - networkInterfaceName - The name of the network interface. +// - ipConfigurationName - The name of the IP configuration. +// - publicIPAddressName - The name of the public IP Address. +// - options - PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressOptions contains the optional parameters for the +// PublicIPAddressesClient.GetVirtualMachineScaleSetPublicIPAddress method. func (client *PublicIPAddressesClient) GetVirtualMachineScaleSetPublicIPAddress(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, ipConfigurationName string, publicIPAddressName string, options *PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressOptions) (PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResponse, error) { req, err := client.getVirtualMachineScaleSetPublicIPAddressCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, publicIPAddressName, options) if err != nil { @@ -472,9 +481,11 @@ func (client *PublicIPAddressesClient) getVirtualMachineScaleSetPublicIPAddressH } // NewListPager - Gets all public IP addresses in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - PublicIPAddressesClientListOptions contains the optional parameters for the PublicIPAddressesClient.List method. +// - resourceGroupName - The name of the resource group. +// - options - PublicIPAddressesClientListOptions contains the optional parameters for the PublicIPAddressesClient.NewListPager +// method. func (client *PublicIPAddressesClient) NewListPager(resourceGroupName string, options *PublicIPAddressesClientListOptions) *runtime.Pager[PublicIPAddressesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[PublicIPAddressesClientListResponse]{ More: func(page PublicIPAddressesClientListResponse) bool { @@ -535,9 +546,10 @@ func (client *PublicIPAddressesClient) listHandleResponse(resp *http.Response) ( } // NewListAllPager - Gets all the public IP addresses in a subscription. +// // Generated from API version 2022-07-01 -// options - PublicIPAddressesClientListAllOptions contains the optional parameters for the PublicIPAddressesClient.ListAll -// method. +// - options - PublicIPAddressesClientListAllOptions contains the optional parameters for the PublicIPAddressesClient.NewListAllPager +// method. func (client *PublicIPAddressesClient) NewListAllPager(options *PublicIPAddressesClientListAllOptions) *runtime.Pager[PublicIPAddressesClientListAllResponse] { return runtime.NewPager(runtime.PagingHandler[PublicIPAddressesClientListAllResponse]{ More: func(page PublicIPAddressesClientListAllResponse) bool { @@ -594,11 +606,12 @@ func (client *PublicIPAddressesClient) listAllHandleResponse(resp *http.Response } // NewListCloudServicePublicIPAddressesPager - Gets information about all public IP addresses on a cloud service level. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// cloudServiceName - The name of the cloud service. -// options - PublicIPAddressesClientListCloudServicePublicIPAddressesOptions contains the optional parameters for the PublicIPAddressesClient.ListCloudServicePublicIPAddresses -// method. +// - resourceGroupName - The name of the resource group. +// - cloudServiceName - The name of the cloud service. +// - options - PublicIPAddressesClientListCloudServicePublicIPAddressesOptions contains the optional parameters for the PublicIPAddressesClient.NewListCloudServicePublicIPAddressesPager +// method. func (client *PublicIPAddressesClient) NewListCloudServicePublicIPAddressesPager(resourceGroupName string, cloudServiceName string, options *PublicIPAddressesClientListCloudServicePublicIPAddressesOptions) *runtime.Pager[PublicIPAddressesClientListCloudServicePublicIPAddressesResponse] { return runtime.NewPager(runtime.PagingHandler[PublicIPAddressesClientListCloudServicePublicIPAddressesResponse]{ More: func(page PublicIPAddressesClientListCloudServicePublicIPAddressesResponse) bool { @@ -664,14 +677,15 @@ func (client *PublicIPAddressesClient) listCloudServicePublicIPAddressesHandleRe // NewListCloudServiceRoleInstancePublicIPAddressesPager - Gets information about all public IP addresses in a role instance // IP configuration in a cloud service. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// cloudServiceName - The name of the cloud service. -// roleInstanceName - The name of role instance. -// networkInterfaceName - The network interface name. -// ipConfigurationName - The IP configuration name. -// options - PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesOptions contains the optional parameters -// for the PublicIPAddressesClient.ListCloudServiceRoleInstancePublicIPAddresses method. +// - resourceGroupName - The name of the resource group. +// - cloudServiceName - The name of the cloud service. +// - roleInstanceName - The name of role instance. +// - networkInterfaceName - The network interface name. +// - ipConfigurationName - The IP configuration name. +// - options - PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesOptions contains the optional parameters +// for the PublicIPAddressesClient.NewListCloudServiceRoleInstancePublicIPAddressesPager method. func (client *PublicIPAddressesClient) NewListCloudServiceRoleInstancePublicIPAddressesPager(resourceGroupName string, cloudServiceName string, roleInstanceName string, networkInterfaceName string, ipConfigurationName string, options *PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesOptions) *runtime.Pager[PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse] { return runtime.NewPager(runtime.PagingHandler[PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse]{ More: func(page PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse) bool { @@ -749,11 +763,12 @@ func (client *PublicIPAddressesClient) listCloudServiceRoleInstancePublicIPAddre // NewListVirtualMachineScaleSetPublicIPAddressesPager - Gets information about all public IP addresses on a virtual machine // scale set level. +// // Generated from API version 2018-10-01 -// resourceGroupName - The name of the resource group. -// virtualMachineScaleSetName - The name of the virtual machine scale set. -// options - PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesOptions contains the optional parameters for -// the PublicIPAddressesClient.ListVirtualMachineScaleSetPublicIPAddresses method. +// - resourceGroupName - The name of the resource group. +// - virtualMachineScaleSetName - The name of the virtual machine scale set. +// - options - PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesOptions contains the optional parameters for +// the PublicIPAddressesClient.NewListVirtualMachineScaleSetPublicIPAddressesPager method. func (client *PublicIPAddressesClient) NewListVirtualMachineScaleSetPublicIPAddressesPager(resourceGroupName string, virtualMachineScaleSetName string, options *PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesOptions) *runtime.Pager[PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse] { return runtime.NewPager(runtime.PagingHandler[PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse]{ More: func(page PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse) bool { @@ -819,14 +834,15 @@ func (client *PublicIPAddressesClient) listVirtualMachineScaleSetPublicIPAddress // NewListVirtualMachineScaleSetVMPublicIPAddressesPager - Gets information about all public IP addresses in a virtual machine // IP configuration in a virtual machine scale set. +// // Generated from API version 2018-10-01 -// resourceGroupName - The name of the resource group. -// virtualMachineScaleSetName - The name of the virtual machine scale set. -// virtualmachineIndex - The virtual machine index. -// networkInterfaceName - The network interface name. -// ipConfigurationName - The IP configuration name. -// options - PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesOptions contains the optional parameters -// for the PublicIPAddressesClient.ListVirtualMachineScaleSetVMPublicIPAddresses method. +// - resourceGroupName - The name of the resource group. +// - virtualMachineScaleSetName - The name of the virtual machine scale set. +// - virtualmachineIndex - The virtual machine index. +// - networkInterfaceName - The network interface name. +// - ipConfigurationName - The IP configuration name. +// - options - PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesOptions contains the optional parameters +// for the PublicIPAddressesClient.NewListVirtualMachineScaleSetVMPublicIPAddressesPager method. func (client *PublicIPAddressesClient) NewListVirtualMachineScaleSetVMPublicIPAddressesPager(resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, ipConfigurationName string, options *PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesOptions) *runtime.Pager[PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse] { return runtime.NewPager(runtime.PagingHandler[PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse]{ More: func(page PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse) bool { @@ -904,12 +920,13 @@ func (client *PublicIPAddressesClient) listVirtualMachineScaleSetVMPublicIPAddre // UpdateTags - Updates public IP address tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// publicIPAddressName - The name of the public IP address. -// parameters - Parameters supplied to update public IP address tags. -// options - PublicIPAddressesClientUpdateTagsOptions contains the optional parameters for the PublicIPAddressesClient.UpdateTags -// method. +// - resourceGroupName - The name of the resource group. +// - publicIPAddressName - The name of the public IP address. +// - parameters - Parameters supplied to update public IP address tags. +// - options - PublicIPAddressesClientUpdateTagsOptions contains the optional parameters for the PublicIPAddressesClient.UpdateTags +// method. func (client *PublicIPAddressesClient) UpdateTags(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters TagsObject, options *PublicIPAddressesClientUpdateTagsOptions) (PublicIPAddressesClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, publicIPAddressName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/publicipaddresses_client_example_test.go b/sdk/resourcemanager/network/armnetwork/publicipaddresses_client_example_test.go deleted file mode 100644 index 35719b24342b..000000000000 --- a/sdk/resourcemanager/network/armnetwork/publicipaddresses_client_example_test.go +++ /dev/null @@ -1,376 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/CloudServicePublicIpListAll.json -func ExamplePublicIPAddressesClient_NewListCloudServicePublicIPAddressesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPublicIPAddressesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListCloudServicePublicIPAddressesPager("cs-tester", "cs1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/CloudServiceRoleInstancePublicIpList.json -func ExamplePublicIPAddressesClient_NewListCloudServiceRoleInstancePublicIPAddressesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPublicIPAddressesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListCloudServiceRoleInstancePublicIPAddressesPager("cs-tester", "cs1", "Test_VM_0", "nic1", "ip1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/CloudServicePublicIpGet.json -func ExamplePublicIPAddressesClient_GetCloudServicePublicIPAddress() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPublicIPAddressesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetCloudServicePublicIPAddress(ctx, "cs-tester", "cs1", "Test_VM_0", "nic1", "ip1", "pub1", &armnetwork.PublicIPAddressesClientGetCloudServicePublicIPAddressOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PublicIpAddressDelete.json -func ExamplePublicIPAddressesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPublicIPAddressesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "test-ip", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PublicIpAddressGet.json -func ExamplePublicIPAddressesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPublicIPAddressesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "testDNS-ip", &armnetwork.PublicIPAddressesClientGetOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PublicIpAddressCreateDns.json -func ExamplePublicIPAddressesClient_BeginCreateOrUpdate_createPublicIpAddressDns() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPublicIPAddressesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "test-ip", armnetwork.PublicIPAddress{ - Location: to.Ptr("eastus"), - Properties: &armnetwork.PublicIPAddressPropertiesFormat{ - DNSSettings: &armnetwork.PublicIPAddressDNSSettings{ - DomainNameLabel: to.Ptr("dnslbl"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PublicIpAddressCreateCustomizedValues.json -func ExamplePublicIPAddressesClient_BeginCreateOrUpdate_createPublicIpAddressAllocationMethod() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPublicIPAddressesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "test-ip", armnetwork.PublicIPAddress{ - Location: to.Ptr("eastus"), - Properties: &armnetwork.PublicIPAddressPropertiesFormat{ - IdleTimeoutInMinutes: to.Ptr[int32](10), - PublicIPAddressVersion: to.Ptr(armnetwork.IPVersionIPv4), - PublicIPAllocationMethod: to.Ptr(armnetwork.IPAllocationMethodStatic), - }, - SKU: &armnetwork.PublicIPAddressSKU{ - Name: to.Ptr(armnetwork.PublicIPAddressSKUNameStandard), - Tier: to.Ptr(armnetwork.PublicIPAddressSKUTierGlobal), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PublicIpAddressCreateDefaults.json -func ExamplePublicIPAddressesClient_BeginCreateOrUpdate_createPublicIpAddressDefaults() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPublicIPAddressesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "test-ip", armnetwork.PublicIPAddress{ - Location: to.Ptr("eastus"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PublicIpAddressUpdateTags.json -func ExamplePublicIPAddressesClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPublicIPAddressesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, "rg1", "test-ip", armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PublicIpAddressListAll.json -func ExamplePublicIPAddressesClient_NewListAllPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPublicIPAddressesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListAllPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PublicIpAddressList.json -func ExamplePublicIPAddressesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPublicIPAddressesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PublicIpAddressGetDdosProtectionStatus.json -func ExamplePublicIPAddressesClient_BeginDdosProtectionStatus() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPublicIPAddressesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDdosProtectionStatus(ctx, "rg1", "test-pip", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VmssPublicIpListAll.json -func ExamplePublicIPAddressesClient_NewListVirtualMachineScaleSetPublicIPAddressesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPublicIPAddressesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListVirtualMachineScaleSetPublicIPAddressesPager("vmss-tester", "vmss1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VmssVmPublicIpList.json -func ExamplePublicIPAddressesClient_NewListVirtualMachineScaleSetVMPublicIPAddressesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPublicIPAddressesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListVirtualMachineScaleSetVMPublicIPAddressesPager("vmss-tester", "vmss1", "1", "nic1", "ip1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VmssPublicIpGet.json -func ExamplePublicIPAddressesClient_GetVirtualMachineScaleSetPublicIPAddress() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPublicIPAddressesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetVirtualMachineScaleSetPublicIPAddress(ctx, "vmss-tester", "vmss1", "1", "nic1", "ip1", "pub1", &armnetwork.PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/publicipprefixes_client.go b/sdk/resourcemanager/network/armnetwork/publicipprefixes_client.go index d3dbe2b1eb49..0da4352b6533 100644 --- a/sdk/resourcemanager/network/armnetwork/publicipprefixes_client.go +++ b/sdk/resourcemanager/network/armnetwork/publicipprefixes_client.go @@ -32,10 +32,10 @@ type PublicIPPrefixesClient struct { } // NewPublicIPPrefixesClient creates a new instance of PublicIPPrefixesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewPublicIPPrefixesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PublicIPPrefixesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewPublicIPPrefixesClient(subscriptionID string, credential azcore.TokenCre // BeginCreateOrUpdate - Creates or updates a static or dynamic public IP prefix. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// publicIPPrefixName - The name of the public IP prefix. -// parameters - Parameters supplied to the create or update public IP prefix operation. -// options - PublicIPPrefixesClientBeginCreateOrUpdateOptions contains the optional parameters for the PublicIPPrefixesClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - publicIPPrefixName - The name of the public IP prefix. +// - parameters - Parameters supplied to the create or update public IP prefix operation. +// - options - PublicIPPrefixesClientBeginCreateOrUpdateOptions contains the optional parameters for the PublicIPPrefixesClient.BeginCreateOrUpdate +// method. func (client *PublicIPPrefixesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters PublicIPPrefix, options *PublicIPPrefixesClientBeginCreateOrUpdateOptions) (*runtime.Poller[PublicIPPrefixesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, publicIPPrefixName, parameters, options) @@ -80,6 +81,7 @@ func (client *PublicIPPrefixesClient) BeginCreateOrUpdate(ctx context.Context, r // CreateOrUpdate - Creates or updates a static or dynamic public IP prefix. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *PublicIPPrefixesClient) createOrUpdate(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters PublicIPPrefix, options *PublicIPPrefixesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, publicIPPrefixName, parameters, options) @@ -124,11 +126,12 @@ func (client *PublicIPPrefixesClient) createOrUpdateCreateRequest(ctx context.Co // BeginDelete - Deletes the specified public IP prefix. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// publicIPPrefixName - The name of the PublicIpPrefix. -// options - PublicIPPrefixesClientBeginDeleteOptions contains the optional parameters for the PublicIPPrefixesClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - publicIPPrefixName - The name of the PublicIpPrefix. +// - options - PublicIPPrefixesClientBeginDeleteOptions contains the optional parameters for the PublicIPPrefixesClient.BeginDelete +// method. func (client *PublicIPPrefixesClient) BeginDelete(ctx context.Context, resourceGroupName string, publicIPPrefixName string, options *PublicIPPrefixesClientBeginDeleteOptions) (*runtime.Poller[PublicIPPrefixesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, publicIPPrefixName, options) @@ -145,6 +148,7 @@ func (client *PublicIPPrefixesClient) BeginDelete(ctx context.Context, resourceG // Delete - Deletes the specified public IP prefix. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *PublicIPPrefixesClient) deleteOperation(ctx context.Context, resourceGroupName string, publicIPPrefixName string, options *PublicIPPrefixesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, publicIPPrefixName, options) @@ -189,10 +193,11 @@ func (client *PublicIPPrefixesClient) deleteCreateRequest(ctx context.Context, r // Get - Gets the specified public IP prefix in a specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// publicIPPrefixName - The name of the public IP prefix. -// options - PublicIPPrefixesClientGetOptions contains the optional parameters for the PublicIPPrefixesClient.Get method. +// - resourceGroupName - The name of the resource group. +// - publicIPPrefixName - The name of the public IP prefix. +// - options - PublicIPPrefixesClientGetOptions contains the optional parameters for the PublicIPPrefixesClient.Get method. func (client *PublicIPPrefixesClient) Get(ctx context.Context, resourceGroupName string, publicIPPrefixName string, options *PublicIPPrefixesClientGetOptions) (PublicIPPrefixesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, publicIPPrefixName, options) if err != nil { @@ -247,9 +252,11 @@ func (client *PublicIPPrefixesClient) getHandleResponse(resp *http.Response) (Pu } // NewListPager - Gets all public IP prefixes in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - PublicIPPrefixesClientListOptions contains the optional parameters for the PublicIPPrefixesClient.List method. +// - resourceGroupName - The name of the resource group. +// - options - PublicIPPrefixesClientListOptions contains the optional parameters for the PublicIPPrefixesClient.NewListPager +// method. func (client *PublicIPPrefixesClient) NewListPager(resourceGroupName string, options *PublicIPPrefixesClientListOptions) *runtime.Pager[PublicIPPrefixesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[PublicIPPrefixesClientListResponse]{ More: func(page PublicIPPrefixesClientListResponse) bool { @@ -310,9 +317,10 @@ func (client *PublicIPPrefixesClient) listHandleResponse(resp *http.Response) (P } // NewListAllPager - Gets all the public IP prefixes in a subscription. +// // Generated from API version 2022-07-01 -// options - PublicIPPrefixesClientListAllOptions contains the optional parameters for the PublicIPPrefixesClient.ListAll -// method. +// - options - PublicIPPrefixesClientListAllOptions contains the optional parameters for the PublicIPPrefixesClient.NewListAllPager +// method. func (client *PublicIPPrefixesClient) NewListAllPager(options *PublicIPPrefixesClientListAllOptions) *runtime.Pager[PublicIPPrefixesClientListAllResponse] { return runtime.NewPager(runtime.PagingHandler[PublicIPPrefixesClientListAllResponse]{ More: func(page PublicIPPrefixesClientListAllResponse) bool { @@ -370,12 +378,13 @@ func (client *PublicIPPrefixesClient) listAllHandleResponse(resp *http.Response) // UpdateTags - Updates public IP prefix tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// publicIPPrefixName - The name of the public IP prefix. -// parameters - Parameters supplied to update public IP prefix tags. -// options - PublicIPPrefixesClientUpdateTagsOptions contains the optional parameters for the PublicIPPrefixesClient.UpdateTags -// method. +// - resourceGroupName - The name of the resource group. +// - publicIPPrefixName - The name of the public IP prefix. +// - parameters - Parameters supplied to update public IP prefix tags. +// - options - PublicIPPrefixesClientUpdateTagsOptions contains the optional parameters for the PublicIPPrefixesClient.UpdateTags +// method. func (client *PublicIPPrefixesClient) UpdateTags(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters TagsObject, options *PublicIPPrefixesClientUpdateTagsOptions) (PublicIPPrefixesClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, publicIPPrefixName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/publicipprefixes_client_example_test.go b/sdk/resourcemanager/network/armnetwork/publicipprefixes_client_example_test.go deleted file mode 100644 index 8d02129c0232..000000000000 --- a/sdk/resourcemanager/network/armnetwork/publicipprefixes_client_example_test.go +++ /dev/null @@ -1,194 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PublicIpPrefixDelete.json -func ExamplePublicIPPrefixesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPublicIPPrefixesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "test-ipprefix", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PublicIpPrefixGet.json -func ExamplePublicIPPrefixesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPublicIPPrefixesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "test-ipprefix", &armnetwork.PublicIPPrefixesClientGetOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PublicIpPrefixCreateCustomizedValues.json -func ExamplePublicIPPrefixesClient_BeginCreateOrUpdate_createPublicIpPrefixAllocationMethod() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPublicIPPrefixesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "test-ipprefix", armnetwork.PublicIPPrefix{ - Location: to.Ptr("westus"), - Properties: &armnetwork.PublicIPPrefixPropertiesFormat{ - PrefixLength: to.Ptr[int32](30), - PublicIPAddressVersion: to.Ptr(armnetwork.IPVersionIPv4), - }, - SKU: &armnetwork.PublicIPPrefixSKU{ - Name: to.Ptr(armnetwork.PublicIPPrefixSKUNameStandard), - Tier: to.Ptr(armnetwork.PublicIPPrefixSKUTierRegional), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PublicIpPrefixCreateDefaults.json -func ExamplePublicIPPrefixesClient_BeginCreateOrUpdate_createPublicIpPrefixDefaults() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPublicIPPrefixesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "test-ipprefix", armnetwork.PublicIPPrefix{ - Location: to.Ptr("westus"), - Properties: &armnetwork.PublicIPPrefixPropertiesFormat{ - PrefixLength: to.Ptr[int32](30), - }, - SKU: &armnetwork.PublicIPPrefixSKU{ - Name: to.Ptr(armnetwork.PublicIPPrefixSKUNameStandard), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PublicIpPrefixUpdateTags.json -func ExamplePublicIPPrefixesClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPublicIPPrefixesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, "rg1", "test-ipprefix", armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PublicIpPrefixListAll.json -func ExamplePublicIPPrefixesClient_NewListAllPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPublicIPPrefixesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListAllPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/PublicIpPrefixList.json -func ExamplePublicIPPrefixesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewPublicIPPrefixesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/resourcenavigationlinks_client.go b/sdk/resourcemanager/network/armnetwork/resourcenavigationlinks_client.go index b9e490d96210..955fc1852a79 100644 --- a/sdk/resourcemanager/network/armnetwork/resourcenavigationlinks_client.go +++ b/sdk/resourcemanager/network/armnetwork/resourcenavigationlinks_client.go @@ -32,10 +32,10 @@ type ResourceNavigationLinksClient struct { } // NewResourceNavigationLinksClient creates a new instance of ResourceNavigationLinksClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewResourceNavigationLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceNavigationLinksClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewResourceNavigationLinksClient(subscriptionID string, credential azcore.T // List - Gets a list of resource navigation links for a subnet. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// subnetName - The name of the subnet. -// options - ResourceNavigationLinksClientListOptions contains the optional parameters for the ResourceNavigationLinksClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - subnetName - The name of the subnet. +// - options - ResourceNavigationLinksClientListOptions contains the optional parameters for the ResourceNavigationLinksClient.List +// method. func (client *ResourceNavigationLinksClient) List(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, options *ResourceNavigationLinksClientListOptions) (ResourceNavigationLinksClientListResponse, error) { req, err := client.listCreateRequest(ctx, resourceGroupName, virtualNetworkName, subnetName, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/resourcenavigationlinks_client_example_test.go b/sdk/resourcemanager/network/armnetwork/resourcenavigationlinks_client_example_test.go deleted file mode 100644 index a76f071a0f50..000000000000 --- a/sdk/resourcemanager/network/armnetwork/resourcenavigationlinks_client_example_test.go +++ /dev/null @@ -1,36 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGetResourceNavigationLinks.json -func ExampleResourceNavigationLinksClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewResourceNavigationLinksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.List(ctx, "rg1", "vnet", "subnet", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/response_types.go b/sdk/resourcemanager/network/armnetwork/response_types.go index 8c6cf694c2ae..abd176de3337 100644 --- a/sdk/resourcemanager/network/armnetwork/response_types.go +++ b/sdk/resourcemanager/network/armnetwork/response_types.go @@ -16,7 +16,7 @@ type AdminRuleCollectionsClientCreateOrUpdateResponse struct { AdminRuleCollection } -// AdminRuleCollectionsClientDeleteResponse contains the response from method AdminRuleCollectionsClient.Delete. +// AdminRuleCollectionsClientDeleteResponse contains the response from method AdminRuleCollectionsClient.BeginDelete. type AdminRuleCollectionsClientDeleteResponse struct { // placeholder for future response values } @@ -26,7 +26,7 @@ type AdminRuleCollectionsClientGetResponse struct { AdminRuleCollection } -// AdminRuleCollectionsClientListResponse contains the response from method AdminRuleCollectionsClient.List. +// AdminRuleCollectionsClientListResponse contains the response from method AdminRuleCollectionsClient.NewListPager. type AdminRuleCollectionsClientListResponse struct { AdminRuleCollectionListResult } @@ -46,7 +46,7 @@ func (a *AdminRulesClientCreateOrUpdateResponse) UnmarshalJSON(data []byte) erro return nil } -// AdminRulesClientDeleteResponse contains the response from method AdminRulesClient.Delete. +// AdminRulesClientDeleteResponse contains the response from method AdminRulesClient.BeginDelete. type AdminRulesClientDeleteResponse struct { // placeholder for future response values } @@ -66,12 +66,12 @@ func (a *AdminRulesClientGetResponse) UnmarshalJSON(data []byte) error { return nil } -// AdminRulesClientListResponse contains the response from method AdminRulesClient.List. +// AdminRulesClientListResponse contains the response from method AdminRulesClient.NewListPager. type AdminRulesClientListResponse struct { AdminRuleListResult } -// ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse contains the response from method ApplicationGatewayPrivateEndpointConnectionsClient.Delete. +// ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse contains the response from method ApplicationGatewayPrivateEndpointConnectionsClient.BeginDelete. type ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse struct { // placeholder for future response values } @@ -81,22 +81,22 @@ type ApplicationGatewayPrivateEndpointConnectionsClientGetResponse struct { ApplicationGatewayPrivateEndpointConnection } -// ApplicationGatewayPrivateEndpointConnectionsClientListResponse contains the response from method ApplicationGatewayPrivateEndpointConnectionsClient.List. +// ApplicationGatewayPrivateEndpointConnectionsClientListResponse contains the response from method ApplicationGatewayPrivateEndpointConnectionsClient.NewListPager. type ApplicationGatewayPrivateEndpointConnectionsClientListResponse struct { ApplicationGatewayPrivateEndpointConnectionListResult } -// ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse contains the response from method ApplicationGatewayPrivateEndpointConnectionsClient.Update. +// ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse contains the response from method ApplicationGatewayPrivateEndpointConnectionsClient.BeginUpdate. type ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse struct { ApplicationGatewayPrivateEndpointConnection } -// ApplicationGatewayPrivateLinkResourcesClientListResponse contains the response from method ApplicationGatewayPrivateLinkResourcesClient.List. +// ApplicationGatewayPrivateLinkResourcesClientListResponse contains the response from method ApplicationGatewayPrivateLinkResourcesClient.NewListPager. type ApplicationGatewayPrivateLinkResourcesClientListResponse struct { ApplicationGatewayPrivateLinkResourceListResult } -// ApplicationGatewayWafDynamicManifestsClientGetResponse contains the response from method ApplicationGatewayWafDynamicManifestsClient.Get. +// ApplicationGatewayWafDynamicManifestsClientGetResponse contains the response from method ApplicationGatewayWafDynamicManifestsClient.NewGetPager. type ApplicationGatewayWafDynamicManifestsClientGetResponse struct { ApplicationGatewayWafDynamicManifestResultList } @@ -106,22 +106,22 @@ type ApplicationGatewayWafDynamicManifestsDefaultClientGetResponse struct { ApplicationGatewayWafDynamicManifestResult } -// ApplicationGatewaysClientBackendHealthOnDemandResponse contains the response from method ApplicationGatewaysClient.BackendHealthOnDemand. +// ApplicationGatewaysClientBackendHealthOnDemandResponse contains the response from method ApplicationGatewaysClient.BeginBackendHealthOnDemand. type ApplicationGatewaysClientBackendHealthOnDemandResponse struct { ApplicationGatewayBackendHealthOnDemand } -// ApplicationGatewaysClientBackendHealthResponse contains the response from method ApplicationGatewaysClient.BackendHealth. +// ApplicationGatewaysClientBackendHealthResponse contains the response from method ApplicationGatewaysClient.BeginBackendHealth. type ApplicationGatewaysClientBackendHealthResponse struct { ApplicationGatewayBackendHealth } -// ApplicationGatewaysClientCreateOrUpdateResponse contains the response from method ApplicationGatewaysClient.CreateOrUpdate. +// ApplicationGatewaysClientCreateOrUpdateResponse contains the response from method ApplicationGatewaysClient.BeginCreateOrUpdate. type ApplicationGatewaysClientCreateOrUpdateResponse struct { ApplicationGateway } -// ApplicationGatewaysClientDeleteResponse contains the response from method ApplicationGatewaysClient.Delete. +// ApplicationGatewaysClientDeleteResponse contains the response from method ApplicationGatewaysClient.BeginDelete. type ApplicationGatewaysClientDeleteResponse struct { // placeholder for future response values } @@ -136,7 +136,7 @@ type ApplicationGatewaysClientGetSSLPredefinedPolicyResponse struct { ApplicationGatewaySSLPredefinedPolicy } -// ApplicationGatewaysClientListAllResponse contains the response from method ApplicationGatewaysClient.ListAll. +// ApplicationGatewaysClientListAllResponse contains the response from method ApplicationGatewaysClient.NewListAllPager. type ApplicationGatewaysClientListAllResponse struct { ApplicationGatewayListResult } @@ -158,7 +158,7 @@ type ApplicationGatewaysClientListAvailableSSLOptionsResponse struct { ApplicationGatewayAvailableSSLOptions } -// ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse contains the response from method ApplicationGatewaysClient.ListAvailableSSLPredefinedPolicies. +// ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse contains the response from method ApplicationGatewaysClient.NewListAvailableSSLPredefinedPoliciesPager. type ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse struct { ApplicationGatewayAvailableSSLPredefinedPolicies } @@ -174,17 +174,17 @@ type ApplicationGatewaysClientListAvailableWafRuleSetsResponse struct { ApplicationGatewayAvailableWafRuleSetsResult } -// ApplicationGatewaysClientListResponse contains the response from method ApplicationGatewaysClient.List. +// ApplicationGatewaysClientListResponse contains the response from method ApplicationGatewaysClient.NewListPager. type ApplicationGatewaysClientListResponse struct { ApplicationGatewayListResult } -// ApplicationGatewaysClientStartResponse contains the response from method ApplicationGatewaysClient.Start. +// ApplicationGatewaysClientStartResponse contains the response from method ApplicationGatewaysClient.BeginStart. type ApplicationGatewaysClientStartResponse struct { // placeholder for future response values } -// ApplicationGatewaysClientStopResponse contains the response from method ApplicationGatewaysClient.Stop. +// ApplicationGatewaysClientStopResponse contains the response from method ApplicationGatewaysClient.BeginStop. type ApplicationGatewaysClientStopResponse struct { // placeholder for future response values } @@ -194,12 +194,12 @@ type ApplicationGatewaysClientUpdateTagsResponse struct { ApplicationGateway } -// ApplicationSecurityGroupsClientCreateOrUpdateResponse contains the response from method ApplicationSecurityGroupsClient.CreateOrUpdate. +// ApplicationSecurityGroupsClientCreateOrUpdateResponse contains the response from method ApplicationSecurityGroupsClient.BeginCreateOrUpdate. type ApplicationSecurityGroupsClientCreateOrUpdateResponse struct { ApplicationSecurityGroup } -// ApplicationSecurityGroupsClientDeleteResponse contains the response from method ApplicationSecurityGroupsClient.Delete. +// ApplicationSecurityGroupsClientDeleteResponse contains the response from method ApplicationSecurityGroupsClient.BeginDelete. type ApplicationSecurityGroupsClientDeleteResponse struct { // placeholder for future response values } @@ -209,12 +209,12 @@ type ApplicationSecurityGroupsClientGetResponse struct { ApplicationSecurityGroup } -// ApplicationSecurityGroupsClientListAllResponse contains the response from method ApplicationSecurityGroupsClient.ListAll. +// ApplicationSecurityGroupsClientListAllResponse contains the response from method ApplicationSecurityGroupsClient.NewListAllPager. type ApplicationSecurityGroupsClientListAllResponse struct { ApplicationSecurityGroupListResult } -// ApplicationSecurityGroupsClientListResponse contains the response from method ApplicationSecurityGroupsClient.List. +// ApplicationSecurityGroupsClientListResponse contains the response from method ApplicationSecurityGroupsClient.NewListPager. type ApplicationSecurityGroupsClientListResponse struct { ApplicationSecurityGroupListResult } @@ -224,52 +224,52 @@ type ApplicationSecurityGroupsClientUpdateTagsResponse struct { ApplicationSecurityGroup } -// AvailableDelegationsClientListResponse contains the response from method AvailableDelegationsClient.List. +// AvailableDelegationsClientListResponse contains the response from method AvailableDelegationsClient.NewListPager. type AvailableDelegationsClientListResponse struct { AvailableDelegationsResult } -// AvailableEndpointServicesClientListResponse contains the response from method AvailableEndpointServicesClient.List. +// AvailableEndpointServicesClientListResponse contains the response from method AvailableEndpointServicesClient.NewListPager. type AvailableEndpointServicesClientListResponse struct { EndpointServicesListResult } -// AvailablePrivateEndpointTypesClientListByResourceGroupResponse contains the response from method AvailablePrivateEndpointTypesClient.ListByResourceGroup. +// AvailablePrivateEndpointTypesClientListByResourceGroupResponse contains the response from method AvailablePrivateEndpointTypesClient.NewListByResourceGroupPager. type AvailablePrivateEndpointTypesClientListByResourceGroupResponse struct { AvailablePrivateEndpointTypesResult } -// AvailablePrivateEndpointTypesClientListResponse contains the response from method AvailablePrivateEndpointTypesClient.List. +// AvailablePrivateEndpointTypesClientListResponse contains the response from method AvailablePrivateEndpointTypesClient.NewListPager. type AvailablePrivateEndpointTypesClientListResponse struct { AvailablePrivateEndpointTypesResult } -// AvailableResourceGroupDelegationsClientListResponse contains the response from method AvailableResourceGroupDelegationsClient.List. +// AvailableResourceGroupDelegationsClientListResponse contains the response from method AvailableResourceGroupDelegationsClient.NewListPager. type AvailableResourceGroupDelegationsClientListResponse struct { AvailableDelegationsResult } -// AvailableServiceAliasesClientListByResourceGroupResponse contains the response from method AvailableServiceAliasesClient.ListByResourceGroup. +// AvailableServiceAliasesClientListByResourceGroupResponse contains the response from method AvailableServiceAliasesClient.NewListByResourceGroupPager. type AvailableServiceAliasesClientListByResourceGroupResponse struct { AvailableServiceAliasesResult } -// AvailableServiceAliasesClientListResponse contains the response from method AvailableServiceAliasesClient.List. +// AvailableServiceAliasesClientListResponse contains the response from method AvailableServiceAliasesClient.NewListPager. type AvailableServiceAliasesClientListResponse struct { AvailableServiceAliasesResult } -// AzureFirewallFqdnTagsClientListAllResponse contains the response from method AzureFirewallFqdnTagsClient.ListAll. +// AzureFirewallFqdnTagsClientListAllResponse contains the response from method AzureFirewallFqdnTagsClient.NewListAllPager. type AzureFirewallFqdnTagsClientListAllResponse struct { AzureFirewallFqdnTagListResult } -// AzureFirewallsClientCreateOrUpdateResponse contains the response from method AzureFirewallsClient.CreateOrUpdate. +// AzureFirewallsClientCreateOrUpdateResponse contains the response from method AzureFirewallsClient.BeginCreateOrUpdate. type AzureFirewallsClientCreateOrUpdateResponse struct { AzureFirewall } -// AzureFirewallsClientDeleteResponse contains the response from method AzureFirewallsClient.Delete. +// AzureFirewallsClientDeleteResponse contains the response from method AzureFirewallsClient.BeginDelete. type AzureFirewallsClientDeleteResponse struct { // placeholder for future response values } @@ -279,32 +279,32 @@ type AzureFirewallsClientGetResponse struct { AzureFirewall } -// AzureFirewallsClientListAllResponse contains the response from method AzureFirewallsClient.ListAll. +// AzureFirewallsClientListAllResponse contains the response from method AzureFirewallsClient.NewListAllPager. type AzureFirewallsClientListAllResponse struct { AzureFirewallListResult } -// AzureFirewallsClientListLearnedPrefixesResponse contains the response from method AzureFirewallsClient.ListLearnedPrefixes. +// AzureFirewallsClientListLearnedPrefixesResponse contains the response from method AzureFirewallsClient.BeginListLearnedPrefixes. type AzureFirewallsClientListLearnedPrefixesResponse struct { IPPrefixesList } -// AzureFirewallsClientListResponse contains the response from method AzureFirewallsClient.List. +// AzureFirewallsClientListResponse contains the response from method AzureFirewallsClient.NewListPager. type AzureFirewallsClientListResponse struct { AzureFirewallListResult } -// AzureFirewallsClientUpdateTagsResponse contains the response from method AzureFirewallsClient.UpdateTags. +// AzureFirewallsClientUpdateTagsResponse contains the response from method AzureFirewallsClient.BeginUpdateTags. type AzureFirewallsClientUpdateTagsResponse struct { AzureFirewall } -// BastionHostsClientCreateOrUpdateResponse contains the response from method BastionHostsClient.CreateOrUpdate. +// BastionHostsClientCreateOrUpdateResponse contains the response from method BastionHostsClient.BeginCreateOrUpdate. type BastionHostsClientCreateOrUpdateResponse struct { BastionHost } -// BastionHostsClientDeleteResponse contains the response from method BastionHostsClient.Delete. +// BastionHostsClientDeleteResponse contains the response from method BastionHostsClient.BeginDelete. type BastionHostsClientDeleteResponse struct { // placeholder for future response values } @@ -314,32 +314,32 @@ type BastionHostsClientGetResponse struct { BastionHost } -// BastionHostsClientListByResourceGroupResponse contains the response from method BastionHostsClient.ListByResourceGroup. +// BastionHostsClientListByResourceGroupResponse contains the response from method BastionHostsClient.NewListByResourceGroupPager. type BastionHostsClientListByResourceGroupResponse struct { BastionHostListResult } -// BastionHostsClientListResponse contains the response from method BastionHostsClient.List. +// BastionHostsClientListResponse contains the response from method BastionHostsClient.NewListPager. type BastionHostsClientListResponse struct { BastionHostListResult } -// BastionHostsClientUpdateTagsResponse contains the response from method BastionHostsClient.UpdateTags. +// BastionHostsClientUpdateTagsResponse contains the response from method BastionHostsClient.BeginUpdateTags. type BastionHostsClientUpdateTagsResponse struct { BastionHost } -// BgpServiceCommunitiesClientListResponse contains the response from method BgpServiceCommunitiesClient.List. +// BgpServiceCommunitiesClientListResponse contains the response from method BgpServiceCommunitiesClient.NewListPager. type BgpServiceCommunitiesClientListResponse struct { BgpServiceCommunityListResult } -// ConfigurationPolicyGroupsClientCreateOrUpdateResponse contains the response from method ConfigurationPolicyGroupsClient.CreateOrUpdate. +// ConfigurationPolicyGroupsClientCreateOrUpdateResponse contains the response from method ConfigurationPolicyGroupsClient.BeginCreateOrUpdate. type ConfigurationPolicyGroupsClientCreateOrUpdateResponse struct { VPNServerConfigurationPolicyGroup } -// ConfigurationPolicyGroupsClientDeleteResponse contains the response from method ConfigurationPolicyGroupsClient.Delete. +// ConfigurationPolicyGroupsClientDeleteResponse contains the response from method ConfigurationPolicyGroupsClient.BeginDelete. type ConfigurationPolicyGroupsClientDeleteResponse struct { // placeholder for future response values } @@ -349,17 +349,17 @@ type ConfigurationPolicyGroupsClientGetResponse struct { VPNServerConfigurationPolicyGroup } -// ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse contains the response from method ConfigurationPolicyGroupsClient.ListByVPNServerConfiguration. +// ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse contains the response from method ConfigurationPolicyGroupsClient.NewListByVPNServerConfigurationPager. type ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse struct { ListVPNServerConfigurationPolicyGroupsResult } -// ConnectionMonitorsClientCreateOrUpdateResponse contains the response from method ConnectionMonitorsClient.CreateOrUpdate. +// ConnectionMonitorsClientCreateOrUpdateResponse contains the response from method ConnectionMonitorsClient.BeginCreateOrUpdate. type ConnectionMonitorsClientCreateOrUpdateResponse struct { ConnectionMonitorResult } -// ConnectionMonitorsClientDeleteResponse contains the response from method ConnectionMonitorsClient.Delete. +// ConnectionMonitorsClientDeleteResponse contains the response from method ConnectionMonitorsClient.BeginDelete. type ConnectionMonitorsClientDeleteResponse struct { // placeholder for future response values } @@ -369,22 +369,22 @@ type ConnectionMonitorsClientGetResponse struct { ConnectionMonitorResult } -// ConnectionMonitorsClientListResponse contains the response from method ConnectionMonitorsClient.List. +// ConnectionMonitorsClientListResponse contains the response from method ConnectionMonitorsClient.NewListPager. type ConnectionMonitorsClientListResponse struct { ConnectionMonitorListResult } -// ConnectionMonitorsClientQueryResponse contains the response from method ConnectionMonitorsClient.Query. +// ConnectionMonitorsClientQueryResponse contains the response from method ConnectionMonitorsClient.BeginQuery. type ConnectionMonitorsClientQueryResponse struct { ConnectionMonitorQueryResult } -// ConnectionMonitorsClientStartResponse contains the response from method ConnectionMonitorsClient.Start. +// ConnectionMonitorsClientStartResponse contains the response from method ConnectionMonitorsClient.BeginStart. type ConnectionMonitorsClientStartResponse struct { // placeholder for future response values } -// ConnectionMonitorsClientStopResponse contains the response from method ConnectionMonitorsClient.Stop. +// ConnectionMonitorsClientStopResponse contains the response from method ConnectionMonitorsClient.BeginStop. type ConnectionMonitorsClientStopResponse struct { // placeholder for future response values } @@ -399,7 +399,7 @@ type ConnectivityConfigurationsClientCreateOrUpdateResponse struct { ConnectivityConfiguration } -// ConnectivityConfigurationsClientDeleteResponse contains the response from method ConnectivityConfigurationsClient.Delete. +// ConnectivityConfigurationsClientDeleteResponse contains the response from method ConnectivityConfigurationsClient.BeginDelete. type ConnectivityConfigurationsClientDeleteResponse struct { // placeholder for future response values } @@ -409,17 +409,17 @@ type ConnectivityConfigurationsClientGetResponse struct { ConnectivityConfiguration } -// ConnectivityConfigurationsClientListResponse contains the response from method ConnectivityConfigurationsClient.List. +// ConnectivityConfigurationsClientListResponse contains the response from method ConnectivityConfigurationsClient.NewListPager. type ConnectivityConfigurationsClientListResponse struct { ConnectivityConfigurationListResult } -// CustomIPPrefixesClientCreateOrUpdateResponse contains the response from method CustomIPPrefixesClient.CreateOrUpdate. +// CustomIPPrefixesClientCreateOrUpdateResponse contains the response from method CustomIPPrefixesClient.BeginCreateOrUpdate. type CustomIPPrefixesClientCreateOrUpdateResponse struct { CustomIPPrefix } -// CustomIPPrefixesClientDeleteResponse contains the response from method CustomIPPrefixesClient.Delete. +// CustomIPPrefixesClientDeleteResponse contains the response from method CustomIPPrefixesClient.BeginDelete. type CustomIPPrefixesClientDeleteResponse struct { // placeholder for future response values } @@ -429,12 +429,12 @@ type CustomIPPrefixesClientGetResponse struct { CustomIPPrefix } -// CustomIPPrefixesClientListAllResponse contains the response from method CustomIPPrefixesClient.ListAll. +// CustomIPPrefixesClientListAllResponse contains the response from method CustomIPPrefixesClient.NewListAllPager. type CustomIPPrefixesClientListAllResponse struct { CustomIPPrefixListResult } -// CustomIPPrefixesClientListResponse contains the response from method CustomIPPrefixesClient.List. +// CustomIPPrefixesClientListResponse contains the response from method CustomIPPrefixesClient.NewListPager. type CustomIPPrefixesClientListResponse struct { CustomIPPrefixListResult } @@ -444,12 +444,12 @@ type CustomIPPrefixesClientUpdateTagsResponse struct { CustomIPPrefix } -// DdosCustomPoliciesClientCreateOrUpdateResponse contains the response from method DdosCustomPoliciesClient.CreateOrUpdate. +// DdosCustomPoliciesClientCreateOrUpdateResponse contains the response from method DdosCustomPoliciesClient.BeginCreateOrUpdate. type DdosCustomPoliciesClientCreateOrUpdateResponse struct { DdosCustomPolicy } -// DdosCustomPoliciesClientDeleteResponse contains the response from method DdosCustomPoliciesClient.Delete. +// DdosCustomPoliciesClientDeleteResponse contains the response from method DdosCustomPoliciesClient.BeginDelete. type DdosCustomPoliciesClientDeleteResponse struct { // placeholder for future response values } @@ -464,12 +464,12 @@ type DdosCustomPoliciesClientUpdateTagsResponse struct { DdosCustomPolicy } -// DdosProtectionPlansClientCreateOrUpdateResponse contains the response from method DdosProtectionPlansClient.CreateOrUpdate. +// DdosProtectionPlansClientCreateOrUpdateResponse contains the response from method DdosProtectionPlansClient.BeginCreateOrUpdate. type DdosProtectionPlansClientCreateOrUpdateResponse struct { DdosProtectionPlan } -// DdosProtectionPlansClientDeleteResponse contains the response from method DdosProtectionPlansClient.Delete. +// DdosProtectionPlansClientDeleteResponse contains the response from method DdosProtectionPlansClient.BeginDelete. type DdosProtectionPlansClientDeleteResponse struct { // placeholder for future response values } @@ -479,12 +479,12 @@ type DdosProtectionPlansClientGetResponse struct { DdosProtectionPlan } -// DdosProtectionPlansClientListByResourceGroupResponse contains the response from method DdosProtectionPlansClient.ListByResourceGroup. +// DdosProtectionPlansClientListByResourceGroupResponse contains the response from method DdosProtectionPlansClient.NewListByResourceGroupPager. type DdosProtectionPlansClientListByResourceGroupResponse struct { DdosProtectionPlanListResult } -// DdosProtectionPlansClientListResponse contains the response from method DdosProtectionPlansClient.List. +// DdosProtectionPlansClientListResponse contains the response from method DdosProtectionPlansClient.NewListPager. type DdosProtectionPlansClientListResponse struct { DdosProtectionPlanListResult } @@ -499,17 +499,17 @@ type DefaultSecurityRulesClientGetResponse struct { SecurityRule } -// DefaultSecurityRulesClientListResponse contains the response from method DefaultSecurityRulesClient.List. +// DefaultSecurityRulesClientListResponse contains the response from method DefaultSecurityRulesClient.NewListPager. type DefaultSecurityRulesClientListResponse struct { SecurityRuleListResult } -// DscpConfigurationClientCreateOrUpdateResponse contains the response from method DscpConfigurationClient.CreateOrUpdate. +// DscpConfigurationClientCreateOrUpdateResponse contains the response from method DscpConfigurationClient.BeginCreateOrUpdate. type DscpConfigurationClientCreateOrUpdateResponse struct { DscpConfiguration } -// DscpConfigurationClientDeleteResponse contains the response from method DscpConfigurationClient.Delete. +// DscpConfigurationClientDeleteResponse contains the response from method DscpConfigurationClient.BeginDelete. type DscpConfigurationClientDeleteResponse struct { // placeholder for future response values } @@ -519,22 +519,22 @@ type DscpConfigurationClientGetResponse struct { DscpConfiguration } -// DscpConfigurationClientListAllResponse contains the response from method DscpConfigurationClient.ListAll. +// DscpConfigurationClientListAllResponse contains the response from method DscpConfigurationClient.NewListAllPager. type DscpConfigurationClientListAllResponse struct { DscpConfigurationListResult } -// DscpConfigurationClientListResponse contains the response from method DscpConfigurationClient.List. +// DscpConfigurationClientListResponse contains the response from method DscpConfigurationClient.NewListPager. type DscpConfigurationClientListResponse struct { DscpConfigurationListResult } -// ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse contains the response from method ExpressRouteCircuitAuthorizationsClient.CreateOrUpdate. +// ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse contains the response from method ExpressRouteCircuitAuthorizationsClient.BeginCreateOrUpdate. type ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse struct { ExpressRouteCircuitAuthorization } -// ExpressRouteCircuitAuthorizationsClientDeleteResponse contains the response from method ExpressRouteCircuitAuthorizationsClient.Delete. +// ExpressRouteCircuitAuthorizationsClientDeleteResponse contains the response from method ExpressRouteCircuitAuthorizationsClient.BeginDelete. type ExpressRouteCircuitAuthorizationsClientDeleteResponse struct { // placeholder for future response values } @@ -544,17 +544,17 @@ type ExpressRouteCircuitAuthorizationsClientGetResponse struct { ExpressRouteCircuitAuthorization } -// ExpressRouteCircuitAuthorizationsClientListResponse contains the response from method ExpressRouteCircuitAuthorizationsClient.List. +// ExpressRouteCircuitAuthorizationsClientListResponse contains the response from method ExpressRouteCircuitAuthorizationsClient.NewListPager. type ExpressRouteCircuitAuthorizationsClientListResponse struct { AuthorizationListResult } -// ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse contains the response from method ExpressRouteCircuitConnectionsClient.CreateOrUpdate. +// ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse contains the response from method ExpressRouteCircuitConnectionsClient.BeginCreateOrUpdate. type ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse struct { ExpressRouteCircuitConnection } -// ExpressRouteCircuitConnectionsClientDeleteResponse contains the response from method ExpressRouteCircuitConnectionsClient.Delete. +// ExpressRouteCircuitConnectionsClientDeleteResponse contains the response from method ExpressRouteCircuitConnectionsClient.BeginDelete. type ExpressRouteCircuitConnectionsClientDeleteResponse struct { // placeholder for future response values } @@ -564,17 +564,17 @@ type ExpressRouteCircuitConnectionsClientGetResponse struct { ExpressRouteCircuitConnection } -// ExpressRouteCircuitConnectionsClientListResponse contains the response from method ExpressRouteCircuitConnectionsClient.List. +// ExpressRouteCircuitConnectionsClientListResponse contains the response from method ExpressRouteCircuitConnectionsClient.NewListPager. type ExpressRouteCircuitConnectionsClientListResponse struct { ExpressRouteCircuitConnectionListResult } -// ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse contains the response from method ExpressRouteCircuitPeeringsClient.CreateOrUpdate. +// ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse contains the response from method ExpressRouteCircuitPeeringsClient.BeginCreateOrUpdate. type ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse struct { ExpressRouteCircuitPeering } -// ExpressRouteCircuitPeeringsClientDeleteResponse contains the response from method ExpressRouteCircuitPeeringsClient.Delete. +// ExpressRouteCircuitPeeringsClientDeleteResponse contains the response from method ExpressRouteCircuitPeeringsClient.BeginDelete. type ExpressRouteCircuitPeeringsClientDeleteResponse struct { // placeholder for future response values } @@ -584,17 +584,17 @@ type ExpressRouteCircuitPeeringsClientGetResponse struct { ExpressRouteCircuitPeering } -// ExpressRouteCircuitPeeringsClientListResponse contains the response from method ExpressRouteCircuitPeeringsClient.List. +// ExpressRouteCircuitPeeringsClientListResponse contains the response from method ExpressRouteCircuitPeeringsClient.NewListPager. type ExpressRouteCircuitPeeringsClientListResponse struct { ExpressRouteCircuitPeeringListResult } -// ExpressRouteCircuitsClientCreateOrUpdateResponse contains the response from method ExpressRouteCircuitsClient.CreateOrUpdate. +// ExpressRouteCircuitsClientCreateOrUpdateResponse contains the response from method ExpressRouteCircuitsClient.BeginCreateOrUpdate. type ExpressRouteCircuitsClientCreateOrUpdateResponse struct { ExpressRouteCircuit } -// ExpressRouteCircuitsClientDeleteResponse contains the response from method ExpressRouteCircuitsClient.Delete. +// ExpressRouteCircuitsClientDeleteResponse contains the response from method ExpressRouteCircuitsClient.BeginDelete. type ExpressRouteCircuitsClientDeleteResponse struct { // placeholder for future response values } @@ -614,27 +614,27 @@ type ExpressRouteCircuitsClientGetStatsResponse struct { ExpressRouteCircuitStats } -// ExpressRouteCircuitsClientListAllResponse contains the response from method ExpressRouteCircuitsClient.ListAll. +// ExpressRouteCircuitsClientListAllResponse contains the response from method ExpressRouteCircuitsClient.NewListAllPager. type ExpressRouteCircuitsClientListAllResponse struct { ExpressRouteCircuitListResult } -// ExpressRouteCircuitsClientListArpTableResponse contains the response from method ExpressRouteCircuitsClient.ListArpTable. +// ExpressRouteCircuitsClientListArpTableResponse contains the response from method ExpressRouteCircuitsClient.BeginListArpTable. type ExpressRouteCircuitsClientListArpTableResponse struct { ExpressRouteCircuitsArpTableListResult } -// ExpressRouteCircuitsClientListResponse contains the response from method ExpressRouteCircuitsClient.List. +// ExpressRouteCircuitsClientListResponse contains the response from method ExpressRouteCircuitsClient.NewListPager. type ExpressRouteCircuitsClientListResponse struct { ExpressRouteCircuitListResult } -// ExpressRouteCircuitsClientListRoutesTableResponse contains the response from method ExpressRouteCircuitsClient.ListRoutesTable. +// ExpressRouteCircuitsClientListRoutesTableResponse contains the response from method ExpressRouteCircuitsClient.BeginListRoutesTable. type ExpressRouteCircuitsClientListRoutesTableResponse struct { ExpressRouteCircuitsRoutesTableListResult } -// ExpressRouteCircuitsClientListRoutesTableSummaryResponse contains the response from method ExpressRouteCircuitsClient.ListRoutesTableSummary. +// ExpressRouteCircuitsClientListRoutesTableSummaryResponse contains the response from method ExpressRouteCircuitsClient.BeginListRoutesTableSummary. type ExpressRouteCircuitsClientListRoutesTableSummaryResponse struct { ExpressRouteCircuitsRoutesTableSummaryListResult } @@ -644,12 +644,12 @@ type ExpressRouteCircuitsClientUpdateTagsResponse struct { ExpressRouteCircuit } -// ExpressRouteConnectionsClientCreateOrUpdateResponse contains the response from method ExpressRouteConnectionsClient.CreateOrUpdate. +// ExpressRouteConnectionsClientCreateOrUpdateResponse contains the response from method ExpressRouteConnectionsClient.BeginCreateOrUpdate. type ExpressRouteConnectionsClientCreateOrUpdateResponse struct { ExpressRouteConnection } -// ExpressRouteConnectionsClientDeleteResponse contains the response from method ExpressRouteConnectionsClient.Delete. +// ExpressRouteConnectionsClientDeleteResponse contains the response from method ExpressRouteConnectionsClient.BeginDelete. type ExpressRouteConnectionsClientDeleteResponse struct { // placeholder for future response values } @@ -664,12 +664,12 @@ type ExpressRouteConnectionsClientListResponse struct { ExpressRouteConnectionList } -// ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse contains the response from method ExpressRouteCrossConnectionPeeringsClient.CreateOrUpdate. +// ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse contains the response from method ExpressRouteCrossConnectionPeeringsClient.BeginCreateOrUpdate. type ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse struct { ExpressRouteCrossConnectionPeering } -// ExpressRouteCrossConnectionPeeringsClientDeleteResponse contains the response from method ExpressRouteCrossConnectionPeeringsClient.Delete. +// ExpressRouteCrossConnectionPeeringsClientDeleteResponse contains the response from method ExpressRouteCrossConnectionPeeringsClient.BeginDelete. type ExpressRouteCrossConnectionPeeringsClientDeleteResponse struct { // placeholder for future response values } @@ -679,12 +679,12 @@ type ExpressRouteCrossConnectionPeeringsClientGetResponse struct { ExpressRouteCrossConnectionPeering } -// ExpressRouteCrossConnectionPeeringsClientListResponse contains the response from method ExpressRouteCrossConnectionPeeringsClient.List. +// ExpressRouteCrossConnectionPeeringsClientListResponse contains the response from method ExpressRouteCrossConnectionPeeringsClient.NewListPager. type ExpressRouteCrossConnectionPeeringsClientListResponse struct { ExpressRouteCrossConnectionPeeringList } -// ExpressRouteCrossConnectionsClientCreateOrUpdateResponse contains the response from method ExpressRouteCrossConnectionsClient.CreateOrUpdate. +// ExpressRouteCrossConnectionsClientCreateOrUpdateResponse contains the response from method ExpressRouteCrossConnectionsClient.BeginCreateOrUpdate. type ExpressRouteCrossConnectionsClientCreateOrUpdateResponse struct { ExpressRouteCrossConnection } @@ -694,27 +694,27 @@ type ExpressRouteCrossConnectionsClientGetResponse struct { ExpressRouteCrossConnection } -// ExpressRouteCrossConnectionsClientListArpTableResponse contains the response from method ExpressRouteCrossConnectionsClient.ListArpTable. +// ExpressRouteCrossConnectionsClientListArpTableResponse contains the response from method ExpressRouteCrossConnectionsClient.BeginListArpTable. type ExpressRouteCrossConnectionsClientListArpTableResponse struct { ExpressRouteCircuitsArpTableListResult } -// ExpressRouteCrossConnectionsClientListByResourceGroupResponse contains the response from method ExpressRouteCrossConnectionsClient.ListByResourceGroup. +// ExpressRouteCrossConnectionsClientListByResourceGroupResponse contains the response from method ExpressRouteCrossConnectionsClient.NewListByResourceGroupPager. type ExpressRouteCrossConnectionsClientListByResourceGroupResponse struct { ExpressRouteCrossConnectionListResult } -// ExpressRouteCrossConnectionsClientListResponse contains the response from method ExpressRouteCrossConnectionsClient.List. +// ExpressRouteCrossConnectionsClientListResponse contains the response from method ExpressRouteCrossConnectionsClient.NewListPager. type ExpressRouteCrossConnectionsClientListResponse struct { ExpressRouteCrossConnectionListResult } -// ExpressRouteCrossConnectionsClientListRoutesTableResponse contains the response from method ExpressRouteCrossConnectionsClient.ListRoutesTable. +// ExpressRouteCrossConnectionsClientListRoutesTableResponse contains the response from method ExpressRouteCrossConnectionsClient.BeginListRoutesTable. type ExpressRouteCrossConnectionsClientListRoutesTableResponse struct { ExpressRouteCircuitsRoutesTableListResult } -// ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse contains the response from method ExpressRouteCrossConnectionsClient.ListRoutesTableSummary. +// ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse contains the response from method ExpressRouteCrossConnectionsClient.BeginListRoutesTableSummary. type ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse struct { ExpressRouteCrossConnectionsRoutesTableSummaryListResult } @@ -724,12 +724,12 @@ type ExpressRouteCrossConnectionsClientUpdateTagsResponse struct { ExpressRouteCrossConnection } -// ExpressRouteGatewaysClientCreateOrUpdateResponse contains the response from method ExpressRouteGatewaysClient.CreateOrUpdate. +// ExpressRouteGatewaysClientCreateOrUpdateResponse contains the response from method ExpressRouteGatewaysClient.BeginCreateOrUpdate. type ExpressRouteGatewaysClientCreateOrUpdateResponse struct { ExpressRouteGateway } -// ExpressRouteGatewaysClientDeleteResponse contains the response from method ExpressRouteGatewaysClient.Delete. +// ExpressRouteGatewaysClientDeleteResponse contains the response from method ExpressRouteGatewaysClient.BeginDelete. type ExpressRouteGatewaysClientDeleteResponse struct { // placeholder for future response values } @@ -749,7 +749,7 @@ type ExpressRouteGatewaysClientListBySubscriptionResponse struct { ExpressRouteGatewayList } -// ExpressRouteGatewaysClientUpdateTagsResponse contains the response from method ExpressRouteGatewaysClient.UpdateTags. +// ExpressRouteGatewaysClientUpdateTagsResponse contains the response from method ExpressRouteGatewaysClient.BeginUpdateTags. type ExpressRouteGatewaysClientUpdateTagsResponse struct { ExpressRouteGateway } @@ -759,17 +759,17 @@ type ExpressRouteLinksClientGetResponse struct { ExpressRouteLink } -// ExpressRouteLinksClientListResponse contains the response from method ExpressRouteLinksClient.List. +// ExpressRouteLinksClientListResponse contains the response from method ExpressRouteLinksClient.NewListPager. type ExpressRouteLinksClientListResponse struct { ExpressRouteLinkListResult } -// ExpressRoutePortAuthorizationsClientCreateOrUpdateResponse contains the response from method ExpressRoutePortAuthorizationsClient.CreateOrUpdate. +// ExpressRoutePortAuthorizationsClientCreateOrUpdateResponse contains the response from method ExpressRoutePortAuthorizationsClient.BeginCreateOrUpdate. type ExpressRoutePortAuthorizationsClientCreateOrUpdateResponse struct { ExpressRoutePortAuthorization } -// ExpressRoutePortAuthorizationsClientDeleteResponse contains the response from method ExpressRoutePortAuthorizationsClient.Delete. +// ExpressRoutePortAuthorizationsClientDeleteResponse contains the response from method ExpressRoutePortAuthorizationsClient.BeginDelete. type ExpressRoutePortAuthorizationsClientDeleteResponse struct { // placeholder for future response values } @@ -779,17 +779,17 @@ type ExpressRoutePortAuthorizationsClientGetResponse struct { ExpressRoutePortAuthorization } -// ExpressRoutePortAuthorizationsClientListResponse contains the response from method ExpressRoutePortAuthorizationsClient.List. +// ExpressRoutePortAuthorizationsClientListResponse contains the response from method ExpressRoutePortAuthorizationsClient.NewListPager. type ExpressRoutePortAuthorizationsClientListResponse struct { ExpressRoutePortAuthorizationListResult } -// ExpressRoutePortsClientCreateOrUpdateResponse contains the response from method ExpressRoutePortsClient.CreateOrUpdate. +// ExpressRoutePortsClientCreateOrUpdateResponse contains the response from method ExpressRoutePortsClient.BeginCreateOrUpdate. type ExpressRoutePortsClientCreateOrUpdateResponse struct { ExpressRoutePort } -// ExpressRoutePortsClientDeleteResponse contains the response from method ExpressRoutePortsClient.Delete. +// ExpressRoutePortsClientDeleteResponse contains the response from method ExpressRoutePortsClient.BeginDelete. type ExpressRoutePortsClientDeleteResponse struct { // placeholder for future response values } @@ -804,12 +804,12 @@ type ExpressRoutePortsClientGetResponse struct { ExpressRoutePort } -// ExpressRoutePortsClientListByResourceGroupResponse contains the response from method ExpressRoutePortsClient.ListByResourceGroup. +// ExpressRoutePortsClientListByResourceGroupResponse contains the response from method ExpressRoutePortsClient.NewListByResourceGroupPager. type ExpressRoutePortsClientListByResourceGroupResponse struct { ExpressRoutePortListResult } -// ExpressRoutePortsClientListResponse contains the response from method ExpressRoutePortsClient.List. +// ExpressRoutePortsClientListResponse contains the response from method ExpressRoutePortsClient.NewListPager. type ExpressRoutePortsClientListResponse struct { ExpressRoutePortListResult } @@ -824,7 +824,7 @@ type ExpressRoutePortsLocationsClientGetResponse struct { ExpressRoutePortsLocation } -// ExpressRoutePortsLocationsClientListResponse contains the response from method ExpressRoutePortsLocationsClient.List. +// ExpressRoutePortsLocationsClientListResponse contains the response from method ExpressRoutePortsLocationsClient.NewListPager. type ExpressRoutePortsLocationsClientListResponse struct { ExpressRoutePortsLocationListResult } @@ -834,17 +834,17 @@ type ExpressRouteProviderPortsLocationClientListResponse struct { ExpressRouteProviderPortListResult } -// ExpressRouteServiceProvidersClientListResponse contains the response from method ExpressRouteServiceProvidersClient.List. +// ExpressRouteServiceProvidersClientListResponse contains the response from method ExpressRouteServiceProvidersClient.NewListPager. type ExpressRouteServiceProvidersClientListResponse struct { ExpressRouteServiceProviderListResult } -// FirewallPoliciesClientCreateOrUpdateResponse contains the response from method FirewallPoliciesClient.CreateOrUpdate. +// FirewallPoliciesClientCreateOrUpdateResponse contains the response from method FirewallPoliciesClient.BeginCreateOrUpdate. type FirewallPoliciesClientCreateOrUpdateResponse struct { FirewallPolicy } -// FirewallPoliciesClientDeleteResponse contains the response from method FirewallPoliciesClient.Delete. +// FirewallPoliciesClientDeleteResponse contains the response from method FirewallPoliciesClient.BeginDelete. type FirewallPoliciesClientDeleteResponse struct { // placeholder for future response values } @@ -854,12 +854,12 @@ type FirewallPoliciesClientGetResponse struct { FirewallPolicy } -// FirewallPoliciesClientListAllResponse contains the response from method FirewallPoliciesClient.ListAll. +// FirewallPoliciesClientListAllResponse contains the response from method FirewallPoliciesClient.NewListAllPager. type FirewallPoliciesClientListAllResponse struct { FirewallPolicyListResult } -// FirewallPoliciesClientListResponse contains the response from method FirewallPoliciesClient.List. +// FirewallPoliciesClientListResponse contains the response from method FirewallPoliciesClient.NewListPager. type FirewallPoliciesClientListResponse struct { FirewallPolicyListResult } @@ -899,12 +899,12 @@ type FirewallPolicyIdpsSignaturesOverridesClientPutResponse struct { SignaturesOverrides } -// FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse contains the response from method FirewallPolicyRuleCollectionGroupsClient.CreateOrUpdate. +// FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse contains the response from method FirewallPolicyRuleCollectionGroupsClient.BeginCreateOrUpdate. type FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse struct { FirewallPolicyRuleCollectionGroup } -// FirewallPolicyRuleCollectionGroupsClientDeleteResponse contains the response from method FirewallPolicyRuleCollectionGroupsClient.Delete. +// FirewallPolicyRuleCollectionGroupsClientDeleteResponse contains the response from method FirewallPolicyRuleCollectionGroupsClient.BeginDelete. type FirewallPolicyRuleCollectionGroupsClientDeleteResponse struct { // placeholder for future response values } @@ -914,17 +914,17 @@ type FirewallPolicyRuleCollectionGroupsClientGetResponse struct { FirewallPolicyRuleCollectionGroup } -// FirewallPolicyRuleCollectionGroupsClientListResponse contains the response from method FirewallPolicyRuleCollectionGroupsClient.List. +// FirewallPolicyRuleCollectionGroupsClientListResponse contains the response from method FirewallPolicyRuleCollectionGroupsClient.NewListPager. type FirewallPolicyRuleCollectionGroupsClientListResponse struct { FirewallPolicyRuleCollectionGroupListResult } -// FlowLogsClientCreateOrUpdateResponse contains the response from method FlowLogsClient.CreateOrUpdate. +// FlowLogsClientCreateOrUpdateResponse contains the response from method FlowLogsClient.BeginCreateOrUpdate. type FlowLogsClientCreateOrUpdateResponse struct { FlowLog } -// FlowLogsClientDeleteResponse contains the response from method FlowLogsClient.Delete. +// FlowLogsClientDeleteResponse contains the response from method FlowLogsClient.BeginDelete. type FlowLogsClientDeleteResponse struct { // placeholder for future response values } @@ -934,7 +934,7 @@ type FlowLogsClientGetResponse struct { FlowLog } -// FlowLogsClientListResponse contains the response from method FlowLogsClient.List. +// FlowLogsClientListResponse contains the response from method FlowLogsClient.NewListPager. type FlowLogsClientListResponse struct { FlowLogListResult } @@ -951,7 +951,7 @@ type GroupsClientCreateOrUpdateResponse struct { ETag *string } -// GroupsClientDeleteResponse contains the response from method GroupsClient.Delete. +// GroupsClientDeleteResponse contains the response from method GroupsClient.BeginDelete. type GroupsClientDeleteResponse struct { // placeholder for future response values } @@ -961,17 +961,17 @@ type GroupsClientGetResponse struct { Group } -// GroupsClientListResponse contains the response from method GroupsClient.List. +// GroupsClientListResponse contains the response from method GroupsClient.NewListPager. type GroupsClientListResponse struct { GroupListResult } -// HubRouteTablesClientCreateOrUpdateResponse contains the response from method HubRouteTablesClient.CreateOrUpdate. +// HubRouteTablesClientCreateOrUpdateResponse contains the response from method HubRouteTablesClient.BeginCreateOrUpdate. type HubRouteTablesClientCreateOrUpdateResponse struct { HubRouteTable } -// HubRouteTablesClientDeleteResponse contains the response from method HubRouteTablesClient.Delete. +// HubRouteTablesClientDeleteResponse contains the response from method HubRouteTablesClient.BeginDelete. type HubRouteTablesClientDeleteResponse struct { // placeholder for future response values } @@ -981,17 +981,17 @@ type HubRouteTablesClientGetResponse struct { HubRouteTable } -// HubRouteTablesClientListResponse contains the response from method HubRouteTablesClient.List. +// HubRouteTablesClientListResponse contains the response from method HubRouteTablesClient.NewListPager. type HubRouteTablesClientListResponse struct { ListHubRouteTablesResult } -// HubVirtualNetworkConnectionsClientCreateOrUpdateResponse contains the response from method HubVirtualNetworkConnectionsClient.CreateOrUpdate. +// HubVirtualNetworkConnectionsClientCreateOrUpdateResponse contains the response from method HubVirtualNetworkConnectionsClient.BeginCreateOrUpdate. type HubVirtualNetworkConnectionsClientCreateOrUpdateResponse struct { HubVirtualNetworkConnection } -// HubVirtualNetworkConnectionsClientDeleteResponse contains the response from method HubVirtualNetworkConnectionsClient.Delete. +// HubVirtualNetworkConnectionsClientDeleteResponse contains the response from method HubVirtualNetworkConnectionsClient.BeginDelete. type HubVirtualNetworkConnectionsClientDeleteResponse struct { // placeholder for future response values } @@ -1001,17 +1001,17 @@ type HubVirtualNetworkConnectionsClientGetResponse struct { HubVirtualNetworkConnection } -// HubVirtualNetworkConnectionsClientListResponse contains the response from method HubVirtualNetworkConnectionsClient.List. +// HubVirtualNetworkConnectionsClientListResponse contains the response from method HubVirtualNetworkConnectionsClient.NewListPager. type HubVirtualNetworkConnectionsClientListResponse struct { ListHubVirtualNetworkConnectionsResult } -// IPAllocationsClientCreateOrUpdateResponse contains the response from method IPAllocationsClient.CreateOrUpdate. +// IPAllocationsClientCreateOrUpdateResponse contains the response from method IPAllocationsClient.BeginCreateOrUpdate. type IPAllocationsClientCreateOrUpdateResponse struct { IPAllocation } -// IPAllocationsClientDeleteResponse contains the response from method IPAllocationsClient.Delete. +// IPAllocationsClientDeleteResponse contains the response from method IPAllocationsClient.BeginDelete. type IPAllocationsClientDeleteResponse struct { // placeholder for future response values } @@ -1021,12 +1021,12 @@ type IPAllocationsClientGetResponse struct { IPAllocation } -// IPAllocationsClientListByResourceGroupResponse contains the response from method IPAllocationsClient.ListByResourceGroup. +// IPAllocationsClientListByResourceGroupResponse contains the response from method IPAllocationsClient.NewListByResourceGroupPager. type IPAllocationsClientListByResourceGroupResponse struct { IPAllocationListResult } -// IPAllocationsClientListResponse contains the response from method IPAllocationsClient.List. +// IPAllocationsClientListResponse contains the response from method IPAllocationsClient.NewListPager. type IPAllocationsClientListResponse struct { IPAllocationListResult } @@ -1036,12 +1036,12 @@ type IPAllocationsClientUpdateTagsResponse struct { IPAllocation } -// IPGroupsClientCreateOrUpdateResponse contains the response from method IPGroupsClient.CreateOrUpdate. +// IPGroupsClientCreateOrUpdateResponse contains the response from method IPGroupsClient.BeginCreateOrUpdate. type IPGroupsClientCreateOrUpdateResponse struct { IPGroup } -// IPGroupsClientDeleteResponse contains the response from method IPGroupsClient.Delete. +// IPGroupsClientDeleteResponse contains the response from method IPGroupsClient.BeginDelete. type IPGroupsClientDeleteResponse struct { // placeholder for future response values } @@ -1051,12 +1051,12 @@ type IPGroupsClientGetResponse struct { IPGroup } -// IPGroupsClientListByResourceGroupResponse contains the response from method IPGroupsClient.ListByResourceGroup. +// IPGroupsClientListByResourceGroupResponse contains the response from method IPGroupsClient.NewListByResourceGroupPager. type IPGroupsClientListByResourceGroupResponse struct { IPGroupListResult } -// IPGroupsClientListResponse contains the response from method IPGroupsClient.List. +// IPGroupsClientListResponse contains the response from method IPGroupsClient.NewListPager. type IPGroupsClientListResponse struct { IPGroupListResult } @@ -1066,12 +1066,12 @@ type IPGroupsClientUpdateGroupsResponse struct { IPGroup } -// InboundNatRulesClientCreateOrUpdateResponse contains the response from method InboundNatRulesClient.CreateOrUpdate. +// InboundNatRulesClientCreateOrUpdateResponse contains the response from method InboundNatRulesClient.BeginCreateOrUpdate. type InboundNatRulesClientCreateOrUpdateResponse struct { InboundNatRule } -// InboundNatRulesClientDeleteResponse contains the response from method InboundNatRulesClient.Delete. +// InboundNatRulesClientDeleteResponse contains the response from method InboundNatRulesClient.BeginDelete. type InboundNatRulesClientDeleteResponse struct { // placeholder for future response values } @@ -1081,12 +1081,12 @@ type InboundNatRulesClientGetResponse struct { InboundNatRule } -// InboundNatRulesClientListResponse contains the response from method InboundNatRulesClient.List. +// InboundNatRulesClientListResponse contains the response from method InboundNatRulesClient.NewListPager. type InboundNatRulesClientListResponse struct { InboundNatRuleListResult } -// InboundSecurityRuleClientCreateOrUpdateResponse contains the response from method InboundSecurityRuleClient.CreateOrUpdate. +// InboundSecurityRuleClientCreateOrUpdateResponse contains the response from method InboundSecurityRuleClient.BeginCreateOrUpdate. type InboundSecurityRuleClientCreateOrUpdateResponse struct { InboundSecurityRule } @@ -1096,22 +1096,22 @@ type InterfaceIPConfigurationsClientGetResponse struct { InterfaceIPConfiguration } -// InterfaceIPConfigurationsClientListResponse contains the response from method InterfaceIPConfigurationsClient.List. +// InterfaceIPConfigurationsClientListResponse contains the response from method InterfaceIPConfigurationsClient.NewListPager. type InterfaceIPConfigurationsClientListResponse struct { InterfaceIPConfigurationListResult } -// InterfaceLoadBalancersClientListResponse contains the response from method InterfaceLoadBalancersClient.List. +// InterfaceLoadBalancersClientListResponse contains the response from method InterfaceLoadBalancersClient.NewListPager. type InterfaceLoadBalancersClientListResponse struct { InterfaceLoadBalancerListResult } -// InterfaceTapConfigurationsClientCreateOrUpdateResponse contains the response from method InterfaceTapConfigurationsClient.CreateOrUpdate. +// InterfaceTapConfigurationsClientCreateOrUpdateResponse contains the response from method InterfaceTapConfigurationsClient.BeginCreateOrUpdate. type InterfaceTapConfigurationsClientCreateOrUpdateResponse struct { InterfaceTapConfiguration } -// InterfaceTapConfigurationsClientDeleteResponse contains the response from method InterfaceTapConfigurationsClient.Delete. +// InterfaceTapConfigurationsClientDeleteResponse contains the response from method InterfaceTapConfigurationsClient.BeginDelete. type InterfaceTapConfigurationsClientDeleteResponse struct { // placeholder for future response values } @@ -1121,17 +1121,17 @@ type InterfaceTapConfigurationsClientGetResponse struct { InterfaceTapConfiguration } -// InterfaceTapConfigurationsClientListResponse contains the response from method InterfaceTapConfigurationsClient.List. +// InterfaceTapConfigurationsClientListResponse contains the response from method InterfaceTapConfigurationsClient.NewListPager. type InterfaceTapConfigurationsClientListResponse struct { InterfaceTapConfigurationListResult } -// InterfacesClientCreateOrUpdateResponse contains the response from method InterfacesClient.CreateOrUpdate. +// InterfacesClientCreateOrUpdateResponse contains the response from method InterfacesClient.BeginCreateOrUpdate. type InterfacesClientCreateOrUpdateResponse struct { Interface } -// InterfacesClientDeleteResponse contains the response from method InterfacesClient.Delete. +// InterfacesClientDeleteResponse contains the response from method InterfacesClient.BeginDelete. type InterfacesClientDeleteResponse struct { // placeholder for future response values } @@ -1141,7 +1141,7 @@ type InterfacesClientGetCloudServiceNetworkInterfaceResponse struct { Interface } -// InterfacesClientGetEffectiveRouteTableResponse contains the response from method InterfacesClient.GetEffectiveRouteTable. +// InterfacesClientGetEffectiveRouteTableResponse contains the response from method InterfacesClient.BeginGetEffectiveRouteTable. type InterfacesClientGetEffectiveRouteTableResponse struct { EffectiveRouteListResult } @@ -1161,42 +1161,42 @@ type InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResponse struct { Interface } -// InterfacesClientListAllResponse contains the response from method InterfacesClient.ListAll. +// InterfacesClientListAllResponse contains the response from method InterfacesClient.NewListAllPager. type InterfacesClientListAllResponse struct { InterfaceListResult } -// InterfacesClientListCloudServiceNetworkInterfacesResponse contains the response from method InterfacesClient.ListCloudServiceNetworkInterfaces. +// InterfacesClientListCloudServiceNetworkInterfacesResponse contains the response from method InterfacesClient.NewListCloudServiceNetworkInterfacesPager. type InterfacesClientListCloudServiceNetworkInterfacesResponse struct { InterfaceListResult } -// InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse contains the response from method InterfacesClient.ListCloudServiceRoleInstanceNetworkInterfaces. +// InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse contains the response from method InterfacesClient.NewListCloudServiceRoleInstanceNetworkInterfacesPager. type InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse struct { InterfaceListResult } -// InterfacesClientListEffectiveNetworkSecurityGroupsResponse contains the response from method InterfacesClient.ListEffectiveNetworkSecurityGroups. +// InterfacesClientListEffectiveNetworkSecurityGroupsResponse contains the response from method InterfacesClient.BeginListEffectiveNetworkSecurityGroups. type InterfacesClientListEffectiveNetworkSecurityGroupsResponse struct { EffectiveNetworkSecurityGroupListResult } -// InterfacesClientListResponse contains the response from method InterfacesClient.List. +// InterfacesClientListResponse contains the response from method InterfacesClient.NewListPager. type InterfacesClientListResponse struct { InterfaceListResult } -// InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse contains the response from method InterfacesClient.ListVirtualMachineScaleSetIPConfigurations. +// InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse contains the response from method InterfacesClient.NewListVirtualMachineScaleSetIPConfigurationsPager. type InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse struct { InterfaceIPConfigurationListResult } -// InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse contains the response from method InterfacesClient.ListVirtualMachineScaleSetNetworkInterfaces. +// InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse contains the response from method InterfacesClient.NewListVirtualMachineScaleSetNetworkInterfacesPager. type InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse struct { InterfaceListResult } -// InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse contains the response from method InterfacesClient.ListVirtualMachineScaleSetVMNetworkInterfaces. +// InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse contains the response from method InterfacesClient.NewListVirtualMachineScaleSetVMNetworkInterfacesPager. type InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse struct { InterfaceListResult } @@ -1206,12 +1206,12 @@ type InterfacesClientUpdateTagsResponse struct { Interface } -// LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse contains the response from method LoadBalancerBackendAddressPoolsClient.CreateOrUpdate. +// LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse contains the response from method LoadBalancerBackendAddressPoolsClient.BeginCreateOrUpdate. type LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse struct { BackendAddressPool } -// LoadBalancerBackendAddressPoolsClientDeleteResponse contains the response from method LoadBalancerBackendAddressPoolsClient.Delete. +// LoadBalancerBackendAddressPoolsClientDeleteResponse contains the response from method LoadBalancerBackendAddressPoolsClient.BeginDelete. type LoadBalancerBackendAddressPoolsClientDeleteResponse struct { // placeholder for future response values } @@ -1221,7 +1221,7 @@ type LoadBalancerBackendAddressPoolsClientGetResponse struct { BackendAddressPool } -// LoadBalancerBackendAddressPoolsClientListResponse contains the response from method LoadBalancerBackendAddressPoolsClient.List. +// LoadBalancerBackendAddressPoolsClientListResponse contains the response from method LoadBalancerBackendAddressPoolsClient.NewListPager. type LoadBalancerBackendAddressPoolsClientListResponse struct { LoadBalancerBackendAddressPoolListResult } @@ -1231,7 +1231,7 @@ type LoadBalancerFrontendIPConfigurationsClientGetResponse struct { FrontendIPConfiguration } -// LoadBalancerFrontendIPConfigurationsClientListResponse contains the response from method LoadBalancerFrontendIPConfigurationsClient.List. +// LoadBalancerFrontendIPConfigurationsClientListResponse contains the response from method LoadBalancerFrontendIPConfigurationsClient.NewListPager. type LoadBalancerFrontendIPConfigurationsClientListResponse struct { LoadBalancerFrontendIPConfigurationListResult } @@ -1241,12 +1241,12 @@ type LoadBalancerLoadBalancingRulesClientGetResponse struct { LoadBalancingRule } -// LoadBalancerLoadBalancingRulesClientListResponse contains the response from method LoadBalancerLoadBalancingRulesClient.List. +// LoadBalancerLoadBalancingRulesClientListResponse contains the response from method LoadBalancerLoadBalancingRulesClient.NewListPager. type LoadBalancerLoadBalancingRulesClientListResponse struct { LoadBalancerLoadBalancingRuleListResult } -// LoadBalancerNetworkInterfacesClientListResponse contains the response from method LoadBalancerNetworkInterfacesClient.List. +// LoadBalancerNetworkInterfacesClientListResponse contains the response from method LoadBalancerNetworkInterfacesClient.NewListPager. type LoadBalancerNetworkInterfacesClientListResponse struct { InterfaceListResult } @@ -1256,7 +1256,7 @@ type LoadBalancerOutboundRulesClientGetResponse struct { OutboundRule } -// LoadBalancerOutboundRulesClientListResponse contains the response from method LoadBalancerOutboundRulesClient.List. +// LoadBalancerOutboundRulesClientListResponse contains the response from method LoadBalancerOutboundRulesClient.NewListPager. type LoadBalancerOutboundRulesClientListResponse struct { LoadBalancerOutboundRuleListResult } @@ -1266,17 +1266,17 @@ type LoadBalancerProbesClientGetResponse struct { Probe } -// LoadBalancerProbesClientListResponse contains the response from method LoadBalancerProbesClient.List. +// LoadBalancerProbesClientListResponse contains the response from method LoadBalancerProbesClient.NewListPager. type LoadBalancerProbesClientListResponse struct { LoadBalancerProbeListResult } -// LoadBalancersClientCreateOrUpdateResponse contains the response from method LoadBalancersClient.CreateOrUpdate. +// LoadBalancersClientCreateOrUpdateResponse contains the response from method LoadBalancersClient.BeginCreateOrUpdate. type LoadBalancersClientCreateOrUpdateResponse struct { LoadBalancer } -// LoadBalancersClientDeleteResponse contains the response from method LoadBalancersClient.Delete. +// LoadBalancersClientDeleteResponse contains the response from method LoadBalancersClient.BeginDelete. type LoadBalancersClientDeleteResponse struct { // placeholder for future response values } @@ -1286,22 +1286,22 @@ type LoadBalancersClientGetResponse struct { LoadBalancer } -// LoadBalancersClientListAllResponse contains the response from method LoadBalancersClient.ListAll. +// LoadBalancersClientListAllResponse contains the response from method LoadBalancersClient.NewListAllPager. type LoadBalancersClientListAllResponse struct { LoadBalancerListResult } -// LoadBalancersClientListInboundNatRulePortMappingsResponse contains the response from method LoadBalancersClient.ListInboundNatRulePortMappings. +// LoadBalancersClientListInboundNatRulePortMappingsResponse contains the response from method LoadBalancersClient.BeginListInboundNatRulePortMappings. type LoadBalancersClientListInboundNatRulePortMappingsResponse struct { BackendAddressInboundNatRulePortMappings } -// LoadBalancersClientListResponse contains the response from method LoadBalancersClient.List. +// LoadBalancersClientListResponse contains the response from method LoadBalancersClient.NewListPager. type LoadBalancersClientListResponse struct { LoadBalancerListResult } -// LoadBalancersClientSwapPublicIPAddressesResponse contains the response from method LoadBalancersClient.SwapPublicIPAddresses. +// LoadBalancersClientSwapPublicIPAddressesResponse contains the response from method LoadBalancersClient.BeginSwapPublicIPAddresses. type LoadBalancersClientSwapPublicIPAddressesResponse struct { // placeholder for future response values } @@ -1311,12 +1311,12 @@ type LoadBalancersClientUpdateTagsResponse struct { LoadBalancer } -// LocalNetworkGatewaysClientCreateOrUpdateResponse contains the response from method LocalNetworkGatewaysClient.CreateOrUpdate. +// LocalNetworkGatewaysClientCreateOrUpdateResponse contains the response from method LocalNetworkGatewaysClient.BeginCreateOrUpdate. type LocalNetworkGatewaysClientCreateOrUpdateResponse struct { LocalNetworkGateway } -// LocalNetworkGatewaysClientDeleteResponse contains the response from method LocalNetworkGatewaysClient.Delete. +// LocalNetworkGatewaysClientDeleteResponse contains the response from method LocalNetworkGatewaysClient.BeginDelete. type LocalNetworkGatewaysClientDeleteResponse struct { // placeholder for future response values } @@ -1326,7 +1326,7 @@ type LocalNetworkGatewaysClientGetResponse struct { LocalNetworkGateway } -// LocalNetworkGatewaysClientListResponse contains the response from method LocalNetworkGatewaysClient.List. +// LocalNetworkGatewaysClientListResponse contains the response from method LocalNetworkGatewaysClient.NewListPager. type LocalNetworkGatewaysClientListResponse struct { LocalNetworkGatewayListResult } @@ -1341,12 +1341,12 @@ type ManagementClientCheckDNSNameAvailabilityResponse struct { DNSNameAvailabilityResult } -// ManagementClientDeleteBastionShareableLinkResponse contains the response from method ManagementClient.DeleteBastionShareableLink. +// ManagementClientDeleteBastionShareableLinkResponse contains the response from method ManagementClient.BeginDeleteBastionShareableLink. type ManagementClientDeleteBastionShareableLinkResponse struct { // placeholder for future response values } -// ManagementClientDisconnectActiveSessionsResponse contains the response from method ManagementClient.DisconnectActiveSessions. +// ManagementClientDisconnectActiveSessionsResponse contains the response from method ManagementClient.NewDisconnectActiveSessionsPager. type ManagementClientDisconnectActiveSessionsResponse struct { BastionSessionDeleteResult } @@ -1356,17 +1356,17 @@ type ManagementClientExpressRouteProviderPortResponse struct { ExpressRouteProviderPort } -// ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse contains the response from method ManagementClient.Generatevirtualwanvpnserverconfigurationvpnprofile. +// ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse contains the response from method ManagementClient.BeginGeneratevirtualwanvpnserverconfigurationvpnprofile. type ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse struct { VPNProfileResponse } -// ManagementClientGetActiveSessionsResponse contains the response from method ManagementClient.GetActiveSessions. +// ManagementClientGetActiveSessionsResponse contains the response from method ManagementClient.BeginGetActiveSessions. type ManagementClientGetActiveSessionsResponse struct { BastionActiveSessionListResult } -// ManagementClientGetBastionShareableLinkResponse contains the response from method ManagementClient.GetBastionShareableLink. +// ManagementClientGetBastionShareableLinkResponse contains the response from method ManagementClient.NewGetBastionShareableLinkPager. type ManagementClientGetBastionShareableLinkResponse struct { BastionShareableLinkListResult } @@ -1391,7 +1391,7 @@ type ManagementClientListNetworkManagerEffectiveSecurityAdminRulesResponse struc ManagerEffectiveSecurityAdminRulesListResult } -// ManagementClientPutBastionShareableLinkResponse contains the response from method ManagementClient.PutBastionShareableLink. +// ManagementClientPutBastionShareableLinkResponse contains the response from method ManagementClient.BeginPutBastionShareableLink. type ManagementClientPutBastionShareableLinkResponse struct { BastionShareableLinkListResult } @@ -1416,12 +1416,12 @@ type ManagementGroupNetworkManagerConnectionsClientGetResponse struct { ManagerConnection } -// ManagementGroupNetworkManagerConnectionsClientListResponse contains the response from method ManagementGroupNetworkManagerConnectionsClient.List. +// ManagementGroupNetworkManagerConnectionsClientListResponse contains the response from method ManagementGroupNetworkManagerConnectionsClient.NewListPager. type ManagementGroupNetworkManagerConnectionsClientListResponse struct { ManagerConnectionListResult } -// ManagerCommitsClientPostResponse contains the response from method ManagerCommitsClient.Post. +// ManagerCommitsClientPostResponse contains the response from method ManagerCommitsClient.BeginPost. type ManagerCommitsClientPostResponse struct { ManagerCommit } @@ -1436,7 +1436,7 @@ type ManagersClientCreateOrUpdateResponse struct { Manager } -// ManagersClientDeleteResponse contains the response from method ManagersClient.Delete. +// ManagersClientDeleteResponse contains the response from method ManagersClient.BeginDelete. type ManagersClientDeleteResponse struct { // placeholder for future response values } @@ -1446,12 +1446,12 @@ type ManagersClientGetResponse struct { Manager } -// ManagersClientListBySubscriptionResponse contains the response from method ManagersClient.ListBySubscription. +// ManagersClientListBySubscriptionResponse contains the response from method ManagersClient.NewListBySubscriptionPager. type ManagersClientListBySubscriptionResponse struct { ManagerListResult } -// ManagersClientListResponse contains the response from method ManagersClient.List. +// ManagersClientListResponse contains the response from method ManagersClient.NewListPager. type ManagersClientListResponse struct { ManagerListResult } @@ -1461,12 +1461,12 @@ type ManagersClientPatchResponse struct { Manager } -// NatGatewaysClientCreateOrUpdateResponse contains the response from method NatGatewaysClient.CreateOrUpdate. +// NatGatewaysClientCreateOrUpdateResponse contains the response from method NatGatewaysClient.BeginCreateOrUpdate. type NatGatewaysClientCreateOrUpdateResponse struct { NatGateway } -// NatGatewaysClientDeleteResponse contains the response from method NatGatewaysClient.Delete. +// NatGatewaysClientDeleteResponse contains the response from method NatGatewaysClient.BeginDelete. type NatGatewaysClientDeleteResponse struct { // placeholder for future response values } @@ -1476,12 +1476,12 @@ type NatGatewaysClientGetResponse struct { NatGateway } -// NatGatewaysClientListAllResponse contains the response from method NatGatewaysClient.ListAll. +// NatGatewaysClientListAllResponse contains the response from method NatGatewaysClient.NewListAllPager. type NatGatewaysClientListAllResponse struct { NatGatewayListResult } -// NatGatewaysClientListResponse contains the response from method NatGatewaysClient.List. +// NatGatewaysClientListResponse contains the response from method NatGatewaysClient.NewListPager. type NatGatewaysClientListResponse struct { NatGatewayListResult } @@ -1491,12 +1491,12 @@ type NatGatewaysClientUpdateTagsResponse struct { NatGateway } -// NatRulesClientCreateOrUpdateResponse contains the response from method NatRulesClient.CreateOrUpdate. +// NatRulesClientCreateOrUpdateResponse contains the response from method NatRulesClient.BeginCreateOrUpdate. type NatRulesClientCreateOrUpdateResponse struct { VPNGatewayNatRule } -// NatRulesClientDeleteResponse contains the response from method NatRulesClient.Delete. +// NatRulesClientDeleteResponse contains the response from method NatRulesClient.BeginDelete. type NatRulesClientDeleteResponse struct { // placeholder for future response values } @@ -1506,42 +1506,42 @@ type NatRulesClientGetResponse struct { VPNGatewayNatRule } -// NatRulesClientListByVPNGatewayResponse contains the response from method NatRulesClient.ListByVPNGateway. +// NatRulesClientListByVPNGatewayResponse contains the response from method NatRulesClient.NewListByVPNGatewayPager. type NatRulesClientListByVPNGatewayResponse struct { ListVPNGatewayNatRulesResult } -// OperationsClientListResponse contains the response from method OperationsClient.List. +// OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { OperationListResult } -// P2SVPNGatewaysClientCreateOrUpdateResponse contains the response from method P2SVPNGatewaysClient.CreateOrUpdate. +// P2SVPNGatewaysClientCreateOrUpdateResponse contains the response from method P2SVPNGatewaysClient.BeginCreateOrUpdate. type P2SVPNGatewaysClientCreateOrUpdateResponse struct { P2SVPNGateway } -// P2SVPNGatewaysClientDeleteResponse contains the response from method P2SVPNGatewaysClient.Delete. +// P2SVPNGatewaysClientDeleteResponse contains the response from method P2SVPNGatewaysClient.BeginDelete. type P2SVPNGatewaysClientDeleteResponse struct { // placeholder for future response values } -// P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse contains the response from method P2SVPNGatewaysClient.DisconnectP2SVPNConnections. +// P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse contains the response from method P2SVPNGatewaysClient.BeginDisconnectP2SVPNConnections. type P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse struct { // placeholder for future response values } -// P2SVPNGatewaysClientGenerateVPNProfileResponse contains the response from method P2SVPNGatewaysClient.GenerateVPNProfile. +// P2SVPNGatewaysClientGenerateVPNProfileResponse contains the response from method P2SVPNGatewaysClient.BeginGenerateVPNProfile. type P2SVPNGatewaysClientGenerateVPNProfileResponse struct { VPNProfileResponse } -// P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse contains the response from method P2SVPNGatewaysClient.GetP2SVPNConnectionHealthDetailed. +// P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse contains the response from method P2SVPNGatewaysClient.BeginGetP2SVPNConnectionHealthDetailed. type P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse struct { P2SVPNConnectionHealth } -// P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse contains the response from method P2SVPNGatewaysClient.GetP2SVPNConnectionHealth. +// P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse contains the response from method P2SVPNGatewaysClient.BeginGetP2SVPNConnectionHealth. type P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse struct { P2SVPNGateway } @@ -1551,32 +1551,32 @@ type P2SVPNGatewaysClientGetResponse struct { P2SVPNGateway } -// P2SVPNGatewaysClientListByResourceGroupResponse contains the response from method P2SVPNGatewaysClient.ListByResourceGroup. +// P2SVPNGatewaysClientListByResourceGroupResponse contains the response from method P2SVPNGatewaysClient.NewListByResourceGroupPager. type P2SVPNGatewaysClientListByResourceGroupResponse struct { ListP2SVPNGatewaysResult } -// P2SVPNGatewaysClientListResponse contains the response from method P2SVPNGatewaysClient.List. +// P2SVPNGatewaysClientListResponse contains the response from method P2SVPNGatewaysClient.NewListPager. type P2SVPNGatewaysClientListResponse struct { ListP2SVPNGatewaysResult } -// P2SVPNGatewaysClientResetResponse contains the response from method P2SVPNGatewaysClient.Reset. +// P2SVPNGatewaysClientResetResponse contains the response from method P2SVPNGatewaysClient.BeginReset. type P2SVPNGatewaysClientResetResponse struct { P2SVPNGateway } -// P2SVPNGatewaysClientUpdateTagsResponse contains the response from method P2SVPNGatewaysClient.UpdateTags. +// P2SVPNGatewaysClientUpdateTagsResponse contains the response from method P2SVPNGatewaysClient.BeginUpdateTags. type P2SVPNGatewaysClientUpdateTagsResponse struct { P2SVPNGateway } -// PacketCapturesClientCreateResponse contains the response from method PacketCapturesClient.Create. +// PacketCapturesClientCreateResponse contains the response from method PacketCapturesClient.BeginCreate. type PacketCapturesClientCreateResponse struct { PacketCaptureResult } -// PacketCapturesClientDeleteResponse contains the response from method PacketCapturesClient.Delete. +// PacketCapturesClientDeleteResponse contains the response from method PacketCapturesClient.BeginDelete. type PacketCapturesClientDeleteResponse struct { // placeholder for future response values } @@ -1586,17 +1586,17 @@ type PacketCapturesClientGetResponse struct { PacketCaptureResult } -// PacketCapturesClientGetStatusResponse contains the response from method PacketCapturesClient.GetStatus. +// PacketCapturesClientGetStatusResponse contains the response from method PacketCapturesClient.BeginGetStatus. type PacketCapturesClientGetStatusResponse struct { PacketCaptureQueryStatusResult } -// PacketCapturesClientListResponse contains the response from method PacketCapturesClient.List. +// PacketCapturesClientListResponse contains the response from method PacketCapturesClient.NewListPager. type PacketCapturesClientListResponse struct { PacketCaptureListResult } -// PacketCapturesClientStopResponse contains the response from method PacketCapturesClient.Stop. +// PacketCapturesClientStopResponse contains the response from method PacketCapturesClient.BeginStop. type PacketCapturesClientStopResponse struct { // placeholder for future response values } @@ -1606,17 +1606,17 @@ type PeerExpressRouteCircuitConnectionsClientGetResponse struct { PeerExpressRouteCircuitConnection } -// PeerExpressRouteCircuitConnectionsClientListResponse contains the response from method PeerExpressRouteCircuitConnectionsClient.List. +// PeerExpressRouteCircuitConnectionsClientListResponse contains the response from method PeerExpressRouteCircuitConnectionsClient.NewListPager. type PeerExpressRouteCircuitConnectionsClientListResponse struct { PeerExpressRouteCircuitConnectionListResult } -// PrivateDNSZoneGroupsClientCreateOrUpdateResponse contains the response from method PrivateDNSZoneGroupsClient.CreateOrUpdate. +// PrivateDNSZoneGroupsClientCreateOrUpdateResponse contains the response from method PrivateDNSZoneGroupsClient.BeginCreateOrUpdate. type PrivateDNSZoneGroupsClientCreateOrUpdateResponse struct { PrivateDNSZoneGroup } -// PrivateDNSZoneGroupsClientDeleteResponse contains the response from method PrivateDNSZoneGroupsClient.Delete. +// PrivateDNSZoneGroupsClientDeleteResponse contains the response from method PrivateDNSZoneGroupsClient.BeginDelete. type PrivateDNSZoneGroupsClientDeleteResponse struct { // placeholder for future response values } @@ -1626,17 +1626,17 @@ type PrivateDNSZoneGroupsClientGetResponse struct { PrivateDNSZoneGroup } -// PrivateDNSZoneGroupsClientListResponse contains the response from method PrivateDNSZoneGroupsClient.List. +// PrivateDNSZoneGroupsClientListResponse contains the response from method PrivateDNSZoneGroupsClient.NewListPager. type PrivateDNSZoneGroupsClientListResponse struct { PrivateDNSZoneGroupListResult } -// PrivateEndpointsClientCreateOrUpdateResponse contains the response from method PrivateEndpointsClient.CreateOrUpdate. +// PrivateEndpointsClientCreateOrUpdateResponse contains the response from method PrivateEndpointsClient.BeginCreateOrUpdate. type PrivateEndpointsClientCreateOrUpdateResponse struct { PrivateEndpoint } -// PrivateEndpointsClientDeleteResponse contains the response from method PrivateEndpointsClient.Delete. +// PrivateEndpointsClientDeleteResponse contains the response from method PrivateEndpointsClient.BeginDelete. type PrivateEndpointsClientDeleteResponse struct { // placeholder for future response values } @@ -1646,37 +1646,37 @@ type PrivateEndpointsClientGetResponse struct { PrivateEndpoint } -// PrivateEndpointsClientListBySubscriptionResponse contains the response from method PrivateEndpointsClient.ListBySubscription. +// PrivateEndpointsClientListBySubscriptionResponse contains the response from method PrivateEndpointsClient.NewListBySubscriptionPager. type PrivateEndpointsClientListBySubscriptionResponse struct { PrivateEndpointListResult } -// PrivateEndpointsClientListResponse contains the response from method PrivateEndpointsClient.List. +// PrivateEndpointsClientListResponse contains the response from method PrivateEndpointsClient.NewListPager. type PrivateEndpointsClientListResponse struct { PrivateEndpointListResult } -// PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse contains the response from method PrivateLinkServicesClient.CheckPrivateLinkServiceVisibilityByResourceGroup. +// PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse contains the response from method PrivateLinkServicesClient.BeginCheckPrivateLinkServiceVisibilityByResourceGroup. type PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse struct { PrivateLinkServiceVisibility } -// PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse contains the response from method PrivateLinkServicesClient.CheckPrivateLinkServiceVisibility. +// PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse contains the response from method PrivateLinkServicesClient.BeginCheckPrivateLinkServiceVisibility. type PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse struct { PrivateLinkServiceVisibility } -// PrivateLinkServicesClientCreateOrUpdateResponse contains the response from method PrivateLinkServicesClient.CreateOrUpdate. +// PrivateLinkServicesClientCreateOrUpdateResponse contains the response from method PrivateLinkServicesClient.BeginCreateOrUpdate. type PrivateLinkServicesClientCreateOrUpdateResponse struct { PrivateLinkService } -// PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse contains the response from method PrivateLinkServicesClient.DeletePrivateEndpointConnection. +// PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse contains the response from method PrivateLinkServicesClient.BeginDeletePrivateEndpointConnection. type PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse struct { // placeholder for future response values } -// PrivateLinkServicesClientDeleteResponse contains the response from method PrivateLinkServicesClient.Delete. +// PrivateLinkServicesClientDeleteResponse contains the response from method PrivateLinkServicesClient.BeginDelete. type PrivateLinkServicesClientDeleteResponse struct { // placeholder for future response values } @@ -1691,27 +1691,27 @@ type PrivateLinkServicesClientGetResponse struct { PrivateLinkService } -// PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse contains the response from method PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServicesByResourceGroup. +// PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse contains the response from method PrivateLinkServicesClient.NewListAutoApprovedPrivateLinkServicesByResourceGroupPager. type PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse struct { AutoApprovedPrivateLinkServicesResult } -// PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse contains the response from method PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServices. +// PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse contains the response from method PrivateLinkServicesClient.NewListAutoApprovedPrivateLinkServicesPager. type PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse struct { AutoApprovedPrivateLinkServicesResult } -// PrivateLinkServicesClientListBySubscriptionResponse contains the response from method PrivateLinkServicesClient.ListBySubscription. +// PrivateLinkServicesClientListBySubscriptionResponse contains the response from method PrivateLinkServicesClient.NewListBySubscriptionPager. type PrivateLinkServicesClientListBySubscriptionResponse struct { PrivateLinkServiceListResult } -// PrivateLinkServicesClientListPrivateEndpointConnectionsResponse contains the response from method PrivateLinkServicesClient.ListPrivateEndpointConnections. +// PrivateLinkServicesClientListPrivateEndpointConnectionsResponse contains the response from method PrivateLinkServicesClient.NewListPrivateEndpointConnectionsPager. type PrivateLinkServicesClientListPrivateEndpointConnectionsResponse struct { PrivateEndpointConnectionListResult } -// PrivateLinkServicesClientListResponse contains the response from method PrivateLinkServicesClient.List. +// PrivateLinkServicesClientListResponse contains the response from method PrivateLinkServicesClient.NewListPager. type PrivateLinkServicesClientListResponse struct { PrivateLinkServiceListResult } @@ -1726,7 +1726,7 @@ type ProfilesClientCreateOrUpdateResponse struct { Profile } -// ProfilesClientDeleteResponse contains the response from method ProfilesClient.Delete. +// ProfilesClientDeleteResponse contains the response from method ProfilesClient.BeginDelete. type ProfilesClientDeleteResponse struct { // placeholder for future response values } @@ -1736,12 +1736,12 @@ type ProfilesClientGetResponse struct { Profile } -// ProfilesClientListAllResponse contains the response from method ProfilesClient.ListAll. +// ProfilesClientListAllResponse contains the response from method ProfilesClient.NewListAllPager. type ProfilesClientListAllResponse struct { ProfileListResult } -// ProfilesClientListResponse contains the response from method ProfilesClient.List. +// ProfilesClientListResponse contains the response from method ProfilesClient.NewListPager. type ProfilesClientListResponse struct { ProfileListResult } @@ -1751,17 +1751,17 @@ type ProfilesClientUpdateTagsResponse struct { Profile } -// PublicIPAddressesClientCreateOrUpdateResponse contains the response from method PublicIPAddressesClient.CreateOrUpdate. +// PublicIPAddressesClientCreateOrUpdateResponse contains the response from method PublicIPAddressesClient.BeginCreateOrUpdate. type PublicIPAddressesClientCreateOrUpdateResponse struct { PublicIPAddress } -// PublicIPAddressesClientDdosProtectionStatusResponse contains the response from method PublicIPAddressesClient.DdosProtectionStatus. +// PublicIPAddressesClientDdosProtectionStatusResponse contains the response from method PublicIPAddressesClient.BeginDdosProtectionStatus. type PublicIPAddressesClientDdosProtectionStatusResponse struct { PublicIPDdosProtectionStatusResult } -// PublicIPAddressesClientDeleteResponse contains the response from method PublicIPAddressesClient.Delete. +// PublicIPAddressesClientDeleteResponse contains the response from method PublicIPAddressesClient.BeginDelete. type PublicIPAddressesClientDeleteResponse struct { // placeholder for future response values } @@ -1781,32 +1781,32 @@ type PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResponse str PublicIPAddress } -// PublicIPAddressesClientListAllResponse contains the response from method PublicIPAddressesClient.ListAll. +// PublicIPAddressesClientListAllResponse contains the response from method PublicIPAddressesClient.NewListAllPager. type PublicIPAddressesClientListAllResponse struct { PublicIPAddressListResult } -// PublicIPAddressesClientListCloudServicePublicIPAddressesResponse contains the response from method PublicIPAddressesClient.ListCloudServicePublicIPAddresses. +// PublicIPAddressesClientListCloudServicePublicIPAddressesResponse contains the response from method PublicIPAddressesClient.NewListCloudServicePublicIPAddressesPager. type PublicIPAddressesClientListCloudServicePublicIPAddressesResponse struct { PublicIPAddressListResult } -// PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse contains the response from method PublicIPAddressesClient.ListCloudServiceRoleInstancePublicIPAddresses. +// PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse contains the response from method PublicIPAddressesClient.NewListCloudServiceRoleInstancePublicIPAddressesPager. type PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse struct { PublicIPAddressListResult } -// PublicIPAddressesClientListResponse contains the response from method PublicIPAddressesClient.List. +// PublicIPAddressesClientListResponse contains the response from method PublicIPAddressesClient.NewListPager. type PublicIPAddressesClientListResponse struct { PublicIPAddressListResult } -// PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse contains the response from method PublicIPAddressesClient.ListVirtualMachineScaleSetPublicIPAddresses. +// PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse contains the response from method PublicIPAddressesClient.NewListVirtualMachineScaleSetPublicIPAddressesPager. type PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse struct { PublicIPAddressListResult } -// PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse contains the response from method PublicIPAddressesClient.ListVirtualMachineScaleSetVMPublicIPAddresses. +// PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse contains the response from method PublicIPAddressesClient.NewListVirtualMachineScaleSetVMPublicIPAddressesPager. type PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse struct { PublicIPAddressListResult } @@ -1816,12 +1816,12 @@ type PublicIPAddressesClientUpdateTagsResponse struct { PublicIPAddress } -// PublicIPPrefixesClientCreateOrUpdateResponse contains the response from method PublicIPPrefixesClient.CreateOrUpdate. +// PublicIPPrefixesClientCreateOrUpdateResponse contains the response from method PublicIPPrefixesClient.BeginCreateOrUpdate. type PublicIPPrefixesClientCreateOrUpdateResponse struct { PublicIPPrefix } -// PublicIPPrefixesClientDeleteResponse contains the response from method PublicIPPrefixesClient.Delete. +// PublicIPPrefixesClientDeleteResponse contains the response from method PublicIPPrefixesClient.BeginDelete. type PublicIPPrefixesClientDeleteResponse struct { // placeholder for future response values } @@ -1831,12 +1831,12 @@ type PublicIPPrefixesClientGetResponse struct { PublicIPPrefix } -// PublicIPPrefixesClientListAllResponse contains the response from method PublicIPPrefixesClient.ListAll. +// PublicIPPrefixesClientListAllResponse contains the response from method PublicIPPrefixesClient.NewListAllPager. type PublicIPPrefixesClientListAllResponse struct { PublicIPPrefixListResult } -// PublicIPPrefixesClientListResponse contains the response from method PublicIPPrefixesClient.List. +// PublicIPPrefixesClientListResponse contains the response from method PublicIPPrefixesClient.NewListPager. type PublicIPPrefixesClientListResponse struct { PublicIPPrefixListResult } @@ -1851,12 +1851,12 @@ type ResourceNavigationLinksClientListResponse struct { ResourceNavigationLinksListResult } -// RouteFilterRulesClientCreateOrUpdateResponse contains the response from method RouteFilterRulesClient.CreateOrUpdate. +// RouteFilterRulesClientCreateOrUpdateResponse contains the response from method RouteFilterRulesClient.BeginCreateOrUpdate. type RouteFilterRulesClientCreateOrUpdateResponse struct { RouteFilterRule } -// RouteFilterRulesClientDeleteResponse contains the response from method RouteFilterRulesClient.Delete. +// RouteFilterRulesClientDeleteResponse contains the response from method RouteFilterRulesClient.BeginDelete. type RouteFilterRulesClientDeleteResponse struct { // placeholder for future response values } @@ -1866,17 +1866,17 @@ type RouteFilterRulesClientGetResponse struct { RouteFilterRule } -// RouteFilterRulesClientListByRouteFilterResponse contains the response from method RouteFilterRulesClient.ListByRouteFilter. +// RouteFilterRulesClientListByRouteFilterResponse contains the response from method RouteFilterRulesClient.NewListByRouteFilterPager. type RouteFilterRulesClientListByRouteFilterResponse struct { RouteFilterRuleListResult } -// RouteFiltersClientCreateOrUpdateResponse contains the response from method RouteFiltersClient.CreateOrUpdate. +// RouteFiltersClientCreateOrUpdateResponse contains the response from method RouteFiltersClient.BeginCreateOrUpdate. type RouteFiltersClientCreateOrUpdateResponse struct { RouteFilter } -// RouteFiltersClientDeleteResponse contains the response from method RouteFiltersClient.Delete. +// RouteFiltersClientDeleteResponse contains the response from method RouteFiltersClient.BeginDelete. type RouteFiltersClientDeleteResponse struct { // placeholder for future response values } @@ -1886,12 +1886,12 @@ type RouteFiltersClientGetResponse struct { RouteFilter } -// RouteFiltersClientListByResourceGroupResponse contains the response from method RouteFiltersClient.ListByResourceGroup. +// RouteFiltersClientListByResourceGroupResponse contains the response from method RouteFiltersClient.NewListByResourceGroupPager. type RouteFiltersClientListByResourceGroupResponse struct { RouteFilterListResult } -// RouteFiltersClientListResponse contains the response from method RouteFiltersClient.List. +// RouteFiltersClientListResponse contains the response from method RouteFiltersClient.NewListPager. type RouteFiltersClientListResponse struct { RouteFilterListResult } @@ -1901,12 +1901,12 @@ type RouteFiltersClientUpdateTagsResponse struct { RouteFilter } -// RouteMapsClientCreateOrUpdateResponse contains the response from method RouteMapsClient.CreateOrUpdate. +// RouteMapsClientCreateOrUpdateResponse contains the response from method RouteMapsClient.BeginCreateOrUpdate. type RouteMapsClientCreateOrUpdateResponse struct { RouteMap } -// RouteMapsClientDeleteResponse contains the response from method RouteMapsClient.Delete. +// RouteMapsClientDeleteResponse contains the response from method RouteMapsClient.BeginDelete. type RouteMapsClientDeleteResponse struct { // placeholder for future response values } @@ -1916,17 +1916,17 @@ type RouteMapsClientGetResponse struct { RouteMap } -// RouteMapsClientListResponse contains the response from method RouteMapsClient.List. +// RouteMapsClientListResponse contains the response from method RouteMapsClient.NewListPager. type RouteMapsClientListResponse struct { ListRouteMapsResult } -// RouteTablesClientCreateOrUpdateResponse contains the response from method RouteTablesClient.CreateOrUpdate. +// RouteTablesClientCreateOrUpdateResponse contains the response from method RouteTablesClient.BeginCreateOrUpdate. type RouteTablesClientCreateOrUpdateResponse struct { RouteTable } -// RouteTablesClientDeleteResponse contains the response from method RouteTablesClient.Delete. +// RouteTablesClientDeleteResponse contains the response from method RouteTablesClient.BeginDelete. type RouteTablesClientDeleteResponse struct { // placeholder for future response values } @@ -1936,12 +1936,12 @@ type RouteTablesClientGetResponse struct { RouteTable } -// RouteTablesClientListAllResponse contains the response from method RouteTablesClient.ListAll. +// RouteTablesClientListAllResponse contains the response from method RouteTablesClient.NewListAllPager. type RouteTablesClientListAllResponse struct { RouteTableListResult } -// RouteTablesClientListResponse contains the response from method RouteTablesClient.List. +// RouteTablesClientListResponse contains the response from method RouteTablesClient.NewListPager. type RouteTablesClientListResponse struct { RouteTableListResult } @@ -1951,12 +1951,12 @@ type RouteTablesClientUpdateTagsResponse struct { RouteTable } -// RoutesClientCreateOrUpdateResponse contains the response from method RoutesClient.CreateOrUpdate. +// RoutesClientCreateOrUpdateResponse contains the response from method RoutesClient.BeginCreateOrUpdate. type RoutesClientCreateOrUpdateResponse struct { Route } -// RoutesClientDeleteResponse contains the response from method RoutesClient.Delete. +// RoutesClientDeleteResponse contains the response from method RoutesClient.BeginDelete. type RoutesClientDeleteResponse struct { // placeholder for future response values } @@ -1966,17 +1966,17 @@ type RoutesClientGetResponse struct { Route } -// RoutesClientListResponse contains the response from method RoutesClient.List. +// RoutesClientListResponse contains the response from method RoutesClient.NewListPager. type RoutesClientListResponse struct { RouteListResult } -// RoutingIntentClientCreateOrUpdateResponse contains the response from method RoutingIntentClient.CreateOrUpdate. +// RoutingIntentClientCreateOrUpdateResponse contains the response from method RoutingIntentClient.BeginCreateOrUpdate. type RoutingIntentClientCreateOrUpdateResponse struct { RoutingIntent } -// RoutingIntentClientDeleteResponse contains the response from method RoutingIntentClient.Delete. +// RoutingIntentClientDeleteResponse contains the response from method RoutingIntentClient.BeginDelete. type RoutingIntentClientDeleteResponse struct { // placeholder for future response values } @@ -1986,7 +1986,7 @@ type RoutingIntentClientGetResponse struct { RoutingIntent } -// RoutingIntentClientListResponse contains the response from method RoutingIntentClient.List. +// RoutingIntentClientListResponse contains the response from method RoutingIntentClient.NewListPager. type RoutingIntentClientListResponse struct { ListRoutingIntentResult } @@ -2006,7 +2006,7 @@ type ScopeConnectionsClientGetResponse struct { ScopeConnection } -// ScopeConnectionsClientListResponse contains the response from method ScopeConnectionsClient.List. +// ScopeConnectionsClientListResponse contains the response from method ScopeConnectionsClient.NewListPager. type ScopeConnectionsClientListResponse struct { ScopeConnectionListResult } @@ -2016,7 +2016,7 @@ type SecurityAdminConfigurationsClientCreateOrUpdateResponse struct { SecurityAdminConfiguration } -// SecurityAdminConfigurationsClientDeleteResponse contains the response from method SecurityAdminConfigurationsClient.Delete. +// SecurityAdminConfigurationsClientDeleteResponse contains the response from method SecurityAdminConfigurationsClient.BeginDelete. type SecurityAdminConfigurationsClientDeleteResponse struct { // placeholder for future response values } @@ -2026,17 +2026,17 @@ type SecurityAdminConfigurationsClientGetResponse struct { SecurityAdminConfiguration } -// SecurityAdminConfigurationsClientListResponse contains the response from method SecurityAdminConfigurationsClient.List. +// SecurityAdminConfigurationsClientListResponse contains the response from method SecurityAdminConfigurationsClient.NewListPager. type SecurityAdminConfigurationsClientListResponse struct { SecurityAdminConfigurationListResult } -// SecurityGroupsClientCreateOrUpdateResponse contains the response from method SecurityGroupsClient.CreateOrUpdate. +// SecurityGroupsClientCreateOrUpdateResponse contains the response from method SecurityGroupsClient.BeginCreateOrUpdate. type SecurityGroupsClientCreateOrUpdateResponse struct { SecurityGroup } -// SecurityGroupsClientDeleteResponse contains the response from method SecurityGroupsClient.Delete. +// SecurityGroupsClientDeleteResponse contains the response from method SecurityGroupsClient.BeginDelete. type SecurityGroupsClientDeleteResponse struct { // placeholder for future response values } @@ -2046,12 +2046,12 @@ type SecurityGroupsClientGetResponse struct { SecurityGroup } -// SecurityGroupsClientListAllResponse contains the response from method SecurityGroupsClient.ListAll. +// SecurityGroupsClientListAllResponse contains the response from method SecurityGroupsClient.NewListAllPager. type SecurityGroupsClientListAllResponse struct { SecurityGroupListResult } -// SecurityGroupsClientListResponse contains the response from method SecurityGroupsClient.List. +// SecurityGroupsClientListResponse contains the response from method SecurityGroupsClient.NewListPager. type SecurityGroupsClientListResponse struct { SecurityGroupListResult } @@ -2061,12 +2061,12 @@ type SecurityGroupsClientUpdateTagsResponse struct { SecurityGroup } -// SecurityPartnerProvidersClientCreateOrUpdateResponse contains the response from method SecurityPartnerProvidersClient.CreateOrUpdate. +// SecurityPartnerProvidersClientCreateOrUpdateResponse contains the response from method SecurityPartnerProvidersClient.BeginCreateOrUpdate. type SecurityPartnerProvidersClientCreateOrUpdateResponse struct { SecurityPartnerProvider } -// SecurityPartnerProvidersClientDeleteResponse contains the response from method SecurityPartnerProvidersClient.Delete. +// SecurityPartnerProvidersClientDeleteResponse contains the response from method SecurityPartnerProvidersClient.BeginDelete. type SecurityPartnerProvidersClientDeleteResponse struct { // placeholder for future response values } @@ -2076,12 +2076,12 @@ type SecurityPartnerProvidersClientGetResponse struct { SecurityPartnerProvider } -// SecurityPartnerProvidersClientListByResourceGroupResponse contains the response from method SecurityPartnerProvidersClient.ListByResourceGroup. +// SecurityPartnerProvidersClientListByResourceGroupResponse contains the response from method SecurityPartnerProvidersClient.NewListByResourceGroupPager. type SecurityPartnerProvidersClientListByResourceGroupResponse struct { SecurityPartnerProviderListResult } -// SecurityPartnerProvidersClientListResponse contains the response from method SecurityPartnerProvidersClient.List. +// SecurityPartnerProvidersClientListResponse contains the response from method SecurityPartnerProvidersClient.NewListPager. type SecurityPartnerProvidersClientListResponse struct { SecurityPartnerProviderListResult } @@ -2091,12 +2091,12 @@ type SecurityPartnerProvidersClientUpdateTagsResponse struct { SecurityPartnerProvider } -// SecurityRulesClientCreateOrUpdateResponse contains the response from method SecurityRulesClient.CreateOrUpdate. +// SecurityRulesClientCreateOrUpdateResponse contains the response from method SecurityRulesClient.BeginCreateOrUpdate. type SecurityRulesClientCreateOrUpdateResponse struct { SecurityRule } -// SecurityRulesClientDeleteResponse contains the response from method SecurityRulesClient.Delete. +// SecurityRulesClientDeleteResponse contains the response from method SecurityRulesClient.BeginDelete. type SecurityRulesClientDeleteResponse struct { // placeholder for future response values } @@ -2106,7 +2106,7 @@ type SecurityRulesClientGetResponse struct { SecurityRule } -// SecurityRulesClientListResponse contains the response from method SecurityRulesClient.List. +// SecurityRulesClientListResponse contains the response from method SecurityRulesClient.NewListPager. type SecurityRulesClientListResponse struct { SecurityRuleListResult } @@ -2116,12 +2116,12 @@ type ServiceAssociationLinksClientListResponse struct { ServiceAssociationLinksListResult } -// ServiceEndpointPoliciesClientCreateOrUpdateResponse contains the response from method ServiceEndpointPoliciesClient.CreateOrUpdate. +// ServiceEndpointPoliciesClientCreateOrUpdateResponse contains the response from method ServiceEndpointPoliciesClient.BeginCreateOrUpdate. type ServiceEndpointPoliciesClientCreateOrUpdateResponse struct { ServiceEndpointPolicy } -// ServiceEndpointPoliciesClientDeleteResponse contains the response from method ServiceEndpointPoliciesClient.Delete. +// ServiceEndpointPoliciesClientDeleteResponse contains the response from method ServiceEndpointPoliciesClient.BeginDelete. type ServiceEndpointPoliciesClientDeleteResponse struct { // placeholder for future response values } @@ -2131,12 +2131,12 @@ type ServiceEndpointPoliciesClientGetResponse struct { ServiceEndpointPolicy } -// ServiceEndpointPoliciesClientListByResourceGroupResponse contains the response from method ServiceEndpointPoliciesClient.ListByResourceGroup. +// ServiceEndpointPoliciesClientListByResourceGroupResponse contains the response from method ServiceEndpointPoliciesClient.NewListByResourceGroupPager. type ServiceEndpointPoliciesClientListByResourceGroupResponse struct { ServiceEndpointPolicyListResult } -// ServiceEndpointPoliciesClientListResponse contains the response from method ServiceEndpointPoliciesClient.List. +// ServiceEndpointPoliciesClientListResponse contains the response from method ServiceEndpointPoliciesClient.NewListPager. type ServiceEndpointPoliciesClientListResponse struct { ServiceEndpointPolicyListResult } @@ -2146,12 +2146,12 @@ type ServiceEndpointPoliciesClientUpdateTagsResponse struct { ServiceEndpointPolicy } -// ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse contains the response from method ServiceEndpointPolicyDefinitionsClient.CreateOrUpdate. +// ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse contains the response from method ServiceEndpointPolicyDefinitionsClient.BeginCreateOrUpdate. type ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse struct { ServiceEndpointPolicyDefinition } -// ServiceEndpointPolicyDefinitionsClientDeleteResponse contains the response from method ServiceEndpointPolicyDefinitionsClient.Delete. +// ServiceEndpointPolicyDefinitionsClientDeleteResponse contains the response from method ServiceEndpointPolicyDefinitionsClient.BeginDelete. type ServiceEndpointPolicyDefinitionsClientDeleteResponse struct { // placeholder for future response values } @@ -2161,12 +2161,12 @@ type ServiceEndpointPolicyDefinitionsClientGetResponse struct { ServiceEndpointPolicyDefinition } -// ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse contains the response from method ServiceEndpointPolicyDefinitionsClient.ListByResourceGroup. +// ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse contains the response from method ServiceEndpointPolicyDefinitionsClient.NewListByResourceGroupPager. type ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse struct { ServiceEndpointPolicyDefinitionListResult } -// ServiceTagInformationClientListResponse contains the response from method ServiceTagInformationClient.List. +// ServiceTagInformationClientListResponse contains the response from method ServiceTagInformationClient.NewListPager. type ServiceTagInformationClientListResponse struct { ServiceTagInformationListResult } @@ -2191,17 +2191,17 @@ type StaticMembersClientGetResponse struct { StaticMember } -// StaticMembersClientListResponse contains the response from method StaticMembersClient.List. +// StaticMembersClientListResponse contains the response from method StaticMembersClient.NewListPager. type StaticMembersClientListResponse struct { StaticMemberListResult } -// SubnetsClientCreateOrUpdateResponse contains the response from method SubnetsClient.CreateOrUpdate. +// SubnetsClientCreateOrUpdateResponse contains the response from method SubnetsClient.BeginCreateOrUpdate. type SubnetsClientCreateOrUpdateResponse struct { Subnet } -// SubnetsClientDeleteResponse contains the response from method SubnetsClient.Delete. +// SubnetsClientDeleteResponse contains the response from method SubnetsClient.BeginDelete. type SubnetsClientDeleteResponse struct { // placeholder for future response values } @@ -2211,17 +2211,17 @@ type SubnetsClientGetResponse struct { Subnet } -// SubnetsClientListResponse contains the response from method SubnetsClient.List. +// SubnetsClientListResponse contains the response from method SubnetsClient.NewListPager. type SubnetsClientListResponse struct { SubnetListResult } -// SubnetsClientPrepareNetworkPoliciesResponse contains the response from method SubnetsClient.PrepareNetworkPolicies. +// SubnetsClientPrepareNetworkPoliciesResponse contains the response from method SubnetsClient.BeginPrepareNetworkPolicies. type SubnetsClientPrepareNetworkPoliciesResponse struct { // placeholder for future response values } -// SubnetsClientUnprepareNetworkPoliciesResponse contains the response from method SubnetsClient.UnprepareNetworkPolicies. +// SubnetsClientUnprepareNetworkPoliciesResponse contains the response from method SubnetsClient.BeginUnprepareNetworkPolicies. type SubnetsClientUnprepareNetworkPoliciesResponse struct { // placeholder for future response values } @@ -2241,22 +2241,22 @@ type SubscriptionNetworkManagerConnectionsClientGetResponse struct { ManagerConnection } -// SubscriptionNetworkManagerConnectionsClientListResponse contains the response from method SubscriptionNetworkManagerConnectionsClient.List. +// SubscriptionNetworkManagerConnectionsClientListResponse contains the response from method SubscriptionNetworkManagerConnectionsClient.NewListPager. type SubscriptionNetworkManagerConnectionsClientListResponse struct { ManagerConnectionListResult } -// UsagesClientListResponse contains the response from method UsagesClient.List. +// UsagesClientListResponse contains the response from method UsagesClient.NewListPager. type UsagesClientListResponse struct { UsagesListResult } -// VPNConnectionsClientCreateOrUpdateResponse contains the response from method VPNConnectionsClient.CreateOrUpdate. +// VPNConnectionsClientCreateOrUpdateResponse contains the response from method VPNConnectionsClient.BeginCreateOrUpdate. type VPNConnectionsClientCreateOrUpdateResponse struct { VPNConnection } -// VPNConnectionsClientDeleteResponse contains the response from method VPNConnectionsClient.Delete. +// VPNConnectionsClientDeleteResponse contains the response from method VPNConnectionsClient.BeginDelete. type VPNConnectionsClientDeleteResponse struct { // placeholder for future response values } @@ -2266,12 +2266,12 @@ type VPNConnectionsClientGetResponse struct { VPNConnection } -// VPNConnectionsClientListByVPNGatewayResponse contains the response from method VPNConnectionsClient.ListByVPNGateway. +// VPNConnectionsClientListByVPNGatewayResponse contains the response from method VPNConnectionsClient.NewListByVPNGatewayPager. type VPNConnectionsClientListByVPNGatewayResponse struct { ListVPNConnectionsResult } -// VPNConnectionsClientStartPacketCaptureResponse contains the response from method VPNConnectionsClient.StartPacketCapture. +// VPNConnectionsClientStartPacketCaptureResponse contains the response from method VPNConnectionsClient.BeginStartPacketCapture. type VPNConnectionsClientStartPacketCaptureResponse struct { Value *string } @@ -2281,7 +2281,7 @@ func (v *VPNConnectionsClientStartPacketCaptureResponse) UnmarshalJSON(data []by return json.Unmarshal(data, &v.Value) } -// VPNConnectionsClientStopPacketCaptureResponse contains the response from method VPNConnectionsClient.StopPacketCapture. +// VPNConnectionsClientStopPacketCaptureResponse contains the response from method VPNConnectionsClient.BeginStopPacketCapture. type VPNConnectionsClientStopPacketCaptureResponse struct { Value *string } @@ -2291,12 +2291,12 @@ func (v *VPNConnectionsClientStopPacketCaptureResponse) UnmarshalJSON(data []byt return json.Unmarshal(data, &v.Value) } -// VPNGatewaysClientCreateOrUpdateResponse contains the response from method VPNGatewaysClient.CreateOrUpdate. +// VPNGatewaysClientCreateOrUpdateResponse contains the response from method VPNGatewaysClient.BeginCreateOrUpdate. type VPNGatewaysClientCreateOrUpdateResponse struct { VPNGateway } -// VPNGatewaysClientDeleteResponse contains the response from method VPNGatewaysClient.Delete. +// VPNGatewaysClientDeleteResponse contains the response from method VPNGatewaysClient.BeginDelete. type VPNGatewaysClientDeleteResponse struct { // placeholder for future response values } @@ -2306,22 +2306,22 @@ type VPNGatewaysClientGetResponse struct { VPNGateway } -// VPNGatewaysClientListByResourceGroupResponse contains the response from method VPNGatewaysClient.ListByResourceGroup. +// VPNGatewaysClientListByResourceGroupResponse contains the response from method VPNGatewaysClient.NewListByResourceGroupPager. type VPNGatewaysClientListByResourceGroupResponse struct { ListVPNGatewaysResult } -// VPNGatewaysClientListResponse contains the response from method VPNGatewaysClient.List. +// VPNGatewaysClientListResponse contains the response from method VPNGatewaysClient.NewListPager. type VPNGatewaysClientListResponse struct { ListVPNGatewaysResult } -// VPNGatewaysClientResetResponse contains the response from method VPNGatewaysClient.Reset. +// VPNGatewaysClientResetResponse contains the response from method VPNGatewaysClient.BeginReset. type VPNGatewaysClientResetResponse struct { VPNGateway } -// VPNGatewaysClientStartPacketCaptureResponse contains the response from method VPNGatewaysClient.StartPacketCapture. +// VPNGatewaysClientStartPacketCaptureResponse contains the response from method VPNGatewaysClient.BeginStartPacketCapture. type VPNGatewaysClientStartPacketCaptureResponse struct { Value *string } @@ -2331,7 +2331,7 @@ func (v *VPNGatewaysClientStartPacketCaptureResponse) UnmarshalJSON(data []byte) return json.Unmarshal(data, &v.Value) } -// VPNGatewaysClientStopPacketCaptureResponse contains the response from method VPNGatewaysClient.StopPacketCapture. +// VPNGatewaysClientStopPacketCaptureResponse contains the response from method VPNGatewaysClient.BeginStopPacketCapture. type VPNGatewaysClientStopPacketCaptureResponse struct { Value *string } @@ -2341,12 +2341,12 @@ func (v *VPNGatewaysClientStopPacketCaptureResponse) UnmarshalJSON(data []byte) return json.Unmarshal(data, &v.Value) } -// VPNGatewaysClientUpdateTagsResponse contains the response from method VPNGatewaysClient.UpdateTags. +// VPNGatewaysClientUpdateTagsResponse contains the response from method VPNGatewaysClient.BeginUpdateTags. type VPNGatewaysClientUpdateTagsResponse struct { VPNGateway } -// VPNLinkConnectionsClientGetIkeSasResponse contains the response from method VPNLinkConnectionsClient.GetIkeSas. +// VPNLinkConnectionsClientGetIkeSasResponse contains the response from method VPNLinkConnectionsClient.BeginGetIkeSas. type VPNLinkConnectionsClientGetIkeSasResponse struct { Value *string } @@ -2356,27 +2356,27 @@ func (v *VPNLinkConnectionsClientGetIkeSasResponse) UnmarshalJSON(data []byte) e return json.Unmarshal(data, &v.Value) } -// VPNLinkConnectionsClientListByVPNConnectionResponse contains the response from method VPNLinkConnectionsClient.ListByVPNConnection. +// VPNLinkConnectionsClientListByVPNConnectionResponse contains the response from method VPNLinkConnectionsClient.NewListByVPNConnectionPager. type VPNLinkConnectionsClientListByVPNConnectionResponse struct { ListVPNSiteLinkConnectionsResult } -// VPNLinkConnectionsClientResetConnectionResponse contains the response from method VPNLinkConnectionsClient.ResetConnection. +// VPNLinkConnectionsClientResetConnectionResponse contains the response from method VPNLinkConnectionsClient.BeginResetConnection. type VPNLinkConnectionsClientResetConnectionResponse struct { // placeholder for future response values } -// VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse contains the response from method VPNServerConfigurationsAssociatedWithVirtualWanClient.List. +// VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse contains the response from method VPNServerConfigurationsAssociatedWithVirtualWanClient.BeginList. type VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse struct { VPNServerConfigurationsResponse } -// VPNServerConfigurationsClientCreateOrUpdateResponse contains the response from method VPNServerConfigurationsClient.CreateOrUpdate. +// VPNServerConfigurationsClientCreateOrUpdateResponse contains the response from method VPNServerConfigurationsClient.BeginCreateOrUpdate. type VPNServerConfigurationsClientCreateOrUpdateResponse struct { VPNServerConfiguration } -// VPNServerConfigurationsClientDeleteResponse contains the response from method VPNServerConfigurationsClient.Delete. +// VPNServerConfigurationsClientDeleteResponse contains the response from method VPNServerConfigurationsClient.BeginDelete. type VPNServerConfigurationsClientDeleteResponse struct { // placeholder for future response values } @@ -2386,12 +2386,12 @@ type VPNServerConfigurationsClientGetResponse struct { VPNServerConfiguration } -// VPNServerConfigurationsClientListByResourceGroupResponse contains the response from method VPNServerConfigurationsClient.ListByResourceGroup. +// VPNServerConfigurationsClientListByResourceGroupResponse contains the response from method VPNServerConfigurationsClient.NewListByResourceGroupPager. type VPNServerConfigurationsClientListByResourceGroupResponse struct { ListVPNServerConfigurationsResult } -// VPNServerConfigurationsClientListResponse contains the response from method VPNServerConfigurationsClient.List. +// VPNServerConfigurationsClientListResponse contains the response from method VPNServerConfigurationsClient.NewListPager. type VPNServerConfigurationsClientListResponse struct { ListVPNServerConfigurationsResult } @@ -2411,17 +2411,17 @@ type VPNSiteLinksClientGetResponse struct { VPNSiteLink } -// VPNSiteLinksClientListByVPNSiteResponse contains the response from method VPNSiteLinksClient.ListByVPNSite. +// VPNSiteLinksClientListByVPNSiteResponse contains the response from method VPNSiteLinksClient.NewListByVPNSitePager. type VPNSiteLinksClientListByVPNSiteResponse struct { ListVPNSiteLinksResult } -// VPNSitesClientCreateOrUpdateResponse contains the response from method VPNSitesClient.CreateOrUpdate. +// VPNSitesClientCreateOrUpdateResponse contains the response from method VPNSitesClient.BeginCreateOrUpdate. type VPNSitesClientCreateOrUpdateResponse struct { VPNSite } -// VPNSitesClientDeleteResponse contains the response from method VPNSitesClient.Delete. +// VPNSitesClientDeleteResponse contains the response from method VPNSitesClient.BeginDelete. type VPNSitesClientDeleteResponse struct { // placeholder for future response values } @@ -2431,12 +2431,12 @@ type VPNSitesClientGetResponse struct { VPNSite } -// VPNSitesClientListByResourceGroupResponse contains the response from method VPNSitesClient.ListByResourceGroup. +// VPNSitesClientListByResourceGroupResponse contains the response from method VPNSitesClient.NewListByResourceGroupPager. type VPNSitesClientListByResourceGroupResponse struct { ListVPNSitesResult } -// VPNSitesClientListResponse contains the response from method VPNSitesClient.List. +// VPNSitesClientListResponse contains the response from method VPNSitesClient.NewListPager. type VPNSitesClientListResponse struct { ListVPNSitesResult } @@ -2446,12 +2446,12 @@ type VPNSitesClientUpdateTagsResponse struct { VPNSite } -// VPNSitesConfigurationClientDownloadResponse contains the response from method VPNSitesConfigurationClient.Download. +// VPNSitesConfigurationClientDownloadResponse contains the response from method VPNSitesConfigurationClient.BeginDownload. type VPNSitesConfigurationClientDownloadResponse struct { // placeholder for future response values } -// VipSwapClientCreateResponse contains the response from method VipSwapClient.Create. +// VipSwapClientCreateResponse contains the response from method VipSwapClient.BeginCreate. type VipSwapClientCreateResponse struct { // placeholder for future response values } @@ -2471,17 +2471,17 @@ type VirtualApplianceSKUsClientGetResponse struct { VirtualApplianceSKU } -// VirtualApplianceSKUsClientListResponse contains the response from method VirtualApplianceSKUsClient.List. +// VirtualApplianceSKUsClientListResponse contains the response from method VirtualApplianceSKUsClient.NewListPager. type VirtualApplianceSKUsClientListResponse struct { VirtualApplianceSKUListResult } -// VirtualApplianceSitesClientCreateOrUpdateResponse contains the response from method VirtualApplianceSitesClient.CreateOrUpdate. +// VirtualApplianceSitesClientCreateOrUpdateResponse contains the response from method VirtualApplianceSitesClient.BeginCreateOrUpdate. type VirtualApplianceSitesClientCreateOrUpdateResponse struct { VirtualApplianceSite } -// VirtualApplianceSitesClientDeleteResponse contains the response from method VirtualApplianceSitesClient.Delete. +// VirtualApplianceSitesClientDeleteResponse contains the response from method VirtualApplianceSitesClient.BeginDelete. type VirtualApplianceSitesClientDeleteResponse struct { // placeholder for future response values } @@ -2491,17 +2491,17 @@ type VirtualApplianceSitesClientGetResponse struct { VirtualApplianceSite } -// VirtualApplianceSitesClientListResponse contains the response from method VirtualApplianceSitesClient.List. +// VirtualApplianceSitesClientListResponse contains the response from method VirtualApplianceSitesClient.NewListPager. type VirtualApplianceSitesClientListResponse struct { VirtualApplianceSiteListResult } -// VirtualAppliancesClientCreateOrUpdateResponse contains the response from method VirtualAppliancesClient.CreateOrUpdate. +// VirtualAppliancesClientCreateOrUpdateResponse contains the response from method VirtualAppliancesClient.BeginCreateOrUpdate. type VirtualAppliancesClientCreateOrUpdateResponse struct { VirtualAppliance } -// VirtualAppliancesClientDeleteResponse contains the response from method VirtualAppliancesClient.Delete. +// VirtualAppliancesClientDeleteResponse contains the response from method VirtualAppliancesClient.BeginDelete. type VirtualAppliancesClientDeleteResponse struct { // placeholder for future response values } @@ -2511,12 +2511,12 @@ type VirtualAppliancesClientGetResponse struct { VirtualAppliance } -// VirtualAppliancesClientListByResourceGroupResponse contains the response from method VirtualAppliancesClient.ListByResourceGroup. +// VirtualAppliancesClientListByResourceGroupResponse contains the response from method VirtualAppliancesClient.NewListByResourceGroupPager. type VirtualAppliancesClientListByResourceGroupResponse struct { VirtualApplianceListResult } -// VirtualAppliancesClientListResponse contains the response from method VirtualAppliancesClient.List. +// VirtualAppliancesClientListResponse contains the response from method VirtualAppliancesClient.NewListPager. type VirtualAppliancesClientListResponse struct { VirtualApplianceListResult } @@ -2526,12 +2526,12 @@ type VirtualAppliancesClientUpdateTagsResponse struct { VirtualAppliance } -// VirtualHubBgpConnectionClientCreateOrUpdateResponse contains the response from method VirtualHubBgpConnectionClient.CreateOrUpdate. +// VirtualHubBgpConnectionClientCreateOrUpdateResponse contains the response from method VirtualHubBgpConnectionClient.BeginCreateOrUpdate. type VirtualHubBgpConnectionClientCreateOrUpdateResponse struct { BgpConnection } -// VirtualHubBgpConnectionClientDeleteResponse contains the response from method VirtualHubBgpConnectionClient.Delete. +// VirtualHubBgpConnectionClientDeleteResponse contains the response from method VirtualHubBgpConnectionClient.BeginDelete. type VirtualHubBgpConnectionClientDeleteResponse struct { // placeholder for future response values } @@ -2541,27 +2541,27 @@ type VirtualHubBgpConnectionClientGetResponse struct { BgpConnection } -// VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse contains the response from method VirtualHubBgpConnectionsClient.ListAdvertisedRoutes. +// VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse contains the response from method VirtualHubBgpConnectionsClient.BeginListAdvertisedRoutes. type VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse struct { PeerRouteList } -// VirtualHubBgpConnectionsClientListLearnedRoutesResponse contains the response from method VirtualHubBgpConnectionsClient.ListLearnedRoutes. +// VirtualHubBgpConnectionsClientListLearnedRoutesResponse contains the response from method VirtualHubBgpConnectionsClient.BeginListLearnedRoutes. type VirtualHubBgpConnectionsClientListLearnedRoutesResponse struct { PeerRouteList } -// VirtualHubBgpConnectionsClientListResponse contains the response from method VirtualHubBgpConnectionsClient.List. +// VirtualHubBgpConnectionsClientListResponse contains the response from method VirtualHubBgpConnectionsClient.NewListPager. type VirtualHubBgpConnectionsClientListResponse struct { ListVirtualHubBgpConnectionResults } -// VirtualHubIPConfigurationClientCreateOrUpdateResponse contains the response from method VirtualHubIPConfigurationClient.CreateOrUpdate. +// VirtualHubIPConfigurationClientCreateOrUpdateResponse contains the response from method VirtualHubIPConfigurationClient.BeginCreateOrUpdate. type VirtualHubIPConfigurationClientCreateOrUpdateResponse struct { HubIPConfiguration } -// VirtualHubIPConfigurationClientDeleteResponse contains the response from method VirtualHubIPConfigurationClient.Delete. +// VirtualHubIPConfigurationClientDeleteResponse contains the response from method VirtualHubIPConfigurationClient.BeginDelete. type VirtualHubIPConfigurationClientDeleteResponse struct { // placeholder for future response values } @@ -2571,17 +2571,17 @@ type VirtualHubIPConfigurationClientGetResponse struct { HubIPConfiguration } -// VirtualHubIPConfigurationClientListResponse contains the response from method VirtualHubIPConfigurationClient.List. +// VirtualHubIPConfigurationClientListResponse contains the response from method VirtualHubIPConfigurationClient.NewListPager. type VirtualHubIPConfigurationClientListResponse struct { ListVirtualHubIPConfigurationResults } -// VirtualHubRouteTableV2SClientCreateOrUpdateResponse contains the response from method VirtualHubRouteTableV2SClient.CreateOrUpdate. +// VirtualHubRouteTableV2SClientCreateOrUpdateResponse contains the response from method VirtualHubRouteTableV2SClient.BeginCreateOrUpdate. type VirtualHubRouteTableV2SClientCreateOrUpdateResponse struct { VirtualHubRouteTableV2 } -// VirtualHubRouteTableV2SClientDeleteResponse contains the response from method VirtualHubRouteTableV2SClient.Delete. +// VirtualHubRouteTableV2SClientDeleteResponse contains the response from method VirtualHubRouteTableV2SClient.BeginDelete. type VirtualHubRouteTableV2SClientDeleteResponse struct { // placeholder for future response values } @@ -2591,32 +2591,32 @@ type VirtualHubRouteTableV2SClientGetResponse struct { VirtualHubRouteTableV2 } -// VirtualHubRouteTableV2SClientListResponse contains the response from method VirtualHubRouteTableV2SClient.List. +// VirtualHubRouteTableV2SClientListResponse contains the response from method VirtualHubRouteTableV2SClient.NewListPager. type VirtualHubRouteTableV2SClientListResponse struct { ListVirtualHubRouteTableV2SResult } -// VirtualHubsClientCreateOrUpdateResponse contains the response from method VirtualHubsClient.CreateOrUpdate. +// VirtualHubsClientCreateOrUpdateResponse contains the response from method VirtualHubsClient.BeginCreateOrUpdate. type VirtualHubsClientCreateOrUpdateResponse struct { VirtualHub } -// VirtualHubsClientDeleteResponse contains the response from method VirtualHubsClient.Delete. +// VirtualHubsClientDeleteResponse contains the response from method VirtualHubsClient.BeginDelete. type VirtualHubsClientDeleteResponse struct { // placeholder for future response values } -// VirtualHubsClientGetEffectiveVirtualHubRoutesResponse contains the response from method VirtualHubsClient.GetEffectiveVirtualHubRoutes. +// VirtualHubsClientGetEffectiveVirtualHubRoutesResponse contains the response from method VirtualHubsClient.BeginGetEffectiveVirtualHubRoutes. type VirtualHubsClientGetEffectiveVirtualHubRoutesResponse struct { // placeholder for future response values } -// VirtualHubsClientGetInboundRoutesResponse contains the response from method VirtualHubsClient.GetInboundRoutes. +// VirtualHubsClientGetInboundRoutesResponse contains the response from method VirtualHubsClient.BeginGetInboundRoutes. type VirtualHubsClientGetInboundRoutesResponse struct { // placeholder for future response values } -// VirtualHubsClientGetOutboundRoutesResponse contains the response from method VirtualHubsClient.GetOutboundRoutes. +// VirtualHubsClientGetOutboundRoutesResponse contains the response from method VirtualHubsClient.BeginGetOutboundRoutes. type VirtualHubsClientGetOutboundRoutesResponse struct { // placeholder for future response values } @@ -2626,12 +2626,12 @@ type VirtualHubsClientGetResponse struct { VirtualHub } -// VirtualHubsClientListByResourceGroupResponse contains the response from method VirtualHubsClient.ListByResourceGroup. +// VirtualHubsClientListByResourceGroupResponse contains the response from method VirtualHubsClient.NewListByResourceGroupPager. type VirtualHubsClientListByResourceGroupResponse struct { ListVirtualHubsResult } -// VirtualHubsClientListResponse contains the response from method VirtualHubsClient.List. +// VirtualHubsClientListResponse contains the response from method VirtualHubsClient.NewListPager. type VirtualHubsClientListResponse struct { ListVirtualHubsResult } @@ -2641,17 +2641,17 @@ type VirtualHubsClientUpdateTagsResponse struct { VirtualHub } -// VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse contains the response from method VirtualNetworkGatewayConnectionsClient.CreateOrUpdate. +// VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse contains the response from method VirtualNetworkGatewayConnectionsClient.BeginCreateOrUpdate. type VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse struct { VirtualNetworkGatewayConnection } -// VirtualNetworkGatewayConnectionsClientDeleteResponse contains the response from method VirtualNetworkGatewayConnectionsClient.Delete. +// VirtualNetworkGatewayConnectionsClientDeleteResponse contains the response from method VirtualNetworkGatewayConnectionsClient.BeginDelete. type VirtualNetworkGatewayConnectionsClientDeleteResponse struct { // placeholder for future response values } -// VirtualNetworkGatewayConnectionsClientGetIkeSasResponse contains the response from method VirtualNetworkGatewayConnectionsClient.GetIkeSas. +// VirtualNetworkGatewayConnectionsClientGetIkeSasResponse contains the response from method VirtualNetworkGatewayConnectionsClient.BeginGetIkeSas. type VirtualNetworkGatewayConnectionsClientGetIkeSasResponse struct { Value *string } @@ -2671,27 +2671,27 @@ type VirtualNetworkGatewayConnectionsClientGetSharedKeyResponse struct { ConnectionSharedKey } -// VirtualNetworkGatewayConnectionsClientListResponse contains the response from method VirtualNetworkGatewayConnectionsClient.List. +// VirtualNetworkGatewayConnectionsClientListResponse contains the response from method VirtualNetworkGatewayConnectionsClient.NewListPager. type VirtualNetworkGatewayConnectionsClientListResponse struct { VirtualNetworkGatewayConnectionListResult } -// VirtualNetworkGatewayConnectionsClientResetConnectionResponse contains the response from method VirtualNetworkGatewayConnectionsClient.ResetConnection. +// VirtualNetworkGatewayConnectionsClientResetConnectionResponse contains the response from method VirtualNetworkGatewayConnectionsClient.BeginResetConnection. type VirtualNetworkGatewayConnectionsClientResetConnectionResponse struct { // placeholder for future response values } -// VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse contains the response from method VirtualNetworkGatewayConnectionsClient.ResetSharedKey. +// VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse contains the response from method VirtualNetworkGatewayConnectionsClient.BeginResetSharedKey. type VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse struct { ConnectionResetSharedKey } -// VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse contains the response from method VirtualNetworkGatewayConnectionsClient.SetSharedKey. +// VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse contains the response from method VirtualNetworkGatewayConnectionsClient.BeginSetSharedKey. type VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse struct { ConnectionSharedKey } -// VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse contains the response from method VirtualNetworkGatewayConnectionsClient.StartPacketCapture. +// VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse contains the response from method VirtualNetworkGatewayConnectionsClient.BeginStartPacketCapture. type VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse struct { Value *string } @@ -2701,7 +2701,7 @@ func (v *VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse) Unmar return json.Unmarshal(data, &v.Value) } -// VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse contains the response from method VirtualNetworkGatewayConnectionsClient.StopPacketCapture. +// VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse contains the response from method VirtualNetworkGatewayConnectionsClient.BeginStopPacketCapture. type VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse struct { Value *string } @@ -2711,17 +2711,17 @@ func (v *VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse) Unmars return json.Unmarshal(data, &v.Value) } -// VirtualNetworkGatewayConnectionsClientUpdateTagsResponse contains the response from method VirtualNetworkGatewayConnectionsClient.UpdateTags. +// VirtualNetworkGatewayConnectionsClientUpdateTagsResponse contains the response from method VirtualNetworkGatewayConnectionsClient.BeginUpdateTags. type VirtualNetworkGatewayConnectionsClientUpdateTagsResponse struct { VirtualNetworkGatewayConnection } -// VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse contains the response from method VirtualNetworkGatewayNatRulesClient.CreateOrUpdate. +// VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse contains the response from method VirtualNetworkGatewayNatRulesClient.BeginCreateOrUpdate. type VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse struct { VirtualNetworkGatewayNatRule } -// VirtualNetworkGatewayNatRulesClientDeleteResponse contains the response from method VirtualNetworkGatewayNatRulesClient.Delete. +// VirtualNetworkGatewayNatRulesClientDeleteResponse contains the response from method VirtualNetworkGatewayNatRulesClient.BeginDelete. type VirtualNetworkGatewayNatRulesClientDeleteResponse struct { // placeholder for future response values } @@ -2731,27 +2731,27 @@ type VirtualNetworkGatewayNatRulesClientGetResponse struct { VirtualNetworkGatewayNatRule } -// VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse contains the response from method VirtualNetworkGatewayNatRulesClient.ListByVirtualNetworkGateway. +// VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse contains the response from method VirtualNetworkGatewayNatRulesClient.NewListByVirtualNetworkGatewayPager. type VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse struct { ListVirtualNetworkGatewayNatRulesResult } -// VirtualNetworkGatewaysClientCreateOrUpdateResponse contains the response from method VirtualNetworkGatewaysClient.CreateOrUpdate. +// VirtualNetworkGatewaysClientCreateOrUpdateResponse contains the response from method VirtualNetworkGatewaysClient.BeginCreateOrUpdate. type VirtualNetworkGatewaysClientCreateOrUpdateResponse struct { VirtualNetworkGateway } -// VirtualNetworkGatewaysClientDeleteResponse contains the response from method VirtualNetworkGatewaysClient.Delete. +// VirtualNetworkGatewaysClientDeleteResponse contains the response from method VirtualNetworkGatewaysClient.BeginDelete. type VirtualNetworkGatewaysClientDeleteResponse struct { // placeholder for future response values } -// VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse contains the response from method VirtualNetworkGatewaysClient.DisconnectVirtualNetworkGatewayVPNConnections. +// VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse contains the response from method VirtualNetworkGatewaysClient.BeginDisconnectVirtualNetworkGatewayVPNConnections. type VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse struct { // placeholder for future response values } -// VirtualNetworkGatewaysClientGenerateVPNProfileResponse contains the response from method VirtualNetworkGatewaysClient.GenerateVPNProfile. +// VirtualNetworkGatewaysClientGenerateVPNProfileResponse contains the response from method VirtualNetworkGatewaysClient.BeginGenerateVPNProfile. type VirtualNetworkGatewaysClientGenerateVPNProfileResponse struct { Value *string } @@ -2761,7 +2761,7 @@ func (v *VirtualNetworkGatewaysClientGenerateVPNProfileResponse) UnmarshalJSON(d return json.Unmarshal(data, &v.Value) } -// VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse contains the response from method VirtualNetworkGatewaysClient.Generatevpnclientpackage. +// VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse contains the response from method VirtualNetworkGatewaysClient.BeginGeneratevpnclientpackage. type VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse struct { Value *string } @@ -2771,17 +2771,17 @@ func (v *VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse) Unmarshal return json.Unmarshal(data, &v.Value) } -// VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse contains the response from method VirtualNetworkGatewaysClient.GetAdvertisedRoutes. +// VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse contains the response from method VirtualNetworkGatewaysClient.BeginGetAdvertisedRoutes. type VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse struct { GatewayRouteListResult } -// VirtualNetworkGatewaysClientGetBgpPeerStatusResponse contains the response from method VirtualNetworkGatewaysClient.GetBgpPeerStatus. +// VirtualNetworkGatewaysClientGetBgpPeerStatusResponse contains the response from method VirtualNetworkGatewaysClient.BeginGetBgpPeerStatus. type VirtualNetworkGatewaysClientGetBgpPeerStatusResponse struct { BgpPeerStatusListResult } -// VirtualNetworkGatewaysClientGetLearnedRoutesResponse contains the response from method VirtualNetworkGatewaysClient.GetLearnedRoutes. +// VirtualNetworkGatewaysClientGetLearnedRoutesResponse contains the response from method VirtualNetworkGatewaysClient.BeginGetLearnedRoutes. type VirtualNetworkGatewaysClientGetLearnedRoutesResponse struct { GatewayRouteListResult } @@ -2791,7 +2791,7 @@ type VirtualNetworkGatewaysClientGetResponse struct { VirtualNetworkGateway } -// VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse contains the response from method VirtualNetworkGatewaysClient.GetVPNProfilePackageURL. +// VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse contains the response from method VirtualNetworkGatewaysClient.BeginGetVPNProfilePackageURL. type VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse struct { Value *string } @@ -2801,42 +2801,42 @@ func (v *VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse) UnmarshalJ return json.Unmarshal(data, &v.Value) } -// VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse contains the response from method VirtualNetworkGatewaysClient.GetVpnclientConnectionHealth. +// VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse contains the response from method VirtualNetworkGatewaysClient.BeginGetVpnclientConnectionHealth. type VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse struct { VPNClientConnectionHealthDetailListResult } -// VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse contains the response from method VirtualNetworkGatewaysClient.GetVpnclientIPSecParameters. +// VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse contains the response from method VirtualNetworkGatewaysClient.BeginGetVpnclientIPSecParameters. type VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse struct { VPNClientIPsecParameters } -// VirtualNetworkGatewaysClientListConnectionsResponse contains the response from method VirtualNetworkGatewaysClient.ListConnections. +// VirtualNetworkGatewaysClientListConnectionsResponse contains the response from method VirtualNetworkGatewaysClient.NewListConnectionsPager. type VirtualNetworkGatewaysClientListConnectionsResponse struct { VirtualNetworkGatewayListConnectionsResult } -// VirtualNetworkGatewaysClientListResponse contains the response from method VirtualNetworkGatewaysClient.List. +// VirtualNetworkGatewaysClientListResponse contains the response from method VirtualNetworkGatewaysClient.NewListPager. type VirtualNetworkGatewaysClientListResponse struct { VirtualNetworkGatewayListResult } -// VirtualNetworkGatewaysClientResetResponse contains the response from method VirtualNetworkGatewaysClient.Reset. +// VirtualNetworkGatewaysClientResetResponse contains the response from method VirtualNetworkGatewaysClient.BeginReset. type VirtualNetworkGatewaysClientResetResponse struct { VirtualNetworkGateway } -// VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse contains the response from method VirtualNetworkGatewaysClient.ResetVPNClientSharedKey. +// VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse contains the response from method VirtualNetworkGatewaysClient.BeginResetVPNClientSharedKey. type VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse struct { // placeholder for future response values } -// VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse contains the response from method VirtualNetworkGatewaysClient.SetVpnclientIPSecParameters. +// VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse contains the response from method VirtualNetworkGatewaysClient.BeginSetVpnclientIPSecParameters. type VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse struct { VPNClientIPsecParameters } -// VirtualNetworkGatewaysClientStartPacketCaptureResponse contains the response from method VirtualNetworkGatewaysClient.StartPacketCapture. +// VirtualNetworkGatewaysClientStartPacketCaptureResponse contains the response from method VirtualNetworkGatewaysClient.BeginStartPacketCapture. type VirtualNetworkGatewaysClientStartPacketCaptureResponse struct { Value *string } @@ -2846,7 +2846,7 @@ func (v *VirtualNetworkGatewaysClientStartPacketCaptureResponse) UnmarshalJSON(d return json.Unmarshal(data, &v.Value) } -// VirtualNetworkGatewaysClientStopPacketCaptureResponse contains the response from method VirtualNetworkGatewaysClient.StopPacketCapture. +// VirtualNetworkGatewaysClientStopPacketCaptureResponse contains the response from method VirtualNetworkGatewaysClient.BeginStopPacketCapture. type VirtualNetworkGatewaysClientStopPacketCaptureResponse struct { Value *string } @@ -2861,7 +2861,7 @@ type VirtualNetworkGatewaysClientSupportedVPNDevicesResponse struct { Value *string } -// VirtualNetworkGatewaysClientUpdateTagsResponse contains the response from method VirtualNetworkGatewaysClient.UpdateTags. +// VirtualNetworkGatewaysClientUpdateTagsResponse contains the response from method VirtualNetworkGatewaysClient.BeginUpdateTags. type VirtualNetworkGatewaysClientUpdateTagsResponse struct { VirtualNetworkGateway } @@ -2871,12 +2871,12 @@ type VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResponse struct { Value *string } -// VirtualNetworkPeeringsClientCreateOrUpdateResponse contains the response from method VirtualNetworkPeeringsClient.CreateOrUpdate. +// VirtualNetworkPeeringsClientCreateOrUpdateResponse contains the response from method VirtualNetworkPeeringsClient.BeginCreateOrUpdate. type VirtualNetworkPeeringsClientCreateOrUpdateResponse struct { VirtualNetworkPeering } -// VirtualNetworkPeeringsClientDeleteResponse contains the response from method VirtualNetworkPeeringsClient.Delete. +// VirtualNetworkPeeringsClientDeleteResponse contains the response from method VirtualNetworkPeeringsClient.BeginDelete. type VirtualNetworkPeeringsClientDeleteResponse struct { // placeholder for future response values } @@ -2886,17 +2886,17 @@ type VirtualNetworkPeeringsClientGetResponse struct { VirtualNetworkPeering } -// VirtualNetworkPeeringsClientListResponse contains the response from method VirtualNetworkPeeringsClient.List. +// VirtualNetworkPeeringsClientListResponse contains the response from method VirtualNetworkPeeringsClient.NewListPager. type VirtualNetworkPeeringsClientListResponse struct { VirtualNetworkPeeringListResult } -// VirtualNetworkTapsClientCreateOrUpdateResponse contains the response from method VirtualNetworkTapsClient.CreateOrUpdate. +// VirtualNetworkTapsClientCreateOrUpdateResponse contains the response from method VirtualNetworkTapsClient.BeginCreateOrUpdate. type VirtualNetworkTapsClientCreateOrUpdateResponse struct { VirtualNetworkTap } -// VirtualNetworkTapsClientDeleteResponse contains the response from method VirtualNetworkTapsClient.Delete. +// VirtualNetworkTapsClientDeleteResponse contains the response from method VirtualNetworkTapsClient.BeginDelete. type VirtualNetworkTapsClientDeleteResponse struct { // placeholder for future response values } @@ -2906,12 +2906,12 @@ type VirtualNetworkTapsClientGetResponse struct { VirtualNetworkTap } -// VirtualNetworkTapsClientListAllResponse contains the response from method VirtualNetworkTapsClient.ListAll. +// VirtualNetworkTapsClientListAllResponse contains the response from method VirtualNetworkTapsClient.NewListAllPager. type VirtualNetworkTapsClientListAllResponse struct { VirtualNetworkTapListResult } -// VirtualNetworkTapsClientListByResourceGroupResponse contains the response from method VirtualNetworkTapsClient.ListByResourceGroup. +// VirtualNetworkTapsClientListByResourceGroupResponse contains the response from method VirtualNetworkTapsClient.NewListByResourceGroupPager. type VirtualNetworkTapsClientListByResourceGroupResponse struct { VirtualNetworkTapListResult } @@ -2926,12 +2926,12 @@ type VirtualNetworksClientCheckIPAddressAvailabilityResponse struct { IPAddressAvailabilityResult } -// VirtualNetworksClientCreateOrUpdateResponse contains the response from method VirtualNetworksClient.CreateOrUpdate. +// VirtualNetworksClientCreateOrUpdateResponse contains the response from method VirtualNetworksClient.BeginCreateOrUpdate. type VirtualNetworksClientCreateOrUpdateResponse struct { VirtualNetwork } -// VirtualNetworksClientDeleteResponse contains the response from method VirtualNetworksClient.Delete. +// VirtualNetworksClientDeleteResponse contains the response from method VirtualNetworksClient.BeginDelete. type VirtualNetworksClientDeleteResponse struct { // placeholder for future response values } @@ -2941,22 +2941,22 @@ type VirtualNetworksClientGetResponse struct { VirtualNetwork } -// VirtualNetworksClientListAllResponse contains the response from method VirtualNetworksClient.ListAll. +// VirtualNetworksClientListAllResponse contains the response from method VirtualNetworksClient.NewListAllPager. type VirtualNetworksClientListAllResponse struct { VirtualNetworkListResult } -// VirtualNetworksClientListDdosProtectionStatusResponse contains the response from method VirtualNetworksClient.ListDdosProtectionStatus. +// VirtualNetworksClientListDdosProtectionStatusResponse contains the response from method VirtualNetworksClient.BeginListDdosProtectionStatus. type VirtualNetworksClientListDdosProtectionStatusResponse struct { VirtualNetworkDdosProtectionStatusResult } -// VirtualNetworksClientListResponse contains the response from method VirtualNetworksClient.List. +// VirtualNetworksClientListResponse contains the response from method VirtualNetworksClient.NewListPager. type VirtualNetworksClientListResponse struct { VirtualNetworkListResult } -// VirtualNetworksClientListUsageResponse contains the response from method VirtualNetworksClient.ListUsage. +// VirtualNetworksClientListUsageResponse contains the response from method VirtualNetworksClient.NewListUsagePager. type VirtualNetworksClientListUsageResponse struct { VirtualNetworkListUsageResult } @@ -2966,12 +2966,12 @@ type VirtualNetworksClientUpdateTagsResponse struct { VirtualNetwork } -// VirtualRouterPeeringsClientCreateOrUpdateResponse contains the response from method VirtualRouterPeeringsClient.CreateOrUpdate. +// VirtualRouterPeeringsClientCreateOrUpdateResponse contains the response from method VirtualRouterPeeringsClient.BeginCreateOrUpdate. type VirtualRouterPeeringsClientCreateOrUpdateResponse struct { VirtualRouterPeering } -// VirtualRouterPeeringsClientDeleteResponse contains the response from method VirtualRouterPeeringsClient.Delete. +// VirtualRouterPeeringsClientDeleteResponse contains the response from method VirtualRouterPeeringsClient.BeginDelete. type VirtualRouterPeeringsClientDeleteResponse struct { // placeholder for future response values } @@ -2981,17 +2981,17 @@ type VirtualRouterPeeringsClientGetResponse struct { VirtualRouterPeering } -// VirtualRouterPeeringsClientListResponse contains the response from method VirtualRouterPeeringsClient.List. +// VirtualRouterPeeringsClientListResponse contains the response from method VirtualRouterPeeringsClient.NewListPager. type VirtualRouterPeeringsClientListResponse struct { VirtualRouterPeeringListResult } -// VirtualRoutersClientCreateOrUpdateResponse contains the response from method VirtualRoutersClient.CreateOrUpdate. +// VirtualRoutersClientCreateOrUpdateResponse contains the response from method VirtualRoutersClient.BeginCreateOrUpdate. type VirtualRoutersClientCreateOrUpdateResponse struct { VirtualRouter } -// VirtualRoutersClientDeleteResponse contains the response from method VirtualRoutersClient.Delete. +// VirtualRoutersClientDeleteResponse contains the response from method VirtualRoutersClient.BeginDelete. type VirtualRoutersClientDeleteResponse struct { // placeholder for future response values } @@ -3001,22 +3001,22 @@ type VirtualRoutersClientGetResponse struct { VirtualRouter } -// VirtualRoutersClientListByResourceGroupResponse contains the response from method VirtualRoutersClient.ListByResourceGroup. +// VirtualRoutersClientListByResourceGroupResponse contains the response from method VirtualRoutersClient.NewListByResourceGroupPager. type VirtualRoutersClientListByResourceGroupResponse struct { VirtualRouterListResult } -// VirtualRoutersClientListResponse contains the response from method VirtualRoutersClient.List. +// VirtualRoutersClientListResponse contains the response from method VirtualRoutersClient.NewListPager. type VirtualRoutersClientListResponse struct { VirtualRouterListResult } -// VirtualWansClientCreateOrUpdateResponse contains the response from method VirtualWansClient.CreateOrUpdate. +// VirtualWansClientCreateOrUpdateResponse contains the response from method VirtualWansClient.BeginCreateOrUpdate. type VirtualWansClientCreateOrUpdateResponse struct { VirtualWAN } -// VirtualWansClientDeleteResponse contains the response from method VirtualWansClient.Delete. +// VirtualWansClientDeleteResponse contains the response from method VirtualWansClient.BeginDelete. type VirtualWansClientDeleteResponse struct { // placeholder for future response values } @@ -3026,12 +3026,12 @@ type VirtualWansClientGetResponse struct { VirtualWAN } -// VirtualWansClientListByResourceGroupResponse contains the response from method VirtualWansClient.ListByResourceGroup. +// VirtualWansClientListByResourceGroupResponse contains the response from method VirtualWansClient.NewListByResourceGroupPager. type VirtualWansClientListByResourceGroupResponse struct { ListVirtualWANsResult } -// VirtualWansClientListResponse contains the response from method VirtualWansClient.List. +// VirtualWansClientListResponse contains the response from method VirtualWansClient.NewListPager. type VirtualWansClientListResponse struct { ListVirtualWANsResult } @@ -3041,7 +3041,7 @@ type VirtualWansClientUpdateTagsResponse struct { VirtualWAN } -// WatchersClientCheckConnectivityResponse contains the response from method WatchersClient.CheckConnectivity. +// WatchersClientCheckConnectivityResponse contains the response from method WatchersClient.BeginCheckConnectivity. type WatchersClientCheckConnectivityResponse struct { ConnectivityInformation } @@ -3051,27 +3051,27 @@ type WatchersClientCreateOrUpdateResponse struct { Watcher } -// WatchersClientDeleteResponse contains the response from method WatchersClient.Delete. +// WatchersClientDeleteResponse contains the response from method WatchersClient.BeginDelete. type WatchersClientDeleteResponse struct { // placeholder for future response values } -// WatchersClientGetAzureReachabilityReportResponse contains the response from method WatchersClient.GetAzureReachabilityReport. +// WatchersClientGetAzureReachabilityReportResponse contains the response from method WatchersClient.BeginGetAzureReachabilityReport. type WatchersClientGetAzureReachabilityReportResponse struct { AzureReachabilityReport } -// WatchersClientGetFlowLogStatusResponse contains the response from method WatchersClient.GetFlowLogStatus. +// WatchersClientGetFlowLogStatusResponse contains the response from method WatchersClient.BeginGetFlowLogStatus. type WatchersClientGetFlowLogStatusResponse struct { FlowLogInformation } -// WatchersClientGetNetworkConfigurationDiagnosticResponse contains the response from method WatchersClient.GetNetworkConfigurationDiagnostic. +// WatchersClientGetNetworkConfigurationDiagnosticResponse contains the response from method WatchersClient.BeginGetNetworkConfigurationDiagnostic. type WatchersClientGetNetworkConfigurationDiagnosticResponse struct { ConfigurationDiagnosticResponse } -// WatchersClientGetNextHopResponse contains the response from method WatchersClient.GetNextHop. +// WatchersClientGetNextHopResponse contains the response from method WatchersClient.BeginGetNextHop. type WatchersClientGetNextHopResponse struct { NextHopResult } @@ -3086,37 +3086,37 @@ type WatchersClientGetTopologyResponse struct { Topology } -// WatchersClientGetTroubleshootingResponse contains the response from method WatchersClient.GetTroubleshooting. +// WatchersClientGetTroubleshootingResponse contains the response from method WatchersClient.BeginGetTroubleshooting. type WatchersClientGetTroubleshootingResponse struct { TroubleshootingResult } -// WatchersClientGetTroubleshootingResultResponse contains the response from method WatchersClient.GetTroubleshootingResult. +// WatchersClientGetTroubleshootingResultResponse contains the response from method WatchersClient.BeginGetTroubleshootingResult. type WatchersClientGetTroubleshootingResultResponse struct { TroubleshootingResult } -// WatchersClientGetVMSecurityRulesResponse contains the response from method WatchersClient.GetVMSecurityRules. +// WatchersClientGetVMSecurityRulesResponse contains the response from method WatchersClient.BeginGetVMSecurityRules. type WatchersClientGetVMSecurityRulesResponse struct { SecurityGroupViewResult } -// WatchersClientListAllResponse contains the response from method WatchersClient.ListAll. +// WatchersClientListAllResponse contains the response from method WatchersClient.NewListAllPager. type WatchersClientListAllResponse struct { WatcherListResult } -// WatchersClientListAvailableProvidersResponse contains the response from method WatchersClient.ListAvailableProviders. +// WatchersClientListAvailableProvidersResponse contains the response from method WatchersClient.BeginListAvailableProviders. type WatchersClientListAvailableProvidersResponse struct { AvailableProvidersList } -// WatchersClientListResponse contains the response from method WatchersClient.List. +// WatchersClientListResponse contains the response from method WatchersClient.NewListPager. type WatchersClientListResponse struct { WatcherListResult } -// WatchersClientSetFlowLogConfigurationResponse contains the response from method WatchersClient.SetFlowLogConfiguration. +// WatchersClientSetFlowLogConfigurationResponse contains the response from method WatchersClient.BeginSetFlowLogConfiguration. type WatchersClientSetFlowLogConfigurationResponse struct { FlowLogInformation } @@ -3126,7 +3126,7 @@ type WatchersClientUpdateTagsResponse struct { Watcher } -// WatchersClientVerifyIPFlowResponse contains the response from method WatchersClient.VerifyIPFlow. +// WatchersClientVerifyIPFlowResponse contains the response from method WatchersClient.BeginVerifyIPFlow. type WatchersClientVerifyIPFlowResponse struct { VerificationIPFlowResult } @@ -3136,7 +3136,7 @@ type WebApplicationFirewallPoliciesClientCreateOrUpdateResponse struct { WebApplicationFirewallPolicy } -// WebApplicationFirewallPoliciesClientDeleteResponse contains the response from method WebApplicationFirewallPoliciesClient.Delete. +// WebApplicationFirewallPoliciesClientDeleteResponse contains the response from method WebApplicationFirewallPoliciesClient.BeginDelete. type WebApplicationFirewallPoliciesClientDeleteResponse struct { // placeholder for future response values } @@ -3146,12 +3146,12 @@ type WebApplicationFirewallPoliciesClientGetResponse struct { WebApplicationFirewallPolicy } -// WebApplicationFirewallPoliciesClientListAllResponse contains the response from method WebApplicationFirewallPoliciesClient.ListAll. +// WebApplicationFirewallPoliciesClientListAllResponse contains the response from method WebApplicationFirewallPoliciesClient.NewListAllPager. type WebApplicationFirewallPoliciesClientListAllResponse struct { WebApplicationFirewallPolicyListResult } -// WebApplicationFirewallPoliciesClientListResponse contains the response from method WebApplicationFirewallPoliciesClient.List. +// WebApplicationFirewallPoliciesClientListResponse contains the response from method WebApplicationFirewallPoliciesClient.NewListPager. type WebApplicationFirewallPoliciesClientListResponse struct { WebApplicationFirewallPolicyListResult } @@ -3161,7 +3161,7 @@ type WebCategoriesClientGetResponse struct { AzureWebCategory } -// WebCategoriesClientListBySubscriptionResponse contains the response from method WebCategoriesClient.ListBySubscription. +// WebCategoriesClientListBySubscriptionResponse contains the response from method WebCategoriesClient.NewListBySubscriptionPager. type WebCategoriesClientListBySubscriptionResponse struct { AzureWebCategoryListResult } diff --git a/sdk/resourcemanager/network/armnetwork/routefilterrules_client.go b/sdk/resourcemanager/network/armnetwork/routefilterrules_client.go index 96e3c47c0b90..21973ee895cc 100644 --- a/sdk/resourcemanager/network/armnetwork/routefilterrules_client.go +++ b/sdk/resourcemanager/network/armnetwork/routefilterrules_client.go @@ -32,10 +32,10 @@ type RouteFilterRulesClient struct { } // NewRouteFilterRulesClient creates a new instance of RouteFilterRulesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewRouteFilterRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RouteFilterRulesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewRouteFilterRulesClient(subscriptionID string, credential azcore.TokenCre // BeginCreateOrUpdate - Creates or updates a route in the specified route filter. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// routeFilterName - The name of the route filter. -// ruleName - The name of the route filter rule. -// routeFilterRuleParameters - Parameters supplied to the create or update route filter rule operation. -// options - RouteFilterRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteFilterRulesClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - routeFilterName - The name of the route filter. +// - ruleName - The name of the route filter rule. +// - routeFilterRuleParameters - Parameters supplied to the create or update route filter rule operation. +// - options - RouteFilterRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteFilterRulesClient.BeginCreateOrUpdate +// method. func (client *RouteFilterRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters RouteFilterRule, options *RouteFilterRulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[RouteFilterRulesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, routeFilterName, ruleName, routeFilterRuleParameters, options) @@ -81,6 +82,7 @@ func (client *RouteFilterRulesClient) BeginCreateOrUpdate(ctx context.Context, r // CreateOrUpdate - Creates or updates a route in the specified route filter. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *RouteFilterRulesClient) createOrUpdate(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters RouteFilterRule, options *RouteFilterRulesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, routeFilterName, ruleName, routeFilterRuleParameters, options) @@ -129,12 +131,13 @@ func (client *RouteFilterRulesClient) createOrUpdateCreateRequest(ctx context.Co // BeginDelete - Deletes the specified rule from a route filter. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// routeFilterName - The name of the route filter. -// ruleName - The name of the rule. -// options - RouteFilterRulesClientBeginDeleteOptions contains the optional parameters for the RouteFilterRulesClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - routeFilterName - The name of the route filter. +// - ruleName - The name of the rule. +// - options - RouteFilterRulesClientBeginDeleteOptions contains the optional parameters for the RouteFilterRulesClient.BeginDelete +// method. func (client *RouteFilterRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, options *RouteFilterRulesClientBeginDeleteOptions) (*runtime.Poller[RouteFilterRulesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, routeFilterName, ruleName, options) @@ -151,6 +154,7 @@ func (client *RouteFilterRulesClient) BeginDelete(ctx context.Context, resourceG // Delete - Deletes the specified rule from a route filter. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *RouteFilterRulesClient) deleteOperation(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, options *RouteFilterRulesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, routeFilterName, ruleName, options) @@ -199,11 +203,12 @@ func (client *RouteFilterRulesClient) deleteCreateRequest(ctx context.Context, r // Get - Gets the specified rule from a route filter. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// routeFilterName - The name of the route filter. -// ruleName - The name of the rule. -// options - RouteFilterRulesClientGetOptions contains the optional parameters for the RouteFilterRulesClient.Get method. +// - resourceGroupName - The name of the resource group. +// - routeFilterName - The name of the route filter. +// - ruleName - The name of the rule. +// - options - RouteFilterRulesClientGetOptions contains the optional parameters for the RouteFilterRulesClient.Get method. func (client *RouteFilterRulesClient) Get(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, options *RouteFilterRulesClientGetOptions) (RouteFilterRulesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, routeFilterName, ruleName, options) if err != nil { @@ -259,11 +264,12 @@ func (client *RouteFilterRulesClient) getHandleResponse(resp *http.Response) (Ro } // NewListByRouteFilterPager - Gets all RouteFilterRules in a route filter. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// routeFilterName - The name of the route filter. -// options - RouteFilterRulesClientListByRouteFilterOptions contains the optional parameters for the RouteFilterRulesClient.ListByRouteFilter -// method. +// - resourceGroupName - The name of the resource group. +// - routeFilterName - The name of the route filter. +// - options - RouteFilterRulesClientListByRouteFilterOptions contains the optional parameters for the RouteFilterRulesClient.NewListByRouteFilterPager +// method. func (client *RouteFilterRulesClient) NewListByRouteFilterPager(resourceGroupName string, routeFilterName string, options *RouteFilterRulesClientListByRouteFilterOptions) *runtime.Pager[RouteFilterRulesClientListByRouteFilterResponse] { return runtime.NewPager(runtime.PagingHandler[RouteFilterRulesClientListByRouteFilterResponse]{ More: func(page RouteFilterRulesClientListByRouteFilterResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/routefilterrules_client_example_test.go b/sdk/resourcemanager/network/armnetwork/routefilterrules_client_example_test.go deleted file mode 100644 index 4ef93c6b0b34..000000000000 --- a/sdk/resourcemanager/network/armnetwork/routefilterrules_client_example_test.go +++ /dev/null @@ -1,113 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/RouteFilterRuleDelete.json -func ExampleRouteFilterRulesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewRouteFilterRulesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "filterName", "ruleName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/RouteFilterRuleGet.json -func ExampleRouteFilterRulesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewRouteFilterRulesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "filterName", "filterName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/RouteFilterRuleCreate.json -func ExampleRouteFilterRulesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewRouteFilterRulesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "filterName", "ruleName", armnetwork.RouteFilterRule{ - Properties: &armnetwork.RouteFilterRulePropertiesFormat{ - Access: to.Ptr(armnetwork.AccessAllow), - Communities: []*string{ - to.Ptr("12076:5030"), - to.Ptr("12076:5040")}, - RouteFilterRuleType: to.Ptr(armnetwork.RouteFilterRuleTypeCommunity), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/RouteFilterRuleListByRouteFilter.json -func ExampleRouteFilterRulesClient_NewListByRouteFilterPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewRouteFilterRulesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByRouteFilterPager("rg1", "filterName", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/routefilters_client.go b/sdk/resourcemanager/network/armnetwork/routefilters_client.go index 10404cf59d6e..aa5d2c71cc12 100644 --- a/sdk/resourcemanager/network/armnetwork/routefilters_client.go +++ b/sdk/resourcemanager/network/armnetwork/routefilters_client.go @@ -32,10 +32,10 @@ type RouteFiltersClient struct { } // NewRouteFiltersClient creates a new instance of RouteFiltersClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewRouteFiltersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RouteFiltersClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewRouteFiltersClient(subscriptionID string, credential azcore.TokenCredent // BeginCreateOrUpdate - Creates or updates a route filter in a specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// routeFilterName - The name of the route filter. -// routeFilterParameters - Parameters supplied to the create or update route filter operation. -// options - RouteFiltersClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteFiltersClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - routeFilterName - The name of the route filter. +// - routeFilterParameters - Parameters supplied to the create or update route filter operation. +// - options - RouteFiltersClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteFiltersClient.BeginCreateOrUpdate +// method. func (client *RouteFiltersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters RouteFilter, options *RouteFiltersClientBeginCreateOrUpdateOptions) (*runtime.Poller[RouteFiltersClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, routeFilterName, routeFilterParameters, options) @@ -80,6 +81,7 @@ func (client *RouteFiltersClient) BeginCreateOrUpdate(ctx context.Context, resou // CreateOrUpdate - Creates or updates a route filter in a specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *RouteFiltersClient) createOrUpdate(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters RouteFilter, options *RouteFiltersClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, routeFilterName, routeFilterParameters, options) @@ -124,11 +126,12 @@ func (client *RouteFiltersClient) createOrUpdateCreateRequest(ctx context.Contex // BeginDelete - Deletes the specified route filter. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// routeFilterName - The name of the route filter. -// options - RouteFiltersClientBeginDeleteOptions contains the optional parameters for the RouteFiltersClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - routeFilterName - The name of the route filter. +// - options - RouteFiltersClientBeginDeleteOptions contains the optional parameters for the RouteFiltersClient.BeginDelete +// method. func (client *RouteFiltersClient) BeginDelete(ctx context.Context, resourceGroupName string, routeFilterName string, options *RouteFiltersClientBeginDeleteOptions) (*runtime.Poller[RouteFiltersClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, routeFilterName, options) @@ -145,6 +148,7 @@ func (client *RouteFiltersClient) BeginDelete(ctx context.Context, resourceGroup // Delete - Deletes the specified route filter. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *RouteFiltersClient) deleteOperation(ctx context.Context, resourceGroupName string, routeFilterName string, options *RouteFiltersClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, routeFilterName, options) @@ -189,10 +193,11 @@ func (client *RouteFiltersClient) deleteCreateRequest(ctx context.Context, resou // Get - Gets the specified route filter. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// routeFilterName - The name of the route filter. -// options - RouteFiltersClientGetOptions contains the optional parameters for the RouteFiltersClient.Get method. +// - resourceGroupName - The name of the resource group. +// - routeFilterName - The name of the route filter. +// - options - RouteFiltersClientGetOptions contains the optional parameters for the RouteFiltersClient.Get method. func (client *RouteFiltersClient) Get(ctx context.Context, resourceGroupName string, routeFilterName string, options *RouteFiltersClientGetOptions) (RouteFiltersClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, routeFilterName, options) if err != nil { @@ -247,8 +252,9 @@ func (client *RouteFiltersClient) getHandleResponse(resp *http.Response) (RouteF } // NewListPager - Gets all route filters in a subscription. +// // Generated from API version 2022-07-01 -// options - RouteFiltersClientListOptions contains the optional parameters for the RouteFiltersClient.List method. +// - options - RouteFiltersClientListOptions contains the optional parameters for the RouteFiltersClient.NewListPager method. func (client *RouteFiltersClient) NewListPager(options *RouteFiltersClientListOptions) *runtime.Pager[RouteFiltersClientListResponse] { return runtime.NewPager(runtime.PagingHandler[RouteFiltersClientListResponse]{ More: func(page RouteFiltersClientListResponse) bool { @@ -305,10 +311,11 @@ func (client *RouteFiltersClient) listHandleResponse(resp *http.Response) (Route } // NewListByResourceGroupPager - Gets all route filters in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - RouteFiltersClientListByResourceGroupOptions contains the optional parameters for the RouteFiltersClient.ListByResourceGroup -// method. +// - resourceGroupName - The name of the resource group. +// - options - RouteFiltersClientListByResourceGroupOptions contains the optional parameters for the RouteFiltersClient.NewListByResourceGroupPager +// method. func (client *RouteFiltersClient) NewListByResourceGroupPager(resourceGroupName string, options *RouteFiltersClientListByResourceGroupOptions) *runtime.Pager[RouteFiltersClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[RouteFiltersClientListByResourceGroupResponse]{ More: func(page RouteFiltersClientListByResourceGroupResponse) bool { @@ -370,11 +377,12 @@ func (client *RouteFiltersClient) listByResourceGroupHandleResponse(resp *http.R // UpdateTags - Updates tags of a route filter. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// routeFilterName - The name of the route filter. -// parameters - Parameters supplied to update route filter tags. -// options - RouteFiltersClientUpdateTagsOptions contains the optional parameters for the RouteFiltersClient.UpdateTags method. +// - resourceGroupName - The name of the resource group. +// - routeFilterName - The name of the route filter. +// - parameters - Parameters supplied to update route filter tags. +// - options - RouteFiltersClientUpdateTagsOptions contains the optional parameters for the RouteFiltersClient.UpdateTags method. func (client *RouteFiltersClient) UpdateTags(ctx context.Context, resourceGroupName string, routeFilterName string, parameters TagsObject, options *RouteFiltersClientUpdateTagsOptions) (RouteFiltersClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, routeFilterName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/routefilters_client_example_test.go b/sdk/resourcemanager/network/armnetwork/routefilters_client_example_test.go deleted file mode 100644 index 827542c6fb3a..000000000000 --- a/sdk/resourcemanager/network/armnetwork/routefilters_client_example_test.go +++ /dev/null @@ -1,170 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/RouteFilterDelete.json -func ExampleRouteFiltersClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewRouteFiltersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "filterName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/RouteFilterGet.json -func ExampleRouteFiltersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewRouteFiltersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "filterName", &armnetwork.RouteFiltersClientGetOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/RouteFilterCreate.json -func ExampleRouteFiltersClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewRouteFiltersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "filterName", armnetwork.RouteFilter{ - Location: to.Ptr("West US"), - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - }, - Properties: &armnetwork.RouteFilterPropertiesFormat{ - Rules: []*armnetwork.RouteFilterRule{ - { - Name: to.Ptr("ruleName"), - Properties: &armnetwork.RouteFilterRulePropertiesFormat{ - Access: to.Ptr(armnetwork.AccessAllow), - Communities: []*string{ - to.Ptr("12076:5030"), - to.Ptr("12076:5040")}, - RouteFilterRuleType: to.Ptr(armnetwork.RouteFilterRuleTypeCommunity), - }, - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/RouteFilterUpdateTags.json -func ExampleRouteFiltersClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewRouteFiltersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, "rg1", "filterName", armnetwork.TagsObject{ - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/RouteFilterListByResourceGroup.json -func ExampleRouteFiltersClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewRouteFiltersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/RouteFilterList.json -func ExampleRouteFiltersClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewRouteFiltersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/routemaps_client.go b/sdk/resourcemanager/network/armnetwork/routemaps_client.go index 3d7257f664a1..77171d46fbdf 100644 --- a/sdk/resourcemanager/network/armnetwork/routemaps_client.go +++ b/sdk/resourcemanager/network/armnetwork/routemaps_client.go @@ -32,10 +32,10 @@ type RouteMapsClient struct { } // NewRouteMapsClient creates a new instance of RouteMapsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewRouteMapsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RouteMapsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewRouteMapsClient(subscriptionID string, credential azcore.TokenCredential // BeginCreateOrUpdate - Creates a RouteMap if it doesn't exist else updates the existing one. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the RouteMap's resource group. -// virtualHubName - The name of the VirtualHub containing the RouteMap. -// routeMapName - The name of the RouteMap. -// routeMapParameters - Parameters supplied to create or update a RouteMap. -// options - RouteMapsClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteMapsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The resource group name of the RouteMap's resource group. +// - virtualHubName - The name of the VirtualHub containing the RouteMap. +// - routeMapName - The name of the RouteMap. +// - routeMapParameters - Parameters supplied to create or update a RouteMap. +// - options - RouteMapsClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteMapsClient.BeginCreateOrUpdate +// method. func (client *RouteMapsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routeMapName string, routeMapParameters RouteMap, options *RouteMapsClientBeginCreateOrUpdateOptions) (*runtime.Poller[RouteMapsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, routeMapName, routeMapParameters, options) @@ -81,6 +82,7 @@ func (client *RouteMapsClient) BeginCreateOrUpdate(ctx context.Context, resource // CreateOrUpdate - Creates a RouteMap if it doesn't exist else updates the existing one. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *RouteMapsClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routeMapName string, routeMapParameters RouteMap, options *RouteMapsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualHubName, routeMapName, routeMapParameters, options) @@ -129,11 +131,12 @@ func (client *RouteMapsClient) createOrUpdateCreateRequest(ctx context.Context, // BeginDelete - Deletes a RouteMap. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the RouteMap's resource group. -// virtualHubName - The name of the VirtualHub containing the RouteMap. -// routeMapName - The name of the RouteMap. -// options - RouteMapsClientBeginDeleteOptions contains the optional parameters for the RouteMapsClient.BeginDelete method. +// - resourceGroupName - The resource group name of the RouteMap's resource group. +// - virtualHubName - The name of the VirtualHub containing the RouteMap. +// - routeMapName - The name of the RouteMap. +// - options - RouteMapsClientBeginDeleteOptions contains the optional parameters for the RouteMapsClient.BeginDelete method. func (client *RouteMapsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, routeMapName string, options *RouteMapsClientBeginDeleteOptions) (*runtime.Poller[RouteMapsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, routeMapName, options) @@ -150,6 +153,7 @@ func (client *RouteMapsClient) BeginDelete(ctx context.Context, resourceGroupNam // Delete - Deletes a RouteMap. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *RouteMapsClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualHubName string, routeMapName string, options *RouteMapsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualHubName, routeMapName, options) @@ -198,11 +202,12 @@ func (client *RouteMapsClient) deleteCreateRequest(ctx context.Context, resource // Get - Retrieves the details of a RouteMap. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the RouteMap's resource group. -// virtualHubName - The name of the VirtualHub containing the RouteMap. -// routeMapName - The name of the RouteMap. -// options - RouteMapsClientGetOptions contains the optional parameters for the RouteMapsClient.Get method. +// - resourceGroupName - The resource group name of the RouteMap's resource group. +// - virtualHubName - The name of the VirtualHub containing the RouteMap. +// - routeMapName - The name of the RouteMap. +// - options - RouteMapsClientGetOptions contains the optional parameters for the RouteMapsClient.Get method. func (client *RouteMapsClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, routeMapName string, options *RouteMapsClientGetOptions) (RouteMapsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, virtualHubName, routeMapName, options) if err != nil { @@ -258,10 +263,11 @@ func (client *RouteMapsClient) getHandleResponse(resp *http.Response) (RouteMaps } // NewListPager - Retrieves the details of all RouteMaps. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the RouteMap's resource group'. -// virtualHubName - The name of the VirtualHub containing the RouteMap. -// options - RouteMapsClientListOptions contains the optional parameters for the RouteMapsClient.List method. +// - resourceGroupName - The resource group name of the RouteMap's resource group'. +// - virtualHubName - The name of the VirtualHub containing the RouteMap. +// - options - RouteMapsClientListOptions contains the optional parameters for the RouteMapsClient.NewListPager method. func (client *RouteMapsClient) NewListPager(resourceGroupName string, virtualHubName string, options *RouteMapsClientListOptions) *runtime.Pager[RouteMapsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[RouteMapsClientListResponse]{ More: func(page RouteMapsClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/routemaps_client_example_test.go b/sdk/resourcemanager/network/armnetwork/routemaps_client_example_test.go deleted file mode 100644 index 1c58db7a5017..000000000000 --- a/sdk/resourcemanager/network/armnetwork/routemaps_client_example_test.go +++ /dev/null @@ -1,135 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/RouteMapGet.json -func ExampleRouteMapsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewRouteMapsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "virtualHub1", "routeMap1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/RouteMapPut.json -func ExampleRouteMapsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewRouteMapsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "virtualHub1", "routeMap1", armnetwork.RouteMap{ - Properties: &armnetwork.RouteMapProperties{ - AssociatedInboundConnections: []*string{ - to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteGateways/exrGateway1/expressRouteConnections/exrConn1")}, - AssociatedOutboundConnections: []*string{}, - Rules: []*armnetwork.RouteMapRule{ - { - Name: to.Ptr("rule1"), - Actions: []*armnetwork.Action{ - { - Type: to.Ptr(armnetwork.RouteMapActionTypeAdd), - Parameters: []*armnetwork.Parameter{ - { - AsPath: []*string{ - to.Ptr("22334")}, - Community: []*string{}, - RoutePrefix: []*string{}, - }}, - }}, - MatchCriteria: []*armnetwork.Criterion{ - { - AsPath: []*string{}, - Community: []*string{}, - MatchCondition: to.Ptr(armnetwork.RouteMapMatchConditionContains), - RoutePrefix: []*string{ - to.Ptr("10.0.0.0/8")}, - }}, - NextStepIfMatched: to.Ptr(armnetwork.NextStepContinue), - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/RouteMapDelete.json -func ExampleRouteMapsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewRouteMapsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "virtualHub1", "routeMap1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/RouteMapList.json -func ExampleRouteMapsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewRouteMapsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", "virtualHub1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/routes_client.go b/sdk/resourcemanager/network/armnetwork/routes_client.go index 1fcc28f9d9ad..811c6f75900b 100644 --- a/sdk/resourcemanager/network/armnetwork/routes_client.go +++ b/sdk/resourcemanager/network/armnetwork/routes_client.go @@ -32,10 +32,10 @@ type RoutesClient struct { } // NewRoutesClient creates a new instance of RoutesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewRoutesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RoutesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewRoutesClient(subscriptionID string, credential azcore.TokenCredential, o // BeginCreateOrUpdate - Creates or updates a route in the specified route table. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// routeTableName - The name of the route table. -// routeName - The name of the route. -// routeParameters - Parameters supplied to the create or update route operation. -// options - RoutesClientBeginCreateOrUpdateOptions contains the optional parameters for the RoutesClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - routeTableName - The name of the route table. +// - routeName - The name of the route. +// - routeParameters - Parameters supplied to the create or update route operation. +// - options - RoutesClientBeginCreateOrUpdateOptions contains the optional parameters for the RoutesClient.BeginCreateOrUpdate +// method. func (client *RoutesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, routeParameters Route, options *RoutesClientBeginCreateOrUpdateOptions) (*runtime.Poller[RoutesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, routeTableName, routeName, routeParameters, options) @@ -81,6 +82,7 @@ func (client *RoutesClient) BeginCreateOrUpdate(ctx context.Context, resourceGro // CreateOrUpdate - Creates or updates a route in the specified route table. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *RoutesClient) createOrUpdate(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, routeParameters Route, options *RoutesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, routeTableName, routeName, routeParameters, options) @@ -129,11 +131,12 @@ func (client *RoutesClient) createOrUpdateCreateRequest(ctx context.Context, res // BeginDelete - Deletes the specified route from a route table. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// routeTableName - The name of the route table. -// routeName - The name of the route. -// options - RoutesClientBeginDeleteOptions contains the optional parameters for the RoutesClient.BeginDelete method. +// - resourceGroupName - The name of the resource group. +// - routeTableName - The name of the route table. +// - routeName - The name of the route. +// - options - RoutesClientBeginDeleteOptions contains the optional parameters for the RoutesClient.BeginDelete method. func (client *RoutesClient) BeginDelete(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, options *RoutesClientBeginDeleteOptions) (*runtime.Poller[RoutesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, routeTableName, routeName, options) @@ -150,6 +153,7 @@ func (client *RoutesClient) BeginDelete(ctx context.Context, resourceGroupName s // Delete - Deletes the specified route from a route table. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *RoutesClient) deleteOperation(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, options *RoutesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, routeTableName, routeName, options) @@ -198,11 +202,12 @@ func (client *RoutesClient) deleteCreateRequest(ctx context.Context, resourceGro // Get - Gets the specified route from a route table. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// routeTableName - The name of the route table. -// routeName - The name of the route. -// options - RoutesClientGetOptions contains the optional parameters for the RoutesClient.Get method. +// - resourceGroupName - The name of the resource group. +// - routeTableName - The name of the route table. +// - routeName - The name of the route. +// - options - RoutesClientGetOptions contains the optional parameters for the RoutesClient.Get method. func (client *RoutesClient) Get(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, options *RoutesClientGetOptions) (RoutesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, routeTableName, routeName, options) if err != nil { @@ -258,10 +263,11 @@ func (client *RoutesClient) getHandleResponse(resp *http.Response) (RoutesClient } // NewListPager - Gets all routes in a route table. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// routeTableName - The name of the route table. -// options - RoutesClientListOptions contains the optional parameters for the RoutesClient.List method. +// - resourceGroupName - The name of the resource group. +// - routeTableName - The name of the route table. +// - options - RoutesClientListOptions contains the optional parameters for the RoutesClient.NewListPager method. func (client *RoutesClient) NewListPager(resourceGroupName string, routeTableName string, options *RoutesClientListOptions) *runtime.Pager[RoutesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[RoutesClientListResponse]{ More: func(page RoutesClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/routes_client_example_test.go b/sdk/resourcemanager/network/armnetwork/routes_client_example_test.go deleted file mode 100644 index 7847050cc9c8..000000000000 --- a/sdk/resourcemanager/network/armnetwork/routes_client_example_test.go +++ /dev/null @@ -1,110 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/RouteTableRouteDelete.json -func ExampleRoutesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewRoutesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "testrt", "route1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/RouteTableRouteGet.json -func ExampleRoutesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewRoutesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "testrt", "route1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/RouteTableRouteCreate.json -func ExampleRoutesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewRoutesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "testrt", "route1", armnetwork.Route{ - Properties: &armnetwork.RoutePropertiesFormat{ - AddressPrefix: to.Ptr("10.0.3.0/24"), - NextHopType: to.Ptr(armnetwork.RouteNextHopTypeVirtualNetworkGateway), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/RouteTableRouteList.json -func ExampleRoutesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewRoutesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", "testrt", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/routetables_client.go b/sdk/resourcemanager/network/armnetwork/routetables_client.go index 7cfd9f903b05..9637c51be87f 100644 --- a/sdk/resourcemanager/network/armnetwork/routetables_client.go +++ b/sdk/resourcemanager/network/armnetwork/routetables_client.go @@ -32,10 +32,10 @@ type RouteTablesClient struct { } // NewRouteTablesClient creates a new instance of RouteTablesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewRouteTablesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RouteTablesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewRouteTablesClient(subscriptionID string, credential azcore.TokenCredenti // BeginCreateOrUpdate - Create or updates a route table in a specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// routeTableName - The name of the route table. -// parameters - Parameters supplied to the create or update route table operation. -// options - RouteTablesClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteTablesClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - routeTableName - The name of the route table. +// - parameters - Parameters supplied to the create or update route table operation. +// - options - RouteTablesClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteTablesClient.BeginCreateOrUpdate +// method. func (client *RouteTablesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, routeTableName string, parameters RouteTable, options *RouteTablesClientBeginCreateOrUpdateOptions) (*runtime.Poller[RouteTablesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, routeTableName, parameters, options) @@ -80,6 +81,7 @@ func (client *RouteTablesClient) BeginCreateOrUpdate(ctx context.Context, resour // CreateOrUpdate - Create or updates a route table in a specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *RouteTablesClient) createOrUpdate(ctx context.Context, resourceGroupName string, routeTableName string, parameters RouteTable, options *RouteTablesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, routeTableName, parameters, options) @@ -124,10 +126,11 @@ func (client *RouteTablesClient) createOrUpdateCreateRequest(ctx context.Context // BeginDelete - Deletes the specified route table. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// routeTableName - The name of the route table. -// options - RouteTablesClientBeginDeleteOptions contains the optional parameters for the RouteTablesClient.BeginDelete method. +// - resourceGroupName - The name of the resource group. +// - routeTableName - The name of the route table. +// - options - RouteTablesClientBeginDeleteOptions contains the optional parameters for the RouteTablesClient.BeginDelete method. func (client *RouteTablesClient) BeginDelete(ctx context.Context, resourceGroupName string, routeTableName string, options *RouteTablesClientBeginDeleteOptions) (*runtime.Poller[RouteTablesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, routeTableName, options) @@ -144,6 +147,7 @@ func (client *RouteTablesClient) BeginDelete(ctx context.Context, resourceGroupN // Delete - Deletes the specified route table. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *RouteTablesClient) deleteOperation(ctx context.Context, resourceGroupName string, routeTableName string, options *RouteTablesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, routeTableName, options) @@ -188,10 +192,11 @@ func (client *RouteTablesClient) deleteCreateRequest(ctx context.Context, resour // Get - Gets the specified route table. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// routeTableName - The name of the route table. -// options - RouteTablesClientGetOptions contains the optional parameters for the RouteTablesClient.Get method. +// - resourceGroupName - The name of the resource group. +// - routeTableName - The name of the route table. +// - options - RouteTablesClientGetOptions contains the optional parameters for the RouteTablesClient.Get method. func (client *RouteTablesClient) Get(ctx context.Context, resourceGroupName string, routeTableName string, options *RouteTablesClientGetOptions) (RouteTablesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, routeTableName, options) if err != nil { @@ -246,9 +251,10 @@ func (client *RouteTablesClient) getHandleResponse(resp *http.Response) (RouteTa } // NewListPager - Gets all route tables in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - RouteTablesClientListOptions contains the optional parameters for the RouteTablesClient.List method. +// - resourceGroupName - The name of the resource group. +// - options - RouteTablesClientListOptions contains the optional parameters for the RouteTablesClient.NewListPager method. func (client *RouteTablesClient) NewListPager(resourceGroupName string, options *RouteTablesClientListOptions) *runtime.Pager[RouteTablesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[RouteTablesClientListResponse]{ More: func(page RouteTablesClientListResponse) bool { @@ -309,8 +315,9 @@ func (client *RouteTablesClient) listHandleResponse(resp *http.Response) (RouteT } // NewListAllPager - Gets all route tables in a subscription. +// // Generated from API version 2022-07-01 -// options - RouteTablesClientListAllOptions contains the optional parameters for the RouteTablesClient.ListAll method. +// - options - RouteTablesClientListAllOptions contains the optional parameters for the RouteTablesClient.NewListAllPager method. func (client *RouteTablesClient) NewListAllPager(options *RouteTablesClientListAllOptions) *runtime.Pager[RouteTablesClientListAllResponse] { return runtime.NewPager(runtime.PagingHandler[RouteTablesClientListAllResponse]{ More: func(page RouteTablesClientListAllResponse) bool { @@ -368,11 +375,12 @@ func (client *RouteTablesClient) listAllHandleResponse(resp *http.Response) (Rou // UpdateTags - Updates a route table tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// routeTableName - The name of the route table. -// parameters - Parameters supplied to update route table tags. -// options - RouteTablesClientUpdateTagsOptions contains the optional parameters for the RouteTablesClient.UpdateTags method. +// - resourceGroupName - The name of the resource group. +// - routeTableName - The name of the route table. +// - parameters - Parameters supplied to update route table tags. +// - options - RouteTablesClientUpdateTagsOptions contains the optional parameters for the RouteTablesClient.UpdateTags method. func (client *RouteTablesClient) UpdateTags(ctx context.Context, resourceGroupName string, routeTableName string, parameters TagsObject, options *RouteTablesClientUpdateTagsOptions) (RouteTablesClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, routeTableName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/routetables_client_example_test.go b/sdk/resourcemanager/network/armnetwork/routetables_client_example_test.go deleted file mode 100644 index 852b3daa726f..000000000000 --- a/sdk/resourcemanager/network/armnetwork/routetables_client_example_test.go +++ /dev/null @@ -1,191 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/RouteTableDelete.json -func ExampleRouteTablesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewRouteTablesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "testrt", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/RouteTableGet.json -func ExampleRouteTablesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewRouteTablesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "testrt", &armnetwork.RouteTablesClientGetOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/RouteTableCreate.json -func ExampleRouteTablesClient_BeginCreateOrUpdate_createRouteTable() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewRouteTablesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "testrt", armnetwork.RouteTable{ - Location: to.Ptr("westus"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/RouteTableCreateWithRoute.json -func ExampleRouteTablesClient_BeginCreateOrUpdate_createRouteTableWithRoute() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewRouteTablesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "testrt", armnetwork.RouteTable{ - Location: to.Ptr("westus"), - Properties: &armnetwork.RouteTablePropertiesFormat{ - DisableBgpRoutePropagation: to.Ptr(true), - Routes: []*armnetwork.Route{ - { - Name: to.Ptr("route1"), - Properties: &armnetwork.RoutePropertiesFormat{ - AddressPrefix: to.Ptr("10.0.3.0/24"), - NextHopType: to.Ptr(armnetwork.RouteNextHopTypeVirtualNetworkGateway), - }, - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/RouteTableUpdateTags.json -func ExampleRouteTablesClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewRouteTablesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, "rg1", "testrt", armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/RouteTableList.json -func ExampleRouteTablesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewRouteTablesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/RouteTableListAll.json -func ExampleRouteTablesClient_NewListAllPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewRouteTablesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListAllPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/routingintent_client.go b/sdk/resourcemanager/network/armnetwork/routingintent_client.go index 35aae08ae49b..03fa2f4d8097 100644 --- a/sdk/resourcemanager/network/armnetwork/routingintent_client.go +++ b/sdk/resourcemanager/network/armnetwork/routingintent_client.go @@ -32,10 +32,10 @@ type RoutingIntentClient struct { } // NewRoutingIntentClient creates a new instance of RoutingIntentClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewRoutingIntentClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RoutingIntentClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewRoutingIntentClient(subscriptionID string, credential azcore.TokenCreden // BeginCreateOrUpdate - Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the RoutingIntent. -// virtualHubName - The name of the VirtualHub. -// routingIntentName - The name of the per VirtualHub singleton Routing Intent resource. -// routingIntentParameters - Parameters supplied to create or update RoutingIntent. -// options - RoutingIntentClientBeginCreateOrUpdateOptions contains the optional parameters for the RoutingIntentClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The resource group name of the RoutingIntent. +// - virtualHubName - The name of the VirtualHub. +// - routingIntentName - The name of the per VirtualHub singleton Routing Intent resource. +// - routingIntentParameters - Parameters supplied to create or update RoutingIntent. +// - options - RoutingIntentClientBeginCreateOrUpdateOptions contains the optional parameters for the RoutingIntentClient.BeginCreateOrUpdate +// method. func (client *RoutingIntentClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routingIntentName string, routingIntentParameters RoutingIntent, options *RoutingIntentClientBeginCreateOrUpdateOptions) (*runtime.Poller[RoutingIntentClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, routingIntentName, routingIntentParameters, options) @@ -81,6 +82,7 @@ func (client *RoutingIntentClient) BeginCreateOrUpdate(ctx context.Context, reso // CreateOrUpdate - Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *RoutingIntentClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routingIntentName string, routingIntentParameters RoutingIntent, options *RoutingIntentClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualHubName, routingIntentName, routingIntentParameters, options) @@ -129,12 +131,13 @@ func (client *RoutingIntentClient) createOrUpdateCreateRequest(ctx context.Conte // BeginDelete - Deletes a RoutingIntent. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the RoutingIntent. -// virtualHubName - The name of the VirtualHub. -// routingIntentName - The name of the RoutingIntent. -// options - RoutingIntentClientBeginDeleteOptions contains the optional parameters for the RoutingIntentClient.BeginDelete -// method. +// - resourceGroupName - The resource group name of the RoutingIntent. +// - virtualHubName - The name of the VirtualHub. +// - routingIntentName - The name of the RoutingIntent. +// - options - RoutingIntentClientBeginDeleteOptions contains the optional parameters for the RoutingIntentClient.BeginDelete +// method. func (client *RoutingIntentClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, routingIntentName string, options *RoutingIntentClientBeginDeleteOptions) (*runtime.Poller[RoutingIntentClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, routingIntentName, options) @@ -151,6 +154,7 @@ func (client *RoutingIntentClient) BeginDelete(ctx context.Context, resourceGrou // Delete - Deletes a RoutingIntent. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *RoutingIntentClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualHubName string, routingIntentName string, options *RoutingIntentClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualHubName, routingIntentName, options) @@ -199,11 +203,12 @@ func (client *RoutingIntentClient) deleteCreateRequest(ctx context.Context, reso // Get - Retrieves the details of a RoutingIntent. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the RoutingIntent. -// virtualHubName - The name of the VirtualHub. -// routingIntentName - The name of the RoutingIntent. -// options - RoutingIntentClientGetOptions contains the optional parameters for the RoutingIntentClient.Get method. +// - resourceGroupName - The resource group name of the RoutingIntent. +// - virtualHubName - The name of the VirtualHub. +// - routingIntentName - The name of the RoutingIntent. +// - options - RoutingIntentClientGetOptions contains the optional parameters for the RoutingIntentClient.Get method. func (client *RoutingIntentClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, routingIntentName string, options *RoutingIntentClientGetOptions) (RoutingIntentClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, virtualHubName, routingIntentName, options) if err != nil { @@ -259,10 +264,11 @@ func (client *RoutingIntentClient) getHandleResponse(resp *http.Response) (Routi } // NewListPager - Retrieves the details of all RoutingIntent child resources of the VirtualHub. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// options - RoutingIntentClientListOptions contains the optional parameters for the RoutingIntentClient.List method. +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - options - RoutingIntentClientListOptions contains the optional parameters for the RoutingIntentClient.NewListPager method. func (client *RoutingIntentClient) NewListPager(resourceGroupName string, virtualHubName string, options *RoutingIntentClientListOptions) *runtime.Pager[RoutingIntentClientListResponse] { return runtime.NewPager(runtime.PagingHandler[RoutingIntentClientListResponse]{ More: func(page RoutingIntentClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/routingintent_client_example_test.go b/sdk/resourcemanager/network/armnetwork/routingintent_client_example_test.go deleted file mode 100644 index d180f63e5230..000000000000 --- a/sdk/resourcemanager/network/armnetwork/routingintent_client_example_test.go +++ /dev/null @@ -1,121 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/RoutingIntentPut.json -func ExampleRoutingIntentClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewRoutingIntentClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "virtualHub1", "Intent1", armnetwork.RoutingIntent{ - Properties: &armnetwork.RoutingIntentProperties{ - RoutingPolicies: []*armnetwork.RoutingPolicy{ - { - Name: to.Ptr("InternetTraffic"), - Destinations: []*string{ - to.Ptr("Internet")}, - NextHop: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azfw1"), - }, - { - Name: to.Ptr("PrivateTrafficPolicy"), - Destinations: []*string{ - to.Ptr("PrivateTraffic")}, - NextHop: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azfw1"), - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/RoutingIntentGet.json -func ExampleRoutingIntentClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewRoutingIntentClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "virtualHub1", "Intent1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/RoutingIntentDelete.json -func ExampleRoutingIntentClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewRoutingIntentClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "virtualHub1", "Intent1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/RoutingIntentList.json -func ExampleRoutingIntentClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewRoutingIntentClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", "virtualHub1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/scopeconnections_client.go b/sdk/resourcemanager/network/armnetwork/scopeconnections_client.go index b4738ed2cf1c..65d30287b544 100644 --- a/sdk/resourcemanager/network/armnetwork/scopeconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/scopeconnections_client.go @@ -33,10 +33,10 @@ type ScopeConnectionsClient struct { } // NewScopeConnectionsClient creates a new instance of ScopeConnectionsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewScopeConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ScopeConnectionsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -59,13 +59,14 @@ func NewScopeConnectionsClient(subscriptionID string, credential azcore.TokenCre // CreateOrUpdate - Creates or updates scope connection from Network Manager // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// scopeConnectionName - Name for the cross-tenant connection. -// parameters - Scope connection to be created/updated. -// options - ScopeConnectionsClientCreateOrUpdateOptions contains the optional parameters for the ScopeConnectionsClient.CreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - scopeConnectionName - Name for the cross-tenant connection. +// - parameters - Scope connection to be created/updated. +// - options - ScopeConnectionsClientCreateOrUpdateOptions contains the optional parameters for the ScopeConnectionsClient.CreateOrUpdate +// method. func (client *ScopeConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkManagerName string, scopeConnectionName string, parameters ScopeConnection, options *ScopeConnectionsClientCreateOrUpdateOptions) (ScopeConnectionsClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkManagerName, scopeConnectionName, parameters, options) if err != nil { @@ -122,11 +123,12 @@ func (client *ScopeConnectionsClient) createOrUpdateHandleResponse(resp *http.Re // Delete - Delete the pending scope connection created by this network manager. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// scopeConnectionName - Name for the cross-tenant connection. -// options - ScopeConnectionsClientDeleteOptions contains the optional parameters for the ScopeConnectionsClient.Delete method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - scopeConnectionName - Name for the cross-tenant connection. +// - options - ScopeConnectionsClientDeleteOptions contains the optional parameters for the ScopeConnectionsClient.Delete method. func (client *ScopeConnectionsClient) Delete(ctx context.Context, resourceGroupName string, networkManagerName string, scopeConnectionName string, options *ScopeConnectionsClientDeleteOptions) (ScopeConnectionsClientDeleteResponse, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, scopeConnectionName, options) if err != nil { @@ -174,11 +176,12 @@ func (client *ScopeConnectionsClient) deleteCreateRequest(ctx context.Context, r // Get - Get specified scope connection created by this Network Manager. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// scopeConnectionName - Name for the cross-tenant connection. -// options - ScopeConnectionsClientGetOptions contains the optional parameters for the ScopeConnectionsClient.Get method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - scopeConnectionName - Name for the cross-tenant connection. +// - options - ScopeConnectionsClientGetOptions contains the optional parameters for the ScopeConnectionsClient.Get method. func (client *ScopeConnectionsClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, scopeConnectionName string, options *ScopeConnectionsClientGetOptions) (ScopeConnectionsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, scopeConnectionName, options) if err != nil { @@ -234,10 +237,12 @@ func (client *ScopeConnectionsClient) getHandleResponse(resp *http.Response) (Sc } // NewListPager - List all scope connections created by this network manager. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// options - ScopeConnectionsClientListOptions contains the optional parameters for the ScopeConnectionsClient.List method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - options - ScopeConnectionsClientListOptions contains the optional parameters for the ScopeConnectionsClient.NewListPager +// method. func (client *ScopeConnectionsClient) NewListPager(resourceGroupName string, networkManagerName string, options *ScopeConnectionsClientListOptions) *runtime.Pager[ScopeConnectionsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ScopeConnectionsClientListResponse]{ More: func(page ScopeConnectionsClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/scopeconnections_client_example_test.go b/sdk/resourcemanager/network/armnetwork/scopeconnections_client_example_test.go deleted file mode 100644 index 74389c19f868..000000000000 --- a/sdk/resourcemanager/network/armnetwork/scopeconnections_client_example_test.go +++ /dev/null @@ -1,105 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerScopeConnectionPut.json -func ExampleScopeConnectionsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewScopeConnectionsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, "rg1", "testNetworkManager", "TestScopeConnection", armnetwork.ScopeConnection{ - Properties: &armnetwork.ScopeConnectionProperties{ - Description: to.Ptr("This is a scope connection to a cross tenant subscription."), - ResourceID: to.Ptr("subscriptions/f0dc2b34-dfad-40e4-83e0-2309fed8d00b"), - TenantID: to.Ptr("6babcaad-604b-40ac-a9d7-9fd97c0b779f"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerScopeConnectionGet.json -func ExampleScopeConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewScopeConnectionsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "testNetworkManager", "TestScopeConnection", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerScopeConnectionDelete.json -func ExampleScopeConnectionsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewScopeConnectionsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, "rg1", "testNetworkManager", "TestScopeConnection", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerScopeConnectionList.json -func ExampleScopeConnectionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewScopeConnectionsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", "testNetworkManager", &armnetwork.ScopeConnectionsClientListOptions{Top: nil, - SkipToken: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/securityadminconfigurations_client.go b/sdk/resourcemanager/network/armnetwork/securityadminconfigurations_client.go index 0041f42f9261..174fd9c06f06 100644 --- a/sdk/resourcemanager/network/armnetwork/securityadminconfigurations_client.go +++ b/sdk/resourcemanager/network/armnetwork/securityadminconfigurations_client.go @@ -33,10 +33,10 @@ type SecurityAdminConfigurationsClient struct { } // NewSecurityAdminConfigurationsClient creates a new instance of SecurityAdminConfigurationsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSecurityAdminConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecurityAdminConfigurationsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -59,13 +59,14 @@ func NewSecurityAdminConfigurationsClient(subscriptionID string, credential azco // CreateOrUpdate - Creates or updates a network manager security admin configuration. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// configurationName - The name of the network manager Security Configuration. -// securityAdminConfiguration - The security admin configuration to create or update -// options - SecurityAdminConfigurationsClientCreateOrUpdateOptions contains the optional parameters for the SecurityAdminConfigurationsClient.CreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - securityAdminConfiguration - The security admin configuration to create or update +// - options - SecurityAdminConfigurationsClientCreateOrUpdateOptions contains the optional parameters for the SecurityAdminConfigurationsClient.CreateOrUpdate +// method. func (client *SecurityAdminConfigurationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, securityAdminConfiguration SecurityAdminConfiguration, options *SecurityAdminConfigurationsClientCreateOrUpdateOptions) (SecurityAdminConfigurationsClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, securityAdminConfiguration, options) if err != nil { @@ -122,12 +123,13 @@ func (client *SecurityAdminConfigurationsClient) createOrUpdateHandleResponse(re // BeginDelete - Deletes a network manager security admin configuration. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// configurationName - The name of the network manager Security Configuration. -// options - SecurityAdminConfigurationsClientBeginDeleteOptions contains the optional parameters for the SecurityAdminConfigurationsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - options - SecurityAdminConfigurationsClientBeginDeleteOptions contains the optional parameters for the SecurityAdminConfigurationsClient.BeginDelete +// method. func (client *SecurityAdminConfigurationsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *SecurityAdminConfigurationsClientBeginDeleteOptions) (*runtime.Poller[SecurityAdminConfigurationsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, networkManagerName, configurationName, options) @@ -144,6 +146,7 @@ func (client *SecurityAdminConfigurationsClient) BeginDelete(ctx context.Context // Delete - Deletes a network manager security admin configuration. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *SecurityAdminConfigurationsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *SecurityAdminConfigurationsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, options) @@ -195,12 +198,13 @@ func (client *SecurityAdminConfigurationsClient) deleteCreateRequest(ctx context // Get - Retrieves a network manager security admin configuration. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// configurationName - The name of the network manager Security Configuration. -// options - SecurityAdminConfigurationsClientGetOptions contains the optional parameters for the SecurityAdminConfigurationsClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - configurationName - The name of the network manager Security Configuration. +// - options - SecurityAdminConfigurationsClientGetOptions contains the optional parameters for the SecurityAdminConfigurationsClient.Get +// method. func (client *SecurityAdminConfigurationsClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, configurationName string, options *SecurityAdminConfigurationsClientGetOptions) (SecurityAdminConfigurationsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, configurationName, options) if err != nil { @@ -256,11 +260,12 @@ func (client *SecurityAdminConfigurationsClient) getHandleResponse(resp *http.Re } // NewListPager - Lists all the network manager security admin configurations in a network manager, in a paginated format. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// options - SecurityAdminConfigurationsClientListOptions contains the optional parameters for the SecurityAdminConfigurationsClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - options - SecurityAdminConfigurationsClientListOptions contains the optional parameters for the SecurityAdminConfigurationsClient.NewListPager +// method. func (client *SecurityAdminConfigurationsClient) NewListPager(resourceGroupName string, networkManagerName string, options *SecurityAdminConfigurationsClientListOptions) *runtime.Pager[SecurityAdminConfigurationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[SecurityAdminConfigurationsClientListResponse]{ More: func(page SecurityAdminConfigurationsClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/securityadminconfigurations_client_example_test.go b/sdk/resourcemanager/network/armnetwork/securityadminconfigurations_client_example_test.go deleted file mode 100644 index 47732a933325..000000000000 --- a/sdk/resourcemanager/network/armnetwork/securityadminconfigurations_client_example_test.go +++ /dev/null @@ -1,109 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerSecurityAdminConfigurationList.json -func ExampleSecurityAdminConfigurationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSecurityAdminConfigurationsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", "testNetworkManager", &armnetwork.SecurityAdminConfigurationsClientListOptions{Top: nil, - SkipToken: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerSecurityAdminConfigurationGet.json -func ExampleSecurityAdminConfigurationsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSecurityAdminConfigurationsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "testNetworkManager", "myTestSecurityConfig", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerSecurityAdminConfigurationPut.json -func ExampleSecurityAdminConfigurationsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSecurityAdminConfigurationsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, "rg1", "testNetworkManager", "myTestSecurityConfig", armnetwork.SecurityAdminConfiguration{ - Properties: &armnetwork.SecurityAdminConfigurationPropertiesFormat{ - Description: to.Ptr("A sample policy"), - ApplyOnNetworkIntentPolicyBasedServices: []*armnetwork.NetworkIntentPolicyBasedService{ - to.Ptr(armnetwork.NetworkIntentPolicyBasedServiceNone)}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerSecurityAdminConfigurationDelete.json -func ExampleSecurityAdminConfigurationsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSecurityAdminConfigurationsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "testNetworkManager", "myTestSecurityConfig", &armnetwork.SecurityAdminConfigurationsClientBeginDeleteOptions{Force: to.Ptr(false)}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/network/armnetwork/securitygroups_client.go b/sdk/resourcemanager/network/armnetwork/securitygroups_client.go index 907af365f1dd..b5e7e282148c 100644 --- a/sdk/resourcemanager/network/armnetwork/securitygroups_client.go +++ b/sdk/resourcemanager/network/armnetwork/securitygroups_client.go @@ -32,10 +32,10 @@ type SecurityGroupsClient struct { } // NewSecurityGroupsClient creates a new instance of SecurityGroupsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSecurityGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecurityGroupsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewSecurityGroupsClient(subscriptionID string, credential azcore.TokenCrede // BeginCreateOrUpdate - Creates or updates a network security group in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkSecurityGroupName - The name of the network security group. -// parameters - Parameters supplied to the create or update network security group operation. -// options - SecurityGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the SecurityGroupsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - networkSecurityGroupName - The name of the network security group. +// - parameters - Parameters supplied to the create or update network security group operation. +// - options - SecurityGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the SecurityGroupsClient.BeginCreateOrUpdate +// method. func (client *SecurityGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters SecurityGroup, options *SecurityGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[SecurityGroupsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, networkSecurityGroupName, parameters, options) @@ -80,6 +81,7 @@ func (client *SecurityGroupsClient) BeginCreateOrUpdate(ctx context.Context, res // CreateOrUpdate - Creates or updates a network security group in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *SecurityGroupsClient) createOrUpdate(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters SecurityGroup, options *SecurityGroupsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, parameters, options) @@ -124,11 +126,12 @@ func (client *SecurityGroupsClient) createOrUpdateCreateRequest(ctx context.Cont // BeginDelete - Deletes the specified network security group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkSecurityGroupName - The name of the network security group. -// options - SecurityGroupsClientBeginDeleteOptions contains the optional parameters for the SecurityGroupsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - networkSecurityGroupName - The name of the network security group. +// - options - SecurityGroupsClientBeginDeleteOptions contains the optional parameters for the SecurityGroupsClient.BeginDelete +// method. func (client *SecurityGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, options *SecurityGroupsClientBeginDeleteOptions) (*runtime.Poller[SecurityGroupsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, networkSecurityGroupName, options) @@ -145,6 +148,7 @@ func (client *SecurityGroupsClient) BeginDelete(ctx context.Context, resourceGro // Delete - Deletes the specified network security group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *SecurityGroupsClient) deleteOperation(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, options *SecurityGroupsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, options) @@ -189,10 +193,11 @@ func (client *SecurityGroupsClient) deleteCreateRequest(ctx context.Context, res // Get - Gets the specified network security group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkSecurityGroupName - The name of the network security group. -// options - SecurityGroupsClientGetOptions contains the optional parameters for the SecurityGroupsClient.Get method. +// - resourceGroupName - The name of the resource group. +// - networkSecurityGroupName - The name of the network security group. +// - options - SecurityGroupsClientGetOptions contains the optional parameters for the SecurityGroupsClient.Get method. func (client *SecurityGroupsClient) Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, options *SecurityGroupsClientGetOptions) (SecurityGroupsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, options) if err != nil { @@ -247,9 +252,10 @@ func (client *SecurityGroupsClient) getHandleResponse(resp *http.Response) (Secu } // NewListPager - Gets all network security groups in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - SecurityGroupsClientListOptions contains the optional parameters for the SecurityGroupsClient.List method. +// - resourceGroupName - The name of the resource group. +// - options - SecurityGroupsClientListOptions contains the optional parameters for the SecurityGroupsClient.NewListPager method. func (client *SecurityGroupsClient) NewListPager(resourceGroupName string, options *SecurityGroupsClientListOptions) *runtime.Pager[SecurityGroupsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[SecurityGroupsClientListResponse]{ More: func(page SecurityGroupsClientListResponse) bool { @@ -310,8 +316,10 @@ func (client *SecurityGroupsClient) listHandleResponse(resp *http.Response) (Sec } // NewListAllPager - Gets all network security groups in a subscription. +// // Generated from API version 2022-07-01 -// options - SecurityGroupsClientListAllOptions contains the optional parameters for the SecurityGroupsClient.ListAll method. +// - options - SecurityGroupsClientListAllOptions contains the optional parameters for the SecurityGroupsClient.NewListAllPager +// method. func (client *SecurityGroupsClient) NewListAllPager(options *SecurityGroupsClientListAllOptions) *runtime.Pager[SecurityGroupsClientListAllResponse] { return runtime.NewPager(runtime.PagingHandler[SecurityGroupsClientListAllResponse]{ More: func(page SecurityGroupsClientListAllResponse) bool { @@ -369,12 +377,13 @@ func (client *SecurityGroupsClient) listAllHandleResponse(resp *http.Response) ( // UpdateTags - Updates a network security group tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkSecurityGroupName - The name of the network security group. -// parameters - Parameters supplied to update network security group tags. -// options - SecurityGroupsClientUpdateTagsOptions contains the optional parameters for the SecurityGroupsClient.UpdateTags -// method. +// - resourceGroupName - The name of the resource group. +// - networkSecurityGroupName - The name of the network security group. +// - parameters - Parameters supplied to update network security group tags. +// - options - SecurityGroupsClientUpdateTagsOptions contains the optional parameters for the SecurityGroupsClient.UpdateTags +// method. func (client *SecurityGroupsClient) UpdateTags(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters TagsObject, options *SecurityGroupsClientUpdateTagsOptions) (SecurityGroupsClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/securitygroups_client_example_test.go b/sdk/resourcemanager/network/armnetwork/securitygroups_client_example_test.go deleted file mode 100644 index b5ecf9c2065c..000000000000 --- a/sdk/resourcemanager/network/armnetwork/securitygroups_client_example_test.go +++ /dev/null @@ -1,196 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkSecurityGroupDelete.json -func ExampleSecurityGroupsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSecurityGroupsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "testnsg", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkSecurityGroupGet.json -func ExampleSecurityGroupsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSecurityGroupsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "testnsg", &armnetwork.SecurityGroupsClientGetOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkSecurityGroupCreate.json -func ExampleSecurityGroupsClient_BeginCreateOrUpdate_createNetworkSecurityGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSecurityGroupsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "testnsg", armnetwork.SecurityGroup{ - Location: to.Ptr("eastus"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkSecurityGroupCreateWithRule.json -func ExampleSecurityGroupsClient_BeginCreateOrUpdate_createNetworkSecurityGroupWithRule() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSecurityGroupsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "testnsg", armnetwork.SecurityGroup{ - Location: to.Ptr("eastus"), - Properties: &armnetwork.SecurityGroupPropertiesFormat{ - SecurityRules: []*armnetwork.SecurityRule{ - { - Name: to.Ptr("rule1"), - Properties: &armnetwork.SecurityRulePropertiesFormat{ - Access: to.Ptr(armnetwork.SecurityRuleAccessAllow), - DestinationAddressPrefix: to.Ptr("*"), - DestinationPortRange: to.Ptr("80"), - Direction: to.Ptr(armnetwork.SecurityRuleDirectionInbound), - Priority: to.Ptr[int32](130), - SourceAddressPrefix: to.Ptr("*"), - SourcePortRange: to.Ptr("*"), - Protocol: to.Ptr(armnetwork.SecurityRuleProtocolAsterisk), - }, - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkSecurityGroupUpdateTags.json -func ExampleSecurityGroupsClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSecurityGroupsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, "rg1", "testnsg", armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkSecurityGroupListAll.json -func ExampleSecurityGroupsClient_NewListAllPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSecurityGroupsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListAllPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkSecurityGroupList.json -func ExampleSecurityGroupsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSecurityGroupsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/securitypartnerproviders_client.go b/sdk/resourcemanager/network/armnetwork/securitypartnerproviders_client.go index 2ca2a03726e4..bbafd812c89a 100644 --- a/sdk/resourcemanager/network/armnetwork/securitypartnerproviders_client.go +++ b/sdk/resourcemanager/network/armnetwork/securitypartnerproviders_client.go @@ -32,10 +32,10 @@ type SecurityPartnerProvidersClient struct { } // NewSecurityPartnerProvidersClient creates a new instance of SecurityPartnerProvidersClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSecurityPartnerProvidersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecurityPartnerProvidersClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewSecurityPartnerProvidersClient(subscriptionID string, credential azcore. // BeginCreateOrUpdate - Creates or updates the specified Security Partner Provider. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// securityPartnerProviderName - The name of the Security Partner Provider. -// parameters - Parameters supplied to the create or update Security Partner Provider operation. -// options - SecurityPartnerProvidersClientBeginCreateOrUpdateOptions contains the optional parameters for the SecurityPartnerProvidersClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - securityPartnerProviderName - The name of the Security Partner Provider. +// - parameters - Parameters supplied to the create or update Security Partner Provider operation. +// - options - SecurityPartnerProvidersClientBeginCreateOrUpdateOptions contains the optional parameters for the SecurityPartnerProvidersClient.BeginCreateOrUpdate +// method. func (client *SecurityPartnerProvidersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, parameters SecurityPartnerProvider, options *SecurityPartnerProvidersClientBeginCreateOrUpdateOptions) (*runtime.Poller[SecurityPartnerProvidersClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, securityPartnerProviderName, parameters, options) @@ -80,6 +81,7 @@ func (client *SecurityPartnerProvidersClient) BeginCreateOrUpdate(ctx context.Co // CreateOrUpdate - Creates or updates the specified Security Partner Provider. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *SecurityPartnerProvidersClient) createOrUpdate(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, parameters SecurityPartnerProvider, options *SecurityPartnerProvidersClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, securityPartnerProviderName, parameters, options) @@ -124,11 +126,12 @@ func (client *SecurityPartnerProvidersClient) createOrUpdateCreateRequest(ctx co // BeginDelete - Deletes the specified Security Partner Provider. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// securityPartnerProviderName - The name of the Security Partner Provider. -// options - SecurityPartnerProvidersClientBeginDeleteOptions contains the optional parameters for the SecurityPartnerProvidersClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - securityPartnerProviderName - The name of the Security Partner Provider. +// - options - SecurityPartnerProvidersClientBeginDeleteOptions contains the optional parameters for the SecurityPartnerProvidersClient.BeginDelete +// method. func (client *SecurityPartnerProvidersClient) BeginDelete(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, options *SecurityPartnerProvidersClientBeginDeleteOptions) (*runtime.Poller[SecurityPartnerProvidersClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, securityPartnerProviderName, options) @@ -145,6 +148,7 @@ func (client *SecurityPartnerProvidersClient) BeginDelete(ctx context.Context, r // Delete - Deletes the specified Security Partner Provider. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *SecurityPartnerProvidersClient) deleteOperation(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, options *SecurityPartnerProvidersClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, securityPartnerProviderName, options) @@ -189,11 +193,12 @@ func (client *SecurityPartnerProvidersClient) deleteCreateRequest(ctx context.Co // Get - Gets the specified Security Partner Provider. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// securityPartnerProviderName - The name of the Security Partner Provider. -// options - SecurityPartnerProvidersClientGetOptions contains the optional parameters for the SecurityPartnerProvidersClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - securityPartnerProviderName - The name of the Security Partner Provider. +// - options - SecurityPartnerProvidersClientGetOptions contains the optional parameters for the SecurityPartnerProvidersClient.Get +// method. func (client *SecurityPartnerProvidersClient) Get(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, options *SecurityPartnerProvidersClientGetOptions) (SecurityPartnerProvidersClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, securityPartnerProviderName, options) if err != nil { @@ -245,9 +250,10 @@ func (client *SecurityPartnerProvidersClient) getHandleResponse(resp *http.Respo } // NewListPager - Gets all the Security Partner Providers in a subscription. +// // Generated from API version 2022-07-01 -// options - SecurityPartnerProvidersClientListOptions contains the optional parameters for the SecurityPartnerProvidersClient.List -// method. +// - options - SecurityPartnerProvidersClientListOptions contains the optional parameters for the SecurityPartnerProvidersClient.NewListPager +// method. func (client *SecurityPartnerProvidersClient) NewListPager(options *SecurityPartnerProvidersClientListOptions) *runtime.Pager[SecurityPartnerProvidersClientListResponse] { return runtime.NewPager(runtime.PagingHandler[SecurityPartnerProvidersClientListResponse]{ More: func(page SecurityPartnerProvidersClientListResponse) bool { @@ -304,10 +310,11 @@ func (client *SecurityPartnerProvidersClient) listHandleResponse(resp *http.Resp } // NewListByResourceGroupPager - Lists all Security Partner Providers in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - SecurityPartnerProvidersClientListByResourceGroupOptions contains the optional parameters for the SecurityPartnerProvidersClient.ListByResourceGroup -// method. +// - resourceGroupName - The name of the resource group. +// - options - SecurityPartnerProvidersClientListByResourceGroupOptions contains the optional parameters for the SecurityPartnerProvidersClient.NewListByResourceGroupPager +// method. func (client *SecurityPartnerProvidersClient) NewListByResourceGroupPager(resourceGroupName string, options *SecurityPartnerProvidersClientListByResourceGroupOptions) *runtime.Pager[SecurityPartnerProvidersClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[SecurityPartnerProvidersClientListByResourceGroupResponse]{ More: func(page SecurityPartnerProvidersClientListByResourceGroupResponse) bool { @@ -369,12 +376,13 @@ func (client *SecurityPartnerProvidersClient) listByResourceGroupHandleResponse( // UpdateTags - Updates tags of a Security Partner Provider resource. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// securityPartnerProviderName - The name of the Security Partner Provider. -// parameters - Parameters supplied to update Security Partner Provider tags. -// options - SecurityPartnerProvidersClientUpdateTagsOptions contains the optional parameters for the SecurityPartnerProvidersClient.UpdateTags -// method. +// - resourceGroupName - The name of the resource group. +// - securityPartnerProviderName - The name of the Security Partner Provider. +// - parameters - Parameters supplied to update Security Partner Provider tags. +// - options - SecurityPartnerProvidersClientUpdateTagsOptions contains the optional parameters for the SecurityPartnerProvidersClient.UpdateTags +// method. func (client *SecurityPartnerProvidersClient) UpdateTags(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, parameters TagsObject, options *SecurityPartnerProvidersClientUpdateTagsOptions) (SecurityPartnerProvidersClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, securityPartnerProviderName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/securitypartnerproviders_client_example_test.go b/sdk/resourcemanager/network/armnetwork/securitypartnerproviders_client_example_test.go deleted file mode 100644 index 9f10ecae0876..000000000000 --- a/sdk/resourcemanager/network/armnetwork/securitypartnerproviders_client_example_test.go +++ /dev/null @@ -1,164 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/SecurityPartnerProviderDelete.json -func ExampleSecurityPartnerProvidersClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSecurityPartnerProvidersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "securityPartnerProvider", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/SecurityPartnerProviderGet.json -func ExampleSecurityPartnerProvidersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSecurityPartnerProvidersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "securityPartnerProvider", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/SecurityPartnerProviderPut.json -func ExampleSecurityPartnerProvidersClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSecurityPartnerProvidersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "securityPartnerProvider", armnetwork.SecurityPartnerProvider{ - Location: to.Ptr("West US"), - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - }, - Properties: &armnetwork.SecurityPartnerProviderPropertiesFormat{ - SecurityProviderName: to.Ptr(armnetwork.SecurityProviderNameZScaler), - VirtualHub: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/SecurityPartnerProviderUpdateTags.json -func ExampleSecurityPartnerProvidersClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSecurityPartnerProvidersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, "rg1", "securityPartnerProvider", armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/SecurityPartnerProviderListByResourceGroup.json -func ExampleSecurityPartnerProvidersClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSecurityPartnerProvidersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/SecurityPartnerProviderListBySubscription.json -func ExampleSecurityPartnerProvidersClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSecurityPartnerProvidersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/securityrules_client.go b/sdk/resourcemanager/network/armnetwork/securityrules_client.go index 2bb26329d00c..427a25ac6658 100644 --- a/sdk/resourcemanager/network/armnetwork/securityrules_client.go +++ b/sdk/resourcemanager/network/armnetwork/securityrules_client.go @@ -32,10 +32,10 @@ type SecurityRulesClient struct { } // NewSecurityRulesClient creates a new instance of SecurityRulesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSecurityRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecurityRulesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewSecurityRulesClient(subscriptionID string, credential azcore.TokenCreden // BeginCreateOrUpdate - Creates or updates a security rule in the specified network security group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkSecurityGroupName - The name of the network security group. -// securityRuleName - The name of the security rule. -// securityRuleParameters - Parameters supplied to the create or update network security rule operation. -// options - SecurityRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the SecurityRulesClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - networkSecurityGroupName - The name of the network security group. +// - securityRuleName - The name of the security rule. +// - securityRuleParameters - Parameters supplied to the create or update network security rule operation. +// - options - SecurityRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the SecurityRulesClient.BeginCreateOrUpdate +// method. func (client *SecurityRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, securityRuleParameters SecurityRule, options *SecurityRulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[SecurityRulesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, networkSecurityGroupName, securityRuleName, securityRuleParameters, options) @@ -81,6 +82,7 @@ func (client *SecurityRulesClient) BeginCreateOrUpdate(ctx context.Context, reso // CreateOrUpdate - Creates or updates a security rule in the specified network security group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *SecurityRulesClient) createOrUpdate(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, securityRuleParameters SecurityRule, options *SecurityRulesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, securityRuleName, securityRuleParameters, options) @@ -129,12 +131,13 @@ func (client *SecurityRulesClient) createOrUpdateCreateRequest(ctx context.Conte // BeginDelete - Deletes the specified network security rule. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkSecurityGroupName - The name of the network security group. -// securityRuleName - The name of the security rule. -// options - SecurityRulesClientBeginDeleteOptions contains the optional parameters for the SecurityRulesClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - networkSecurityGroupName - The name of the network security group. +// - securityRuleName - The name of the security rule. +// - options - SecurityRulesClientBeginDeleteOptions contains the optional parameters for the SecurityRulesClient.BeginDelete +// method. func (client *SecurityRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, options *SecurityRulesClientBeginDeleteOptions) (*runtime.Poller[SecurityRulesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, networkSecurityGroupName, securityRuleName, options) @@ -151,6 +154,7 @@ func (client *SecurityRulesClient) BeginDelete(ctx context.Context, resourceGrou // Delete - Deletes the specified network security rule. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *SecurityRulesClient) deleteOperation(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, options *SecurityRulesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, securityRuleName, options) @@ -199,11 +203,12 @@ func (client *SecurityRulesClient) deleteCreateRequest(ctx context.Context, reso // Get - Get the specified network security rule. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkSecurityGroupName - The name of the network security group. -// securityRuleName - The name of the security rule. -// options - SecurityRulesClientGetOptions contains the optional parameters for the SecurityRulesClient.Get method. +// - resourceGroupName - The name of the resource group. +// - networkSecurityGroupName - The name of the network security group. +// - securityRuleName - The name of the security rule. +// - options - SecurityRulesClientGetOptions contains the optional parameters for the SecurityRulesClient.Get method. func (client *SecurityRulesClient) Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, options *SecurityRulesClientGetOptions) (SecurityRulesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, securityRuleName, options) if err != nil { @@ -259,10 +264,11 @@ func (client *SecurityRulesClient) getHandleResponse(resp *http.Response) (Secur } // NewListPager - Gets all security rules in a network security group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkSecurityGroupName - The name of the network security group. -// options - SecurityRulesClientListOptions contains the optional parameters for the SecurityRulesClient.List method. +// - resourceGroupName - The name of the resource group. +// - networkSecurityGroupName - The name of the network security group. +// - options - SecurityRulesClientListOptions contains the optional parameters for the SecurityRulesClient.NewListPager method. func (client *SecurityRulesClient) NewListPager(resourceGroupName string, networkSecurityGroupName string, options *SecurityRulesClientListOptions) *runtime.Pager[SecurityRulesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[SecurityRulesClientListResponse]{ More: func(page SecurityRulesClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/securityrules_client_example_test.go b/sdk/resourcemanager/network/armnetwork/securityrules_client_example_test.go deleted file mode 100644 index 9c64085057a2..000000000000 --- a/sdk/resourcemanager/network/armnetwork/securityrules_client_example_test.go +++ /dev/null @@ -1,116 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkSecurityGroupRuleDelete.json -func ExampleSecurityRulesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSecurityRulesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "testnsg", "rule1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkSecurityGroupRuleGet.json -func ExampleSecurityRulesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSecurityRulesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "testnsg", "rule1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkSecurityGroupRuleCreate.json -func ExampleSecurityRulesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSecurityRulesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "testnsg", "rule1", armnetwork.SecurityRule{ - Properties: &armnetwork.SecurityRulePropertiesFormat{ - Access: to.Ptr(armnetwork.SecurityRuleAccessDeny), - DestinationAddressPrefix: to.Ptr("11.0.0.0/8"), - DestinationPortRange: to.Ptr("8080"), - Direction: to.Ptr(armnetwork.SecurityRuleDirectionOutbound), - Priority: to.Ptr[int32](100), - SourceAddressPrefix: to.Ptr("10.0.0.0/8"), - SourcePortRange: to.Ptr("*"), - Protocol: to.Ptr(armnetwork.SecurityRuleProtocolAsterisk), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkSecurityGroupRuleList.json -func ExampleSecurityRulesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSecurityRulesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", "testnsg", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/serviceassociationlinks_client.go b/sdk/resourcemanager/network/armnetwork/serviceassociationlinks_client.go index 8c4397991cc5..75d9430a39af 100644 --- a/sdk/resourcemanager/network/armnetwork/serviceassociationlinks_client.go +++ b/sdk/resourcemanager/network/armnetwork/serviceassociationlinks_client.go @@ -32,10 +32,10 @@ type ServiceAssociationLinksClient struct { } // NewServiceAssociationLinksClient creates a new instance of ServiceAssociationLinksClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewServiceAssociationLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceAssociationLinksClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewServiceAssociationLinksClient(subscriptionID string, credential azcore.T // List - Gets a list of service association links for a subnet. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// subnetName - The name of the subnet. -// options - ServiceAssociationLinksClientListOptions contains the optional parameters for the ServiceAssociationLinksClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - subnetName - The name of the subnet. +// - options - ServiceAssociationLinksClientListOptions contains the optional parameters for the ServiceAssociationLinksClient.List +// method. func (client *ServiceAssociationLinksClient) List(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, options *ServiceAssociationLinksClientListOptions) (ServiceAssociationLinksClientListResponse, error) { req, err := client.listCreateRequest(ctx, resourceGroupName, virtualNetworkName, subnetName, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/serviceassociationlinks_client_example_test.go b/sdk/resourcemanager/network/armnetwork/serviceassociationlinks_client_example_test.go deleted file mode 100644 index 3b83108a2162..000000000000 --- a/sdk/resourcemanager/network/armnetwork/serviceassociationlinks_client_example_test.go +++ /dev/null @@ -1,36 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGetServiceAssociationLinks.json -func ExampleServiceAssociationLinksClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewServiceAssociationLinksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.List(ctx, "rg1", "vnet", "subnet", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/serviceendpointpolicies_client.go b/sdk/resourcemanager/network/armnetwork/serviceendpointpolicies_client.go index 44ab2c07a714..0b1a9824c50c 100644 --- a/sdk/resourcemanager/network/armnetwork/serviceendpointpolicies_client.go +++ b/sdk/resourcemanager/network/armnetwork/serviceendpointpolicies_client.go @@ -32,10 +32,10 @@ type ServiceEndpointPoliciesClient struct { } // NewServiceEndpointPoliciesClient creates a new instance of ServiceEndpointPoliciesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewServiceEndpointPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceEndpointPoliciesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewServiceEndpointPoliciesClient(subscriptionID string, credential azcore.T // BeginCreateOrUpdate - Creates or updates a service Endpoint Policies. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// serviceEndpointPolicyName - The name of the service endpoint policy. -// parameters - Parameters supplied to the create or update service endpoint policy operation. -// options - ServiceEndpointPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceEndpointPoliciesClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - serviceEndpointPolicyName - The name of the service endpoint policy. +// - parameters - Parameters supplied to the create or update service endpoint policy operation. +// - options - ServiceEndpointPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceEndpointPoliciesClient.BeginCreateOrUpdate +// method. func (client *ServiceEndpointPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters ServiceEndpointPolicy, options *ServiceEndpointPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServiceEndpointPoliciesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceEndpointPolicyName, parameters, options) @@ -80,6 +81,7 @@ func (client *ServiceEndpointPoliciesClient) BeginCreateOrUpdate(ctx context.Con // CreateOrUpdate - Creates or updates a service Endpoint Policies. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ServiceEndpointPoliciesClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters ServiceEndpointPolicy, options *ServiceEndpointPoliciesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceEndpointPolicyName, parameters, options) @@ -124,11 +126,12 @@ func (client *ServiceEndpointPoliciesClient) createOrUpdateCreateRequest(ctx con // BeginDelete - Deletes the specified service endpoint policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// serviceEndpointPolicyName - The name of the service endpoint policy. -// options - ServiceEndpointPoliciesClientBeginDeleteOptions contains the optional parameters for the ServiceEndpointPoliciesClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - serviceEndpointPolicyName - The name of the service endpoint policy. +// - options - ServiceEndpointPoliciesClientBeginDeleteOptions contains the optional parameters for the ServiceEndpointPoliciesClient.BeginDelete +// method. func (client *ServiceEndpointPoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, options *ServiceEndpointPoliciesClientBeginDeleteOptions) (*runtime.Poller[ServiceEndpointPoliciesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceEndpointPolicyName, options) @@ -145,6 +148,7 @@ func (client *ServiceEndpointPoliciesClient) BeginDelete(ctx context.Context, re // Delete - Deletes the specified service endpoint policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ServiceEndpointPoliciesClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, options *ServiceEndpointPoliciesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceEndpointPolicyName, options) @@ -189,11 +193,12 @@ func (client *ServiceEndpointPoliciesClient) deleteCreateRequest(ctx context.Con // Get - Gets the specified service Endpoint Policies in a specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// serviceEndpointPolicyName - The name of the service endpoint policy. -// options - ServiceEndpointPoliciesClientGetOptions contains the optional parameters for the ServiceEndpointPoliciesClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - serviceEndpointPolicyName - The name of the service endpoint policy. +// - options - ServiceEndpointPoliciesClientGetOptions contains the optional parameters for the ServiceEndpointPoliciesClient.Get +// method. func (client *ServiceEndpointPoliciesClient) Get(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, options *ServiceEndpointPoliciesClientGetOptions) (ServiceEndpointPoliciesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceEndpointPolicyName, options) if err != nil { @@ -248,9 +253,10 @@ func (client *ServiceEndpointPoliciesClient) getHandleResponse(resp *http.Respon } // NewListPager - Gets all the service endpoint policies in a subscription. +// // Generated from API version 2022-07-01 -// options - ServiceEndpointPoliciesClientListOptions contains the optional parameters for the ServiceEndpointPoliciesClient.List -// method. +// - options - ServiceEndpointPoliciesClientListOptions contains the optional parameters for the ServiceEndpointPoliciesClient.NewListPager +// method. func (client *ServiceEndpointPoliciesClient) NewListPager(options *ServiceEndpointPoliciesClientListOptions) *runtime.Pager[ServiceEndpointPoliciesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ServiceEndpointPoliciesClientListResponse]{ More: func(page ServiceEndpointPoliciesClientListResponse) bool { @@ -307,10 +313,11 @@ func (client *ServiceEndpointPoliciesClient) listHandleResponse(resp *http.Respo } // NewListByResourceGroupPager - Gets all service endpoint Policies in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - ServiceEndpointPoliciesClientListByResourceGroupOptions contains the optional parameters for the ServiceEndpointPoliciesClient.ListByResourceGroup -// method. +// - resourceGroupName - The name of the resource group. +// - options - ServiceEndpointPoliciesClientListByResourceGroupOptions contains the optional parameters for the ServiceEndpointPoliciesClient.NewListByResourceGroupPager +// method. func (client *ServiceEndpointPoliciesClient) NewListByResourceGroupPager(resourceGroupName string, options *ServiceEndpointPoliciesClientListByResourceGroupOptions) *runtime.Pager[ServiceEndpointPoliciesClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[ServiceEndpointPoliciesClientListByResourceGroupResponse]{ More: func(page ServiceEndpointPoliciesClientListByResourceGroupResponse) bool { @@ -372,12 +379,13 @@ func (client *ServiceEndpointPoliciesClient) listByResourceGroupHandleResponse(r // UpdateTags - Updates tags of a service endpoint policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// serviceEndpointPolicyName - The name of the service endpoint policy. -// parameters - Parameters supplied to update service endpoint policy tags. -// options - ServiceEndpointPoliciesClientUpdateTagsOptions contains the optional parameters for the ServiceEndpointPoliciesClient.UpdateTags -// method. +// - resourceGroupName - The name of the resource group. +// - serviceEndpointPolicyName - The name of the service endpoint policy. +// - parameters - Parameters supplied to update service endpoint policy tags. +// - options - ServiceEndpointPoliciesClientUpdateTagsOptions contains the optional parameters for the ServiceEndpointPoliciesClient.UpdateTags +// method. func (client *ServiceEndpointPoliciesClient) UpdateTags(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters TagsObject, options *ServiceEndpointPoliciesClientUpdateTagsOptions) (ServiceEndpointPoliciesClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, serviceEndpointPolicyName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/serviceendpointpolicies_client_example_test.go b/sdk/resourcemanager/network/armnetwork/serviceendpointpolicies_client_example_test.go deleted file mode 100644 index 22e2ea6f8ce3..000000000000 --- a/sdk/resourcemanager/network/armnetwork/serviceendpointpolicies_client_example_test.go +++ /dev/null @@ -1,194 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ServiceEndpointPolicyDelete.json -func ExampleServiceEndpointPoliciesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewServiceEndpointPoliciesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "serviceEndpointPolicy1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ServiceEndpointPolicyGet.json -func ExampleServiceEndpointPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewServiceEndpointPoliciesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "testServiceEndpointPolicy", &armnetwork.ServiceEndpointPoliciesClientGetOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ServiceEndpointPolicyCreate.json -func ExampleServiceEndpointPoliciesClient_BeginCreateOrUpdate_createServiceEndpointPolicy() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewServiceEndpointPoliciesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "testPolicy", armnetwork.ServiceEndpointPolicy{ - Location: to.Ptr("westus"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ServiceEndpointPolicyCreateWithDefinition.json -func ExampleServiceEndpointPoliciesClient_BeginCreateOrUpdate_createServiceEndpointPolicyWithDefinition() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewServiceEndpointPoliciesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "testPolicy", armnetwork.ServiceEndpointPolicy{ - Location: to.Ptr("westus"), - Properties: &armnetwork.ServiceEndpointPolicyPropertiesFormat{ - ServiceEndpointPolicyDefinitions: []*armnetwork.ServiceEndpointPolicyDefinition{ - { - Name: to.Ptr("StorageServiceEndpointPolicyDefinition"), - Properties: &armnetwork.ServiceEndpointPolicyDefinitionPropertiesFormat{ - Description: to.Ptr("Storage Service EndpointPolicy Definition"), - Service: to.Ptr("Microsoft.Storage"), - ServiceResources: []*string{ - to.Ptr("/subscriptions/subid1"), - to.Ptr("/subscriptions/subid1/resourceGroups/storageRg"), - to.Ptr("/subscriptions/subid1/resourceGroups/storageRg/providers/Microsoft.Storage/storageAccounts/stAccount")}, - }, - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ServiceEndpointPolicyUpdateTags.json -func ExampleServiceEndpointPoliciesClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewServiceEndpointPoliciesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, "rg1", "testServiceEndpointPolicy", armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ServiceEndpointPolicyListAll.json -func ExampleServiceEndpointPoliciesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewServiceEndpointPoliciesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ServiceEndpointPolicyList.json -func ExampleServiceEndpointPoliciesClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewServiceEndpointPoliciesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/serviceendpointpolicydefinitions_client.go b/sdk/resourcemanager/network/armnetwork/serviceendpointpolicydefinitions_client.go index 3b2616cdb06c..b143501ecad8 100644 --- a/sdk/resourcemanager/network/armnetwork/serviceendpointpolicydefinitions_client.go +++ b/sdk/resourcemanager/network/armnetwork/serviceendpointpolicydefinitions_client.go @@ -32,10 +32,10 @@ type ServiceEndpointPolicyDefinitionsClient struct { } // NewServiceEndpointPolicyDefinitionsClient creates a new instance of ServiceEndpointPolicyDefinitionsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewServiceEndpointPolicyDefinitionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceEndpointPolicyDefinitionsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewServiceEndpointPolicyDefinitionsClient(subscriptionID string, credential // BeginCreateOrUpdate - Creates or updates a service endpoint policy definition in the specified service endpoint policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// serviceEndpointPolicyName - The name of the service endpoint policy. -// serviceEndpointPolicyDefinitionName - The name of the service endpoint policy definition name. -// serviceEndpointPolicyDefinitions - Parameters supplied to the create or update service endpoint policy operation. -// options - ServiceEndpointPolicyDefinitionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - serviceEndpointPolicyName - The name of the service endpoint policy. +// - serviceEndpointPolicyDefinitionName - The name of the service endpoint policy definition name. +// - serviceEndpointPolicyDefinitions - Parameters supplied to the create or update service endpoint policy operation. +// - options - ServiceEndpointPolicyDefinitionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.BeginCreateOrUpdate +// method. func (client *ServiceEndpointPolicyDefinitionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, serviceEndpointPolicyDefinitions ServiceEndpointPolicyDefinition, options *ServiceEndpointPolicyDefinitionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, serviceEndpointPolicyDefinitions, options) @@ -81,6 +82,7 @@ func (client *ServiceEndpointPolicyDefinitionsClient) BeginCreateOrUpdate(ctx co // CreateOrUpdate - Creates or updates a service endpoint policy definition in the specified service endpoint policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ServiceEndpointPolicyDefinitionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, serviceEndpointPolicyDefinitions ServiceEndpointPolicyDefinition, options *ServiceEndpointPolicyDefinitionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, serviceEndpointPolicyDefinitions, options) @@ -129,12 +131,13 @@ func (client *ServiceEndpointPolicyDefinitionsClient) createOrUpdateCreateReques // BeginDelete - Deletes the specified ServiceEndpoint policy definitions. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// serviceEndpointPolicyName - The name of the Service Endpoint Policy. -// serviceEndpointPolicyDefinitionName - The name of the service endpoint policy definition. -// options - ServiceEndpointPolicyDefinitionsClientBeginDeleteOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - serviceEndpointPolicyName - The name of the Service Endpoint Policy. +// - serviceEndpointPolicyDefinitionName - The name of the service endpoint policy definition. +// - options - ServiceEndpointPolicyDefinitionsClientBeginDeleteOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.BeginDelete +// method. func (client *ServiceEndpointPolicyDefinitionsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, options *ServiceEndpointPolicyDefinitionsClientBeginDeleteOptions) (*runtime.Poller[ServiceEndpointPolicyDefinitionsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, options) @@ -151,6 +154,7 @@ func (client *ServiceEndpointPolicyDefinitionsClient) BeginDelete(ctx context.Co // Delete - Deletes the specified ServiceEndpoint policy definitions. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *ServiceEndpointPolicyDefinitionsClient) deleteOperation(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, options *ServiceEndpointPolicyDefinitionsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, options) @@ -199,12 +203,13 @@ func (client *ServiceEndpointPolicyDefinitionsClient) deleteCreateRequest(ctx co // Get - Get the specified service endpoint policy definitions from service endpoint policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// serviceEndpointPolicyName - The name of the service endpoint policy name. -// serviceEndpointPolicyDefinitionName - The name of the service endpoint policy definition name. -// options - ServiceEndpointPolicyDefinitionsClientGetOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - serviceEndpointPolicyName - The name of the service endpoint policy name. +// - serviceEndpointPolicyDefinitionName - The name of the service endpoint policy definition name. +// - options - ServiceEndpointPolicyDefinitionsClientGetOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.Get +// method. func (client *ServiceEndpointPolicyDefinitionsClient) Get(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, options *ServiceEndpointPolicyDefinitionsClientGetOptions) (ServiceEndpointPolicyDefinitionsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, options) if err != nil { @@ -260,11 +265,12 @@ func (client *ServiceEndpointPolicyDefinitionsClient) getHandleResponse(resp *ht } // NewListByResourceGroupPager - Gets all service endpoint policy definitions in a service end point policy. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// serviceEndpointPolicyName - The name of the service endpoint policy name. -// options - ServiceEndpointPolicyDefinitionsClientListByResourceGroupOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.ListByResourceGroup -// method. +// - resourceGroupName - The name of the resource group. +// - serviceEndpointPolicyName - The name of the service endpoint policy name. +// - options - ServiceEndpointPolicyDefinitionsClientListByResourceGroupOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.NewListByResourceGroupPager +// method. func (client *ServiceEndpointPolicyDefinitionsClient) NewListByResourceGroupPager(resourceGroupName string, serviceEndpointPolicyName string, options *ServiceEndpointPolicyDefinitionsClientListByResourceGroupOptions) *runtime.Pager[ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse]{ More: func(page ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/serviceendpointpolicydefinitions_client_example_test.go b/sdk/resourcemanager/network/armnetwork/serviceendpointpolicydefinitions_client_example_test.go deleted file mode 100644 index 4c246b70b280..000000000000 --- a/sdk/resourcemanager/network/armnetwork/serviceendpointpolicydefinitions_client_example_test.go +++ /dev/null @@ -1,114 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ServiceEndpointPolicyDefinitionDelete.json -func ExampleServiceEndpointPolicyDefinitionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewServiceEndpointPolicyDefinitionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "testPolicy", "testDefinition", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ServiceEndpointPolicyDefinitionGet.json -func ExampleServiceEndpointPolicyDefinitionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewServiceEndpointPolicyDefinitionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "testPolicy", "testDefinition", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ServiceEndpointPolicyDefinitionCreate.json -func ExampleServiceEndpointPolicyDefinitionsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewServiceEndpointPolicyDefinitionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "testPolicy", "testDefinition", armnetwork.ServiceEndpointPolicyDefinition{ - Properties: &armnetwork.ServiceEndpointPolicyDefinitionPropertiesFormat{ - Description: to.Ptr("Storage Service EndpointPolicy Definition"), - Service: to.Ptr("Microsoft.Storage"), - ServiceResources: []*string{ - to.Ptr("/subscriptions/subid1"), - to.Ptr("/subscriptions/subid1/resourceGroups/storageRg"), - to.Ptr("/subscriptions/subid1/resourceGroups/storageRg/providers/Microsoft.Storage/storageAccounts/stAccount")}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ServiceEndpointPolicyDefinitionList.json -func ExampleServiceEndpointPolicyDefinitionsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewServiceEndpointPolicyDefinitionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("rg1", "testPolicy", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/servicetaginformation_client.go b/sdk/resourcemanager/network/armnetwork/servicetaginformation_client.go index a8c546cac78a..aae75193a7b4 100644 --- a/sdk/resourcemanager/network/armnetwork/servicetaginformation_client.go +++ b/sdk/resourcemanager/network/armnetwork/servicetaginformation_client.go @@ -33,10 +33,10 @@ type ServiceTagInformationClient struct { } // NewServiceTagInformationClient creates a new instance of ServiceTagInformationClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewServiceTagInformationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceTagInformationClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewServiceTagInformationClient(subscriptionID string, credential azcore.Tok } // NewListPager - Gets a list of service tag information resources with pagination. +// // Generated from API version 2022-07-01 -// location - The location that will be used as a reference for cloud (not as a filter based on location, you will get the -// list of service tags with prefix details across all regions but limited to the cloud that -// your subscription belongs to). -// options - ServiceTagInformationClientListOptions contains the optional parameters for the ServiceTagInformationClient.List -// method. +// - location - The location that will be used as a reference for cloud (not as a filter based on location, you will get the +// list of service tags with prefix details across all regions but limited to the cloud that +// your subscription belongs to). +// - options - ServiceTagInformationClientListOptions contains the optional parameters for the ServiceTagInformationClient.NewListPager +// method. func (client *ServiceTagInformationClient) NewListPager(location string, options *ServiceTagInformationClientListOptions) *runtime.Pager[ServiceTagInformationClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ServiceTagInformationClientListResponse]{ More: func(page ServiceTagInformationClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/servicetaginformation_client_example_test.go b/sdk/resourcemanager/network/armnetwork/servicetaginformation_client_example_test.go deleted file mode 100644 index b734ff0143d0..000000000000 --- a/sdk/resourcemanager/network/armnetwork/servicetaginformation_client_example_test.go +++ /dev/null @@ -1,96 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ServiceTagInformationListResult.json -func ExampleServiceTagInformationClient_NewListPager_getListOfServiceTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewServiceTagInformationClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("westeurope", &armnetwork.ServiceTagInformationClientListOptions{NoAddressPrefixes: nil, - TagName: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ServiceTagInformationListResultWithNoAddressPrefixes.json -func ExampleServiceTagInformationClient_NewListPager_getListOfServiceTagsWithNoAddressPrefixes() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewServiceTagInformationClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("westeurope", &armnetwork.ServiceTagInformationClientListOptions{NoAddressPrefixes: to.Ptr(true), - TagName: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ServiceTagInformationListResultWithTagname.json -func ExampleServiceTagInformationClient_NewListPager_getListOfServiceTagsWithTagName() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewServiceTagInformationClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("westeurope", &armnetwork.ServiceTagInformationClientListOptions{NoAddressPrefixes: nil, - TagName: to.Ptr("ApiManagement"), - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/servicetags_client.go b/sdk/resourcemanager/network/armnetwork/servicetags_client.go index ed6e48f5a63e..bf30f0d7eebf 100644 --- a/sdk/resourcemanager/network/armnetwork/servicetags_client.go +++ b/sdk/resourcemanager/network/armnetwork/servicetags_client.go @@ -32,10 +32,10 @@ type ServiceTagsClient struct { } // NewServiceTagsClient creates a new instance of ServiceTagsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewServiceTagsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceTagsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,11 +58,12 @@ func NewServiceTagsClient(subscriptionID string, credential azcore.TokenCredenti // List - Gets a list of service tag information resources. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// location - The location that will be used as a reference for version (not as a filter based on location, you will get the -// list of service tags with prefix details across all regions but limited to the cloud that -// your subscription belongs to). -// options - ServiceTagsClientListOptions contains the optional parameters for the ServiceTagsClient.List method. +// - location - The location that will be used as a reference for version (not as a filter based on location, you will get the +// list of service tags with prefix details across all regions but limited to the cloud that +// your subscription belongs to). +// - options - ServiceTagsClientListOptions contains the optional parameters for the ServiceTagsClient.List method. func (client *ServiceTagsClient) List(ctx context.Context, location string, options *ServiceTagsClientListOptions) (ServiceTagsClientListResponse, error) { req, err := client.listCreateRequest(ctx, location, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/servicetags_client_example_test.go b/sdk/resourcemanager/network/armnetwork/servicetags_client_example_test.go deleted file mode 100644 index efab905f326c..000000000000 --- a/sdk/resourcemanager/network/armnetwork/servicetags_client_example_test.go +++ /dev/null @@ -1,36 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/ServiceTagsList.json -func ExampleServiceTagsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewServiceTagsClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.List(ctx, "westcentralus", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/staticmembers_client.go b/sdk/resourcemanager/network/armnetwork/staticmembers_client.go index 82a44b8b39f8..aef822d369bd 100644 --- a/sdk/resourcemanager/network/armnetwork/staticmembers_client.go +++ b/sdk/resourcemanager/network/armnetwork/staticmembers_client.go @@ -33,10 +33,10 @@ type StaticMembersClient struct { } // NewStaticMembersClient creates a new instance of StaticMembersClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewStaticMembersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StaticMembersClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -59,14 +59,15 @@ func NewStaticMembersClient(subscriptionID string, credential azcore.TokenCreden // CreateOrUpdate - Creates or updates a static member. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// networkGroupName - The name of the network group. -// staticMemberName - The name of the static member. -// parameters - Parameters supplied to the specify the static member to create -// options - StaticMembersClientCreateOrUpdateOptions contains the optional parameters for the StaticMembersClient.CreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - networkGroupName - The name of the network group. +// - staticMemberName - The name of the static member. +// - parameters - Parameters supplied to the specify the static member to create +// - options - StaticMembersClientCreateOrUpdateOptions contains the optional parameters for the StaticMembersClient.CreateOrUpdate +// method. func (client *StaticMembersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, staticMemberName string, parameters StaticMember, options *StaticMembersClientCreateOrUpdateOptions) (StaticMembersClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkManagerName, networkGroupName, staticMemberName, parameters, options) if err != nil { @@ -127,12 +128,13 @@ func (client *StaticMembersClient) createOrUpdateHandleResponse(resp *http.Respo // Delete - Deletes a static member. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// networkGroupName - The name of the network group. -// staticMemberName - The name of the static member. -// options - StaticMembersClientDeleteOptions contains the optional parameters for the StaticMembersClient.Delete method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - networkGroupName - The name of the network group. +// - staticMemberName - The name of the static member. +// - options - StaticMembersClientDeleteOptions contains the optional parameters for the StaticMembersClient.Delete method. func (client *StaticMembersClient) Delete(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, staticMemberName string, options *StaticMembersClientDeleteOptions) (StaticMembersClientDeleteResponse, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkManagerName, networkGroupName, staticMemberName, options) if err != nil { @@ -184,12 +186,13 @@ func (client *StaticMembersClient) deleteCreateRequest(ctx context.Context, reso // Get - Gets the specified static member. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// networkGroupName - The name of the network group. -// staticMemberName - The name of the static member. -// options - StaticMembersClientGetOptions contains the optional parameters for the StaticMembersClient.Get method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - networkGroupName - The name of the network group. +// - staticMemberName - The name of the static member. +// - options - StaticMembersClientGetOptions contains the optional parameters for the StaticMembersClient.Get method. func (client *StaticMembersClient) Get(ctx context.Context, resourceGroupName string, networkManagerName string, networkGroupName string, staticMemberName string, options *StaticMembersClientGetOptions) (StaticMembersClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, networkManagerName, networkGroupName, staticMemberName, options) if err != nil { @@ -249,11 +252,12 @@ func (client *StaticMembersClient) getHandleResponse(resp *http.Response) (Stati } // NewListPager - Lists the specified static member. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkManagerName - The name of the network manager. -// networkGroupName - The name of the network group. -// options - StaticMembersClientListOptions contains the optional parameters for the StaticMembersClient.List method. +// - resourceGroupName - The name of the resource group. +// - networkManagerName - The name of the network manager. +// - networkGroupName - The name of the network group. +// - options - StaticMembersClientListOptions contains the optional parameters for the StaticMembersClient.NewListPager method. func (client *StaticMembersClient) NewListPager(resourceGroupName string, networkManagerName string, networkGroupName string, options *StaticMembersClientListOptions) *runtime.Pager[StaticMembersClientListResponse] { return runtime.NewPager(runtime.PagingHandler[StaticMembersClientListResponse]{ More: func(page StaticMembersClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/staticmembers_client_example_test.go b/sdk/resourcemanager/network/armnetwork/staticmembers_client_example_test.go deleted file mode 100644 index 7a88d3f7093e..000000000000 --- a/sdk/resourcemanager/network/armnetwork/staticmembers_client_example_test.go +++ /dev/null @@ -1,103 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerStaticMemberGet.json -func ExampleStaticMembersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewStaticMembersClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "testNetworkManager", "testNetworkGroup", "testStaticMember", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerStaticMemberPut.json -func ExampleStaticMembersClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewStaticMembersClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, "rg1", "testNetworkManager", "testNetworkGroup", "testStaticMember", armnetwork.StaticMember{ - Properties: &armnetwork.StaticMemberProperties{ - ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroup/rg1/providers/Microsoft.Network/virtualnetworks/vnet1"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerStaticMemberDelete.json -func ExampleStaticMembersClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewStaticMembersClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, "SampleRG", "TestNM", "testNetworkGroup", "testStaticMember", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerStaticMemberList.json -func ExampleStaticMembersClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewStaticMembersClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", "testNetworkManager", "testNetworkGroup", &armnetwork.StaticMembersClientListOptions{Top: nil, - SkipToken: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/subnets_client.go b/sdk/resourcemanager/network/armnetwork/subnets_client.go index a55f57775935..a9de8ca273ce 100644 --- a/sdk/resourcemanager/network/armnetwork/subnets_client.go +++ b/sdk/resourcemanager/network/armnetwork/subnets_client.go @@ -32,10 +32,10 @@ type SubnetsClient struct { } // NewSubnetsClient creates a new instance of SubnetsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSubnetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SubnetsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewSubnetsClient(subscriptionID string, credential azcore.TokenCredential, // BeginCreateOrUpdate - Creates or updates a subnet in the specified virtual network. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// subnetName - The name of the subnet. -// subnetParameters - Parameters supplied to the create or update subnet operation. -// options - SubnetsClientBeginCreateOrUpdateOptions contains the optional parameters for the SubnetsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - subnetName - The name of the subnet. +// - subnetParameters - Parameters supplied to the create or update subnet operation. +// - options - SubnetsClientBeginCreateOrUpdateOptions contains the optional parameters for the SubnetsClient.BeginCreateOrUpdate +// method. func (client *SubnetsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, subnetParameters Subnet, options *SubnetsClientBeginCreateOrUpdateOptions) (*runtime.Poller[SubnetsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualNetworkName, subnetName, subnetParameters, options) @@ -81,6 +82,7 @@ func (client *SubnetsClient) BeginCreateOrUpdate(ctx context.Context, resourceGr // CreateOrUpdate - Creates or updates a subnet in the specified virtual network. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *SubnetsClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, subnetParameters Subnet, options *SubnetsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualNetworkName, subnetName, subnetParameters, options) @@ -129,11 +131,12 @@ func (client *SubnetsClient) createOrUpdateCreateRequest(ctx context.Context, re // BeginDelete - Deletes the specified subnet. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// subnetName - The name of the subnet. -// options - SubnetsClientBeginDeleteOptions contains the optional parameters for the SubnetsClient.BeginDelete method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - subnetName - The name of the subnet. +// - options - SubnetsClientBeginDeleteOptions contains the optional parameters for the SubnetsClient.BeginDelete method. func (client *SubnetsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, options *SubnetsClientBeginDeleteOptions) (*runtime.Poller[SubnetsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, virtualNetworkName, subnetName, options) @@ -150,6 +153,7 @@ func (client *SubnetsClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Deletes the specified subnet. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *SubnetsClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, options *SubnetsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualNetworkName, subnetName, options) @@ -198,11 +202,12 @@ func (client *SubnetsClient) deleteCreateRequest(ctx context.Context, resourceGr // Get - Gets the specified subnet by virtual network and resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// subnetName - The name of the subnet. -// options - SubnetsClientGetOptions contains the optional parameters for the SubnetsClient.Get method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - subnetName - The name of the subnet. +// - options - SubnetsClientGetOptions contains the optional parameters for the SubnetsClient.Get method. func (client *SubnetsClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, options *SubnetsClientGetOptions) (SubnetsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, virtualNetworkName, subnetName, options) if err != nil { @@ -261,10 +266,11 @@ func (client *SubnetsClient) getHandleResponse(resp *http.Response) (SubnetsClie } // NewListPager - Gets all subnets in a virtual network. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// options - SubnetsClientListOptions contains the optional parameters for the SubnetsClient.List method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - options - SubnetsClientListOptions contains the optional parameters for the SubnetsClient.NewListPager method. func (client *SubnetsClient) NewListPager(resourceGroupName string, virtualNetworkName string, options *SubnetsClientListOptions) *runtime.Pager[SubnetsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[SubnetsClientListResponse]{ More: func(page SubnetsClientListResponse) bool { @@ -330,13 +336,14 @@ func (client *SubnetsClient) listHandleResponse(resp *http.Response) (SubnetsCli // BeginPrepareNetworkPolicies - Prepares a subnet by applying network intent policies. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// subnetName - The name of the subnet. -// prepareNetworkPoliciesRequestParameters - Parameters supplied to prepare subnet by applying network intent policies. -// options - SubnetsClientBeginPrepareNetworkPoliciesOptions contains the optional parameters for the SubnetsClient.BeginPrepareNetworkPolicies -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - subnetName - The name of the subnet. +// - prepareNetworkPoliciesRequestParameters - Parameters supplied to prepare subnet by applying network intent policies. +// - options - SubnetsClientBeginPrepareNetworkPoliciesOptions contains the optional parameters for the SubnetsClient.BeginPrepareNetworkPolicies +// method. func (client *SubnetsClient) BeginPrepareNetworkPolicies(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, prepareNetworkPoliciesRequestParameters PrepareNetworkPoliciesRequest, options *SubnetsClientBeginPrepareNetworkPoliciesOptions) (*runtime.Poller[SubnetsClientPrepareNetworkPoliciesResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.prepareNetworkPolicies(ctx, resourceGroupName, virtualNetworkName, subnetName, prepareNetworkPoliciesRequestParameters, options) @@ -353,6 +360,7 @@ func (client *SubnetsClient) BeginPrepareNetworkPolicies(ctx context.Context, re // PrepareNetworkPolicies - Prepares a subnet by applying network intent policies. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *SubnetsClient) prepareNetworkPolicies(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, prepareNetworkPoliciesRequestParameters PrepareNetworkPoliciesRequest, options *SubnetsClientBeginPrepareNetworkPoliciesOptions) (*http.Response, error) { req, err := client.prepareNetworkPoliciesCreateRequest(ctx, resourceGroupName, virtualNetworkName, subnetName, prepareNetworkPoliciesRequestParameters, options) @@ -401,13 +409,14 @@ func (client *SubnetsClient) prepareNetworkPoliciesCreateRequest(ctx context.Con // BeginUnprepareNetworkPolicies - Unprepares a subnet by removing network intent policies. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// subnetName - The name of the subnet. -// unprepareNetworkPoliciesRequestParameters - Parameters supplied to unprepare subnet to remove network intent policies. -// options - SubnetsClientBeginUnprepareNetworkPoliciesOptions contains the optional parameters for the SubnetsClient.BeginUnprepareNetworkPolicies -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - subnetName - The name of the subnet. +// - unprepareNetworkPoliciesRequestParameters - Parameters supplied to unprepare subnet to remove network intent policies. +// - options - SubnetsClientBeginUnprepareNetworkPoliciesOptions contains the optional parameters for the SubnetsClient.BeginUnprepareNetworkPolicies +// method. func (client *SubnetsClient) BeginUnprepareNetworkPolicies(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, unprepareNetworkPoliciesRequestParameters UnprepareNetworkPoliciesRequest, options *SubnetsClientBeginUnprepareNetworkPoliciesOptions) (*runtime.Poller[SubnetsClientUnprepareNetworkPoliciesResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.unprepareNetworkPolicies(ctx, resourceGroupName, virtualNetworkName, subnetName, unprepareNetworkPoliciesRequestParameters, options) @@ -424,6 +433,7 @@ func (client *SubnetsClient) BeginUnprepareNetworkPolicies(ctx context.Context, // UnprepareNetworkPolicies - Unprepares a subnet by removing network intent policies. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *SubnetsClient) unprepareNetworkPolicies(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, unprepareNetworkPoliciesRequestParameters UnprepareNetworkPoliciesRequest, options *SubnetsClientBeginUnprepareNetworkPoliciesOptions) (*http.Response, error) { req, err := client.unprepareNetworkPoliciesCreateRequest(ctx, resourceGroupName, virtualNetworkName, subnetName, unprepareNetworkPoliciesRequestParameters, options) diff --git a/sdk/resourcemanager/network/armnetwork/subnets_client_example_test.go b/sdk/resourcemanager/network/armnetwork/subnets_client_example_test.go deleted file mode 100644 index 765aa1464145..000000000000 --- a/sdk/resourcemanager/network/armnetwork/subnets_client_example_test.go +++ /dev/null @@ -1,232 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/SubnetDelete.json -func ExampleSubnetsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSubnetsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "subnet-test", "vnetname", "subnet1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/SubnetGet.json -func ExampleSubnetsClient_Get_getSubnet() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSubnetsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "subnet-test", "vnetname", "subnet1", &armnetwork.SubnetsClientGetOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/SubnetGetWithDelegation.json -func ExampleSubnetsClient_Get_getSubnetWithADelegation() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSubnetsClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "subnet-test", "vnetname", "subnet1", &armnetwork.SubnetsClientGetOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/SubnetCreate.json -func ExampleSubnetsClient_BeginCreateOrUpdate_createSubnet() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSubnetsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "subnet-test", "vnetname", "subnet1", armnetwork.Subnet{ - Properties: &armnetwork.SubnetPropertiesFormat{ - AddressPrefix: to.Ptr("10.0.0.0/16"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/SubnetCreateWithDelegation.json -func ExampleSubnetsClient_BeginCreateOrUpdate_createSubnetWithADelegation() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSubnetsClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "subnet-test", "vnetname", "subnet1", armnetwork.Subnet{ - Properties: &armnetwork.SubnetPropertiesFormat{ - AddressPrefix: to.Ptr("10.0.0.0/16"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/SubnetCreateServiceEndpoint.json -func ExampleSubnetsClient_BeginCreateOrUpdate_createSubnetWithServiceEndpoints() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSubnetsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "subnet-test", "vnetname", "subnet1", armnetwork.Subnet{ - Properties: &armnetwork.SubnetPropertiesFormat{ - AddressPrefix: to.Ptr("10.0.0.0/16"), - ServiceEndpoints: []*armnetwork.ServiceEndpointPropertiesFormat{ - { - Service: to.Ptr("Microsoft.Storage"), - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/SubnetPrepareNetworkPolicies.json -func ExampleSubnetsClient_BeginPrepareNetworkPolicies() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSubnetsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginPrepareNetworkPolicies(ctx, "rg1", "test-vnet", "subnet1", armnetwork.PrepareNetworkPoliciesRequest{ - ServiceName: to.Ptr("Microsoft.Sql/managedInstances"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/SubnetUnprepareNetworkPolicies.json -func ExampleSubnetsClient_BeginUnprepareNetworkPolicies() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSubnetsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUnprepareNetworkPolicies(ctx, "rg1", "test-vnet", "subnet1", armnetwork.UnprepareNetworkPoliciesRequest{ - ServiceName: to.Ptr("Microsoft.Sql/managedInstances"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/SubnetList.json -func ExampleSubnetsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSubnetsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("subnet-test", "vnetname", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/subscriptionnetworkmanagerconnections_client.go b/sdk/resourcemanager/network/armnetwork/subscriptionnetworkmanagerconnections_client.go index db875f00ea42..49c2b294db51 100644 --- a/sdk/resourcemanager/network/armnetwork/subscriptionnetworkmanagerconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/subscriptionnetworkmanagerconnections_client.go @@ -33,10 +33,10 @@ type SubscriptionNetworkManagerConnectionsClient struct { } // NewSubscriptionNetworkManagerConnectionsClient creates a new instance of SubscriptionNetworkManagerConnectionsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewSubscriptionNetworkManagerConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SubscriptionNetworkManagerConnectionsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -59,11 +59,12 @@ func NewSubscriptionNetworkManagerConnectionsClient(subscriptionID string, crede // CreateOrUpdate - Create a network manager connection on this subscription. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// networkManagerConnectionName - Name for the network manager connection. -// parameters - Network manager connection to be created/updated. -// options - SubscriptionNetworkManagerConnectionsClientCreateOrUpdateOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.CreateOrUpdate -// method. +// - networkManagerConnectionName - Name for the network manager connection. +// - parameters - Network manager connection to be created/updated. +// - options - SubscriptionNetworkManagerConnectionsClientCreateOrUpdateOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.CreateOrUpdate +// method. func (client *SubscriptionNetworkManagerConnectionsClient) CreateOrUpdate(ctx context.Context, networkManagerConnectionName string, parameters ManagerConnection, options *SubscriptionNetworkManagerConnectionsClientCreateOrUpdateOptions) (SubscriptionNetworkManagerConnectionsClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, networkManagerConnectionName, parameters, options) if err != nil { @@ -112,10 +113,11 @@ func (client *SubscriptionNetworkManagerConnectionsClient) createOrUpdateHandleR // Delete - Delete specified connection created by this subscription. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// networkManagerConnectionName - Name for the network manager connection. -// options - SubscriptionNetworkManagerConnectionsClientDeleteOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.Delete -// method. +// - networkManagerConnectionName - Name for the network manager connection. +// - options - SubscriptionNetworkManagerConnectionsClientDeleteOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.Delete +// method. func (client *SubscriptionNetworkManagerConnectionsClient) Delete(ctx context.Context, networkManagerConnectionName string, options *SubscriptionNetworkManagerConnectionsClientDeleteOptions) (SubscriptionNetworkManagerConnectionsClientDeleteResponse, error) { req, err := client.deleteCreateRequest(ctx, networkManagerConnectionName, options) if err != nil { @@ -155,10 +157,11 @@ func (client *SubscriptionNetworkManagerConnectionsClient) deleteCreateRequest(c // Get - Get a specified connection created by this subscription. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// networkManagerConnectionName - Name for the network manager connection. -// options - SubscriptionNetworkManagerConnectionsClientGetOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.Get -// method. +// - networkManagerConnectionName - Name for the network manager connection. +// - options - SubscriptionNetworkManagerConnectionsClientGetOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.Get +// method. func (client *SubscriptionNetworkManagerConnectionsClient) Get(ctx context.Context, networkManagerConnectionName string, options *SubscriptionNetworkManagerConnectionsClientGetOptions) (SubscriptionNetworkManagerConnectionsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, networkManagerConnectionName, options) if err != nil { @@ -206,9 +209,10 @@ func (client *SubscriptionNetworkManagerConnectionsClient) getHandleResponse(res } // NewListPager - List all network manager connections created by this subscription. +// // Generated from API version 2022-07-01 -// options - SubscriptionNetworkManagerConnectionsClientListOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.List -// method. +// - options - SubscriptionNetworkManagerConnectionsClientListOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.NewListPager +// method. func (client *SubscriptionNetworkManagerConnectionsClient) NewListPager(options *SubscriptionNetworkManagerConnectionsClientListOptions) *runtime.Pager[SubscriptionNetworkManagerConnectionsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[SubscriptionNetworkManagerConnectionsClientListResponse]{ More: func(page SubscriptionNetworkManagerConnectionsClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/subscriptionnetworkmanagerconnections_client_example_test.go b/sdk/resourcemanager/network/armnetwork/subscriptionnetworkmanagerconnections_client_example_test.go deleted file mode 100644 index b6f8c0bed10b..000000000000 --- a/sdk/resourcemanager/network/armnetwork/subscriptionnetworkmanagerconnections_client_example_test.go +++ /dev/null @@ -1,103 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerConnectionSubscriptionPut.json -func ExampleSubscriptionNetworkManagerConnectionsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSubscriptionNetworkManagerConnectionsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, "TestNMConnection", armnetwork.ManagerConnection{ - Properties: &armnetwork.ManagerConnectionProperties{ - NetworkManagerID: to.Ptr("/subscriptions/subscriptionC/resourceGroup/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerConnectionSubscriptionGet.json -func ExampleSubscriptionNetworkManagerConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSubscriptionNetworkManagerConnectionsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "TestNMConnection", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerConnectionSubscriptionDelete.json -func ExampleSubscriptionNetworkManagerConnectionsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSubscriptionNetworkManagerConnectionsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, "TestNMConnection", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkManagerConnectionSubscriptionList.json -func ExampleSubscriptionNetworkManagerConnectionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewSubscriptionNetworkManagerConnectionsClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(&armnetwork.SubscriptionNetworkManagerConnectionsClientListOptions{Top: nil, - SkipToken: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/time_rfc3339.go b/sdk/resourcemanager/network/armnetwork/time_rfc3339.go index c9d8a00ef3c9..6da2de17a36a 100644 --- a/sdk/resourcemanager/network/armnetwork/time_rfc3339.go +++ b/sdk/resourcemanager/network/armnetwork/time_rfc3339.go @@ -62,7 +62,7 @@ func (t *timeRFC3339) Parse(layout, value string) error { return err } -func populateTimeRFC3339(m map[string]interface{}, k string, t *time.Time) { +func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { diff --git a/sdk/resourcemanager/network/armnetwork/usages_client.go b/sdk/resourcemanager/network/armnetwork/usages_client.go index 31517fa5b36d..eeaf2387283b 100644 --- a/sdk/resourcemanager/network/armnetwork/usages_client.go +++ b/sdk/resourcemanager/network/armnetwork/usages_client.go @@ -32,10 +32,10 @@ type UsagesClient struct { } // NewUsagesClient creates a new instance of UsagesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UsagesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,9 +57,10 @@ func NewUsagesClient(subscriptionID string, credential azcore.TokenCredential, o } // NewListPager - List network usages for a subscription. +// // Generated from API version 2022-07-01 -// location - The location where resource usage is queried. -// options - UsagesClientListOptions contains the optional parameters for the UsagesClient.List method. +// - location - The location where resource usage is queried. +// - options - UsagesClientListOptions contains the optional parameters for the UsagesClient.NewListPager method. func (client *UsagesClient) NewListPager(location string, options *UsagesClientListOptions) *runtime.Pager[UsagesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[UsagesClientListResponse]{ More: func(page UsagesClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/usages_client_example_test.go b/sdk/resourcemanager/network/armnetwork/usages_client_example_test.go deleted file mode 100644 index 03e29fe4985d..000000000000 --- a/sdk/resourcemanager/network/armnetwork/usages_client_example_test.go +++ /dev/null @@ -1,65 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/UsageList.json -func ExampleUsagesClient_NewListPager_listUsages() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewUsagesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("westus", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/UsageListSpacedLocation.json -func ExampleUsagesClient_NewListPager_listUsagesSpacedLocation() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewUsagesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("West US", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/vipswap_client.go b/sdk/resourcemanager/network/armnetwork/vipswap_client.go index 76e0dced6e1f..3c640d2ca4ad 100644 --- a/sdk/resourcemanager/network/armnetwork/vipswap_client.go +++ b/sdk/resourcemanager/network/armnetwork/vipswap_client.go @@ -32,10 +32,10 @@ type VipSwapClient struct { } // NewVipSwapClient creates a new instance of VipSwapClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewVipSwapClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VipSwapClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,11 +58,12 @@ func NewVipSwapClient(subscriptionID string, credential azcore.TokenCredential, // BeginCreate - Performs vip swap operation on swappable cloud services. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// groupName - The name of the resource group. -// resourceName - The name of the cloud service. -// parameters - SwapResource object where slot type should be the target slot after vip swap for the specified cloud service. -// options - VipSwapClientBeginCreateOptions contains the optional parameters for the VipSwapClient.BeginCreate method. +// - groupName - The name of the resource group. +// - resourceName - The name of the cloud service. +// - parameters - SwapResource object where slot type should be the target slot after vip swap for the specified cloud service. +// - options - VipSwapClientBeginCreateOptions contains the optional parameters for the VipSwapClient.BeginCreate method. func (client *VipSwapClient) BeginCreate(ctx context.Context, groupName string, resourceName string, parameters SwapResource, options *VipSwapClientBeginCreateOptions) (*runtime.Poller[VipSwapClientCreateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.create(ctx, groupName, resourceName, parameters, options) @@ -77,6 +78,7 @@ func (client *VipSwapClient) BeginCreate(ctx context.Context, groupName string, // Create - Performs vip swap operation on swappable cloud services. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VipSwapClient) create(ctx context.Context, groupName string, resourceName string, parameters SwapResource, options *VipSwapClientBeginCreateOptions) (*http.Response, error) { req, err := client.createCreateRequest(ctx, groupName, resourceName, parameters, options) @@ -123,10 +125,11 @@ func (client *VipSwapClient) createCreateRequest(ctx context.Context, groupName // Get - Gets the SwapResource which identifies the slot type for the specified cloud service. The slot type on a cloud service // can either be Staging or Production // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// groupName - The name of the resource group. -// resourceName - The name of the cloud service. -// options - VipSwapClientGetOptions contains the optional parameters for the VipSwapClient.Get method. +// - groupName - The name of the resource group. +// - resourceName - The name of the cloud service. +// - options - VipSwapClientGetOptions contains the optional parameters for the VipSwapClient.Get method. func (client *VipSwapClient) Get(ctx context.Context, groupName string, resourceName string, options *VipSwapClientGetOptions) (VipSwapClientGetResponse, error) { req, err := client.getCreateRequest(ctx, groupName, resourceName, options) if err != nil { @@ -181,10 +184,11 @@ func (client *VipSwapClient) getHandleResponse(resp *http.Response) (VipSwapClie // List - Gets the list of SwapResource which identifies the slot type for the specified cloud service. The slot type on a // cloud service can either be Staging or Production // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// groupName - The name of the resource group. -// resourceName - The name of the cloud service. -// options - VipSwapClientListOptions contains the optional parameters for the VipSwapClient.List method. +// - groupName - The name of the resource group. +// - resourceName - The name of the cloud service. +// - options - VipSwapClientListOptions contains the optional parameters for the VipSwapClient.List method. func (client *VipSwapClient) List(ctx context.Context, groupName string, resourceName string, options *VipSwapClientListOptions) (VipSwapClientListResponse, error) { req, err := client.listCreateRequest(ctx, groupName, resourceName, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/vipswap_client_example_test.go b/sdk/resourcemanager/network/armnetwork/vipswap_client_example_test.go deleted file mode 100644 index fae4916a89be..000000000000 --- a/sdk/resourcemanager/network/armnetwork/vipswap_client_example_test.go +++ /dev/null @@ -1,81 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/CloudServiceSwapGet.json -func ExampleVipSwapClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVipSwapClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "testCloudService", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/CloudServiceSwapPut.json -func ExampleVipSwapClient_BeginCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVipSwapClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreate(ctx, "rg1", "testCloudService", armnetwork.SwapResource{ - Properties: &armnetwork.SwapResourceProperties{ - SlotType: to.Ptr(armnetwork.SlotTypeProduction), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/CloudServiceSwapList.json -func ExampleVipSwapClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVipSwapClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.List(ctx, "rg1", "testCloudService", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/virtualappliances_client.go b/sdk/resourcemanager/network/armnetwork/virtualappliances_client.go index 8c5eb145e853..deff7f1236a7 100644 --- a/sdk/resourcemanager/network/armnetwork/virtualappliances_client.go +++ b/sdk/resourcemanager/network/armnetwork/virtualappliances_client.go @@ -32,10 +32,10 @@ type VirtualAppliancesClient struct { } // NewVirtualAppliancesClient creates a new instance of VirtualAppliancesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewVirtualAppliancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualAppliancesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewVirtualAppliancesClient(subscriptionID string, credential azcore.TokenCr // BeginCreateOrUpdate - Creates or updates the specified Network Virtual Appliance. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkVirtualApplianceName - The name of Network Virtual Appliance. -// parameters - Parameters supplied to the create or update Network Virtual Appliance. -// options - VirtualAppliancesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualAppliancesClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - networkVirtualApplianceName - The name of Network Virtual Appliance. +// - parameters - Parameters supplied to the create or update Network Virtual Appliance. +// - options - VirtualAppliancesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualAppliancesClient.BeginCreateOrUpdate +// method. func (client *VirtualAppliancesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, parameters VirtualAppliance, options *VirtualAppliancesClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualAppliancesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, networkVirtualApplianceName, parameters, options) @@ -80,6 +81,7 @@ func (client *VirtualAppliancesClient) BeginCreateOrUpdate(ctx context.Context, // CreateOrUpdate - Creates or updates the specified Network Virtual Appliance. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualAppliancesClient) createOrUpdate(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, parameters VirtualAppliance, options *VirtualAppliancesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, parameters, options) @@ -124,11 +126,12 @@ func (client *VirtualAppliancesClient) createOrUpdateCreateRequest(ctx context.C // BeginDelete - Deletes the specified Network Virtual Appliance. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkVirtualApplianceName - The name of Network Virtual Appliance. -// options - VirtualAppliancesClientBeginDeleteOptions contains the optional parameters for the VirtualAppliancesClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - networkVirtualApplianceName - The name of Network Virtual Appliance. +// - options - VirtualAppliancesClientBeginDeleteOptions contains the optional parameters for the VirtualAppliancesClient.BeginDelete +// method. func (client *VirtualAppliancesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, options *VirtualAppliancesClientBeginDeleteOptions) (*runtime.Poller[VirtualAppliancesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, networkVirtualApplianceName, options) @@ -145,6 +148,7 @@ func (client *VirtualAppliancesClient) BeginDelete(ctx context.Context, resource // Delete - Deletes the specified Network Virtual Appliance. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualAppliancesClient) deleteOperation(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, options *VirtualAppliancesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, options) @@ -189,10 +193,11 @@ func (client *VirtualAppliancesClient) deleteCreateRequest(ctx context.Context, // Get - Gets the specified Network Virtual Appliance. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkVirtualApplianceName - The name of Network Virtual Appliance. -// options - VirtualAppliancesClientGetOptions contains the optional parameters for the VirtualAppliancesClient.Get method. +// - resourceGroupName - The name of the resource group. +// - networkVirtualApplianceName - The name of Network Virtual Appliance. +// - options - VirtualAppliancesClientGetOptions contains the optional parameters for the VirtualAppliancesClient.Get method. func (client *VirtualAppliancesClient) Get(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, options *VirtualAppliancesClientGetOptions) (VirtualAppliancesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, options) if err != nil { @@ -247,8 +252,10 @@ func (client *VirtualAppliancesClient) getHandleResponse(resp *http.Response) (V } // NewListPager - Gets all Network Virtual Appliances in a subscription. +// // Generated from API version 2022-07-01 -// options - VirtualAppliancesClientListOptions contains the optional parameters for the VirtualAppliancesClient.List method. +// - options - VirtualAppliancesClientListOptions contains the optional parameters for the VirtualAppliancesClient.NewListPager +// method. func (client *VirtualAppliancesClient) NewListPager(options *VirtualAppliancesClientListOptions) *runtime.Pager[VirtualAppliancesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[VirtualAppliancesClientListResponse]{ More: func(page VirtualAppliancesClientListResponse) bool { @@ -305,10 +312,11 @@ func (client *VirtualAppliancesClient) listHandleResponse(resp *http.Response) ( } // NewListByResourceGroupPager - Lists all Network Virtual Appliances in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - VirtualAppliancesClientListByResourceGroupOptions contains the optional parameters for the VirtualAppliancesClient.ListByResourceGroup -// method. +// - resourceGroupName - The name of the resource group. +// - options - VirtualAppliancesClientListByResourceGroupOptions contains the optional parameters for the VirtualAppliancesClient.NewListByResourceGroupPager +// method. func (client *VirtualAppliancesClient) NewListByResourceGroupPager(resourceGroupName string, options *VirtualAppliancesClientListByResourceGroupOptions) *runtime.Pager[VirtualAppliancesClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[VirtualAppliancesClientListByResourceGroupResponse]{ More: func(page VirtualAppliancesClientListByResourceGroupResponse) bool { @@ -370,12 +378,13 @@ func (client *VirtualAppliancesClient) listByResourceGroupHandleResponse(resp *h // UpdateTags - Updates a Network Virtual Appliance. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of Network Virtual Appliance. -// networkVirtualApplianceName - The name of Network Virtual Appliance being updated. -// parameters - Parameters supplied to Update Network Virtual Appliance Tags. -// options - VirtualAppliancesClientUpdateTagsOptions contains the optional parameters for the VirtualAppliancesClient.UpdateTags -// method. +// - resourceGroupName - The resource group name of Network Virtual Appliance. +// - networkVirtualApplianceName - The name of Network Virtual Appliance being updated. +// - parameters - Parameters supplied to Update Network Virtual Appliance Tags. +// - options - VirtualAppliancesClientUpdateTagsOptions contains the optional parameters for the VirtualAppliancesClient.UpdateTags +// method. func (client *VirtualAppliancesClient) UpdateTags(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, parameters TagsObject, options *VirtualAppliancesClientUpdateTagsOptions) (VirtualAppliancesClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/virtualappliances_client_example_test.go b/sdk/resourcemanager/network/armnetwork/virtualappliances_client_example_test.go deleted file mode 100644 index 52544699a4fa..000000000000 --- a/sdk/resourcemanager/network/armnetwork/virtualappliances_client_example_test.go +++ /dev/null @@ -1,215 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkVirtualApplianceDelete.json -func ExampleVirtualAppliancesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualAppliancesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "nva", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkVirtualApplianceGet.json -func ExampleVirtualAppliancesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualAppliancesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "nva", &armnetwork.VirtualAppliancesClientGetOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkVirtualApplianceUpdateTags.json -func ExampleVirtualAppliancesClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualAppliancesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, "rg1", "nva", armnetwork.TagsObject{ - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - "key2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkVirtualAppliancePut.json -func ExampleVirtualAppliancesClient_BeginCreateOrUpdate_createNetworkVirtualAppliance() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualAppliancesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "nva", armnetwork.VirtualAppliance{ - Location: to.Ptr("West US"), - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - }, - Identity: &armnetwork.ManagedServiceIdentity{ - Type: to.Ptr(armnetwork.ResourceIdentityTypeUserAssigned), - UserAssignedIdentities: map[string]*armnetwork.Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties{ - "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {}, - }, - }, - Properties: &armnetwork.VirtualAppliancePropertiesFormat{ - BootStrapConfigurationBlobs: []*string{ - to.Ptr("https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig")}, - CloudInitConfigurationBlobs: []*string{ - to.Ptr("https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig")}, - NvaSKU: &armnetwork.VirtualApplianceSKUProperties{ - BundledScaleUnit: to.Ptr("1"), - MarketPlaceVersion: to.Ptr("12.1"), - Vendor: to.Ptr("Cisco SDWAN"), - }, - VirtualApplianceAsn: to.Ptr[int64](10000), - VirtualHub: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkVirtualApplianceSaaSPut.json -func ExampleVirtualAppliancesClient_BeginCreateOrUpdate_createSaaSNetworkVirtualAppliance() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualAppliancesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "nva", armnetwork.VirtualAppliance{ - Location: to.Ptr("West US"), - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - }, - Properties: &armnetwork.VirtualAppliancePropertiesFormat{ - Delegation: &armnetwork.DelegationProperties{ - ServiceName: to.Ptr("PaloAltoNetworks.Cloudngfw/firewalls"), - }, - VirtualHub: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkVirtualApplianceListByResourceGroup.json -func ExampleVirtualAppliancesClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualAppliancesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkVirtualApplianceListBySubscription.json -func ExampleVirtualAppliancesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualAppliancesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/virtualappliancesites_client.go b/sdk/resourcemanager/network/armnetwork/virtualappliancesites_client.go index bf5298620f0e..13e28796ed1e 100644 --- a/sdk/resourcemanager/network/armnetwork/virtualappliancesites_client.go +++ b/sdk/resourcemanager/network/armnetwork/virtualappliancesites_client.go @@ -32,10 +32,10 @@ type VirtualApplianceSitesClient struct { } // NewVirtualApplianceSitesClient creates a new instance of VirtualApplianceSitesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewVirtualApplianceSitesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualApplianceSitesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewVirtualApplianceSitesClient(subscriptionID string, credential azcore.Tok // BeginCreateOrUpdate - Creates or updates the specified Network Virtual Appliance Site. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkVirtualApplianceName - The name of the Network Virtual Appliance. -// siteName - The name of the site. -// parameters - Parameters supplied to the create or update Network Virtual Appliance Site operation. -// options - VirtualApplianceSitesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualApplianceSitesClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - networkVirtualApplianceName - The name of the Network Virtual Appliance. +// - siteName - The name of the site. +// - parameters - Parameters supplied to the create or update Network Virtual Appliance Site operation. +// - options - VirtualApplianceSitesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualApplianceSitesClient.BeginCreateOrUpdate +// method. func (client *VirtualApplianceSitesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string, parameters VirtualApplianceSite, options *VirtualApplianceSitesClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualApplianceSitesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, networkVirtualApplianceName, siteName, parameters, options) @@ -81,6 +82,7 @@ func (client *VirtualApplianceSitesClient) BeginCreateOrUpdate(ctx context.Conte // CreateOrUpdate - Creates or updates the specified Network Virtual Appliance Site. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualApplianceSitesClient) createOrUpdate(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string, parameters VirtualApplianceSite, options *VirtualApplianceSitesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, siteName, parameters, options) @@ -129,12 +131,13 @@ func (client *VirtualApplianceSitesClient) createOrUpdateCreateRequest(ctx conte // BeginDelete - Deletes the specified site from a Virtual Appliance. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkVirtualApplianceName - The name of the Network Virtual Appliance. -// siteName - The name of the site. -// options - VirtualApplianceSitesClientBeginDeleteOptions contains the optional parameters for the VirtualApplianceSitesClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - networkVirtualApplianceName - The name of the Network Virtual Appliance. +// - siteName - The name of the site. +// - options - VirtualApplianceSitesClientBeginDeleteOptions contains the optional parameters for the VirtualApplianceSitesClient.BeginDelete +// method. func (client *VirtualApplianceSitesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string, options *VirtualApplianceSitesClientBeginDeleteOptions) (*runtime.Poller[VirtualApplianceSitesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, networkVirtualApplianceName, siteName, options) @@ -151,6 +154,7 @@ func (client *VirtualApplianceSitesClient) BeginDelete(ctx context.Context, reso // Delete - Deletes the specified site from a Virtual Appliance. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualApplianceSitesClient) deleteOperation(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string, options *VirtualApplianceSitesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, siteName, options) @@ -199,12 +203,13 @@ func (client *VirtualApplianceSitesClient) deleteCreateRequest(ctx context.Conte // Get - Gets the specified Virtual Appliance Site. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkVirtualApplianceName - The name of the Network Virtual Appliance. -// siteName - The name of the site. -// options - VirtualApplianceSitesClientGetOptions contains the optional parameters for the VirtualApplianceSitesClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - networkVirtualApplianceName - The name of the Network Virtual Appliance. +// - siteName - The name of the site. +// - options - VirtualApplianceSitesClientGetOptions contains the optional parameters for the VirtualApplianceSitesClient.Get +// method. func (client *VirtualApplianceSitesClient) Get(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string, options *VirtualApplianceSitesClientGetOptions) (VirtualApplianceSitesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, siteName, options) if err != nil { @@ -260,11 +265,12 @@ func (client *VirtualApplianceSitesClient) getHandleResponse(resp *http.Response } // NewListPager - Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkVirtualApplianceName - The name of the Network Virtual Appliance. -// options - VirtualApplianceSitesClientListOptions contains the optional parameters for the VirtualApplianceSitesClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - networkVirtualApplianceName - The name of the Network Virtual Appliance. +// - options - VirtualApplianceSitesClientListOptions contains the optional parameters for the VirtualApplianceSitesClient.NewListPager +// method. func (client *VirtualApplianceSitesClient) NewListPager(resourceGroupName string, networkVirtualApplianceName string, options *VirtualApplianceSitesClientListOptions) *runtime.Pager[VirtualApplianceSitesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[VirtualApplianceSitesClientListResponse]{ More: func(page VirtualApplianceSitesClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/virtualappliancesites_client_example_test.go b/sdk/resourcemanager/network/armnetwork/virtualappliancesites_client_example_test.go deleted file mode 100644 index 56ad5e515140..000000000000 --- a/sdk/resourcemanager/network/armnetwork/virtualappliancesites_client_example_test.go +++ /dev/null @@ -1,116 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkVirtualApplianceSiteDelete.json -func ExampleVirtualApplianceSitesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualApplianceSitesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "nva", "site1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkVirtualApplianceSiteGet.json -func ExampleVirtualApplianceSitesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualApplianceSitesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "nva", "site1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkVirtualApplianceSitePut.json -func ExampleVirtualApplianceSitesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualApplianceSitesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "nva", "site1", armnetwork.VirtualApplianceSite{ - Properties: &armnetwork.VirtualApplianceSiteProperties{ - AddressPrefix: to.Ptr("192.168.1.0/24"), - O365Policy: &armnetwork.Office365PolicyProperties{ - BreakOutCategories: &armnetwork.BreakOutCategoryPolicies{ - Default: to.Ptr(true), - Allow: to.Ptr(true), - Optimize: to.Ptr(true), - }, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkVirtualApplianceSiteList.json -func ExampleVirtualApplianceSitesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualApplianceSitesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", "nva", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/virtualapplianceskus_client.go b/sdk/resourcemanager/network/armnetwork/virtualapplianceskus_client.go index 294f409bb3f7..68fef5e7a773 100644 --- a/sdk/resourcemanager/network/armnetwork/virtualapplianceskus_client.go +++ b/sdk/resourcemanager/network/armnetwork/virtualapplianceskus_client.go @@ -32,10 +32,10 @@ type VirtualApplianceSKUsClient struct { } // NewVirtualApplianceSKUsClient creates a new instance of VirtualApplianceSKUsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewVirtualApplianceSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualApplianceSKUsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,10 +58,11 @@ func NewVirtualApplianceSKUsClient(subscriptionID string, credential azcore.Toke // Get - Retrieves a single available sku for network virtual appliance. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// skuName - Name of the Sku. -// options - VirtualApplianceSKUsClientGetOptions contains the optional parameters for the VirtualApplianceSKUsClient.Get -// method. +// - skuName - Name of the Sku. +// - options - VirtualApplianceSKUsClientGetOptions contains the optional parameters for the VirtualApplianceSKUsClient.Get +// method. func (client *VirtualApplianceSKUsClient) Get(ctx context.Context, skuName string, options *VirtualApplianceSKUsClientGetOptions) (VirtualApplianceSKUsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, skuName, options) if err != nil { @@ -109,9 +110,10 @@ func (client *VirtualApplianceSKUsClient) getHandleResponse(resp *http.Response) } // NewListPager - List all SKUs available for a virtual appliance. +// // Generated from API version 2022-07-01 -// options - VirtualApplianceSKUsClientListOptions contains the optional parameters for the VirtualApplianceSKUsClient.List -// method. +// - options - VirtualApplianceSKUsClientListOptions contains the optional parameters for the VirtualApplianceSKUsClient.NewListPager +// method. func (client *VirtualApplianceSKUsClient) NewListPager(options *VirtualApplianceSKUsClientListOptions) *runtime.Pager[VirtualApplianceSKUsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[VirtualApplianceSKUsClientListResponse]{ More: func(page VirtualApplianceSKUsClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/virtualapplianceskus_client_example_test.go b/sdk/resourcemanager/network/armnetwork/virtualapplianceskus_client_example_test.go deleted file mode 100644 index c5be1e4e93a8..000000000000 --- a/sdk/resourcemanager/network/armnetwork/virtualapplianceskus_client_example_test.go +++ /dev/null @@ -1,60 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkVirtualApplianceSkuList.json -func ExampleVirtualApplianceSKUsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualApplianceSKUsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkVirtualApplianceSkuGet.json -func ExampleVirtualApplianceSKUsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualApplianceSKUsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "ciscoSdwan", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/virtualhubbgpconnection_client.go b/sdk/resourcemanager/network/armnetwork/virtualhubbgpconnection_client.go index 930b7272d911..44a5cf797a2e 100644 --- a/sdk/resourcemanager/network/armnetwork/virtualhubbgpconnection_client.go +++ b/sdk/resourcemanager/network/armnetwork/virtualhubbgpconnection_client.go @@ -32,10 +32,10 @@ type VirtualHubBgpConnectionClient struct { } // NewVirtualHubBgpConnectionClient creates a new instance of VirtualHubBgpConnectionClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewVirtualHubBgpConnectionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualHubBgpConnectionClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewVirtualHubBgpConnectionClient(subscriptionID string, credential azcore.T // BeginCreateOrUpdate - Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// connectionName - The name of the connection. -// parameters - Parameters of Bgp connection. -// options - VirtualHubBgpConnectionClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubBgpConnectionClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - connectionName - The name of the connection. +// - parameters - Parameters of Bgp connection. +// - options - VirtualHubBgpConnectionClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubBgpConnectionClient.BeginCreateOrUpdate +// method. func (client *VirtualHubBgpConnectionClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, parameters BgpConnection, options *VirtualHubBgpConnectionClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualHubBgpConnectionClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, connectionName, parameters, options) @@ -81,6 +82,7 @@ func (client *VirtualHubBgpConnectionClient) BeginCreateOrUpdate(ctx context.Con // CreateOrUpdate - Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualHubBgpConnectionClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, parameters BgpConnection, options *VirtualHubBgpConnectionClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualHubName, connectionName, parameters, options) @@ -129,12 +131,13 @@ func (client *VirtualHubBgpConnectionClient) createOrUpdateCreateRequest(ctx con // BeginDelete - Deletes a VirtualHubBgpConnection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VirtualHubBgpConnection. -// virtualHubName - The name of the VirtualHub. -// connectionName - The name of the connection. -// options - VirtualHubBgpConnectionClientBeginDeleteOptions contains the optional parameters for the VirtualHubBgpConnectionClient.BeginDelete -// method. +// - resourceGroupName - The resource group name of the VirtualHubBgpConnection. +// - virtualHubName - The name of the VirtualHub. +// - connectionName - The name of the connection. +// - options - VirtualHubBgpConnectionClientBeginDeleteOptions contains the optional parameters for the VirtualHubBgpConnectionClient.BeginDelete +// method. func (client *VirtualHubBgpConnectionClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, options *VirtualHubBgpConnectionClientBeginDeleteOptions) (*runtime.Poller[VirtualHubBgpConnectionClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, connectionName, options) @@ -151,6 +154,7 @@ func (client *VirtualHubBgpConnectionClient) BeginDelete(ctx context.Context, re // Delete - Deletes a VirtualHubBgpConnection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualHubBgpConnectionClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, options *VirtualHubBgpConnectionClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualHubName, connectionName, options) @@ -199,12 +203,13 @@ func (client *VirtualHubBgpConnectionClient) deleteCreateRequest(ctx context.Con // Get - Retrieves the details of a Virtual Hub Bgp Connection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// connectionName - The name of the connection. -// options - VirtualHubBgpConnectionClientGetOptions contains the optional parameters for the VirtualHubBgpConnectionClient.Get -// method. +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - connectionName - The name of the connection. +// - options - VirtualHubBgpConnectionClientGetOptions contains the optional parameters for the VirtualHubBgpConnectionClient.Get +// method. func (client *VirtualHubBgpConnectionClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, options *VirtualHubBgpConnectionClientGetOptions) (VirtualHubBgpConnectionClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, virtualHubName, connectionName, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/virtualhubbgpconnection_client_example_test.go b/sdk/resourcemanager/network/armnetwork/virtualhubbgpconnection_client_example_test.go deleted file mode 100644 index a6a36ff3fd7f..000000000000 --- a/sdk/resourcemanager/network/armnetwork/virtualhubbgpconnection_client_example_test.go +++ /dev/null @@ -1,89 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualHubBgpConnectionGet.json -func ExampleVirtualHubBgpConnectionClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualHubBgpConnectionClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "hub1", "conn1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualHubBgpConnectionPut.json -func ExampleVirtualHubBgpConnectionClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualHubBgpConnectionClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "hub1", "conn1", armnetwork.BgpConnection{ - Properties: &armnetwork.BgpConnectionProperties{ - HubVirtualNetworkConnection: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubVirtualNetworkConnections/hubVnetConn1"), - }, - PeerAsn: to.Ptr[int64](20000), - PeerIP: to.Ptr("192.168.1.5"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualHubBgpConnectionDelete.json -func ExampleVirtualHubBgpConnectionClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualHubBgpConnectionClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "hub1", "conn1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/network/armnetwork/virtualhubbgpconnections_client.go b/sdk/resourcemanager/network/armnetwork/virtualhubbgpconnections_client.go index 145cb1c95d71..f3349ca5e651 100644 --- a/sdk/resourcemanager/network/armnetwork/virtualhubbgpconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/virtualhubbgpconnections_client.go @@ -32,10 +32,10 @@ type VirtualHubBgpConnectionsClient struct { } // NewVirtualHubBgpConnectionsClient creates a new instance of VirtualHubBgpConnectionsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewVirtualHubBgpConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualHubBgpConnectionsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,11 +57,12 @@ func NewVirtualHubBgpConnectionsClient(subscriptionID string, credential azcore. } // NewListPager - Retrieves the details of all VirtualHubBgpConnections. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// options - VirtualHubBgpConnectionsClientListOptions contains the optional parameters for the VirtualHubBgpConnectionsClient.List -// method. +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - options - VirtualHubBgpConnectionsClientListOptions contains the optional parameters for the VirtualHubBgpConnectionsClient.NewListPager +// method. func (client *VirtualHubBgpConnectionsClient) NewListPager(resourceGroupName string, virtualHubName string, options *VirtualHubBgpConnectionsClientListOptions) *runtime.Pager[VirtualHubBgpConnectionsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[VirtualHubBgpConnectionsClientListResponse]{ More: func(page VirtualHubBgpConnectionsClientListResponse) bool { @@ -127,12 +128,13 @@ func (client *VirtualHubBgpConnectionsClient) listHandleResponse(resp *http.Resp // BeginListAdvertisedRoutes - Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// hubName - The name of the virtual hub. -// connectionName - The name of the virtual hub bgp connection. -// options - VirtualHubBgpConnectionsClientBeginListAdvertisedRoutesOptions contains the optional parameters for the VirtualHubBgpConnectionsClient.BeginListAdvertisedRoutes -// method. +// - resourceGroupName - The name of the resource group. +// - hubName - The name of the virtual hub. +// - connectionName - The name of the virtual hub bgp connection. +// - options - VirtualHubBgpConnectionsClientBeginListAdvertisedRoutesOptions contains the optional parameters for the VirtualHubBgpConnectionsClient.BeginListAdvertisedRoutes +// method. func (client *VirtualHubBgpConnectionsClient) BeginListAdvertisedRoutes(ctx context.Context, resourceGroupName string, hubName string, connectionName string, options *VirtualHubBgpConnectionsClientBeginListAdvertisedRoutesOptions) (*runtime.Poller[VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.listAdvertisedRoutes(ctx, resourceGroupName, hubName, connectionName, options) @@ -149,6 +151,7 @@ func (client *VirtualHubBgpConnectionsClient) BeginListAdvertisedRoutes(ctx cont // ListAdvertisedRoutes - Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualHubBgpConnectionsClient) listAdvertisedRoutes(ctx context.Context, resourceGroupName string, hubName string, connectionName string, options *VirtualHubBgpConnectionsClientBeginListAdvertisedRoutesOptions) (*http.Response, error) { req, err := client.listAdvertisedRoutesCreateRequest(ctx, resourceGroupName, hubName, connectionName, options) @@ -197,12 +200,13 @@ func (client *VirtualHubBgpConnectionsClient) listAdvertisedRoutesCreateRequest( // BeginListLearnedRoutes - Retrieves a list of routes the virtual hub bgp connection has learned. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// hubName - The name of the virtual hub. -// connectionName - The name of the virtual hub bgp connection. -// options - VirtualHubBgpConnectionsClientBeginListLearnedRoutesOptions contains the optional parameters for the VirtualHubBgpConnectionsClient.BeginListLearnedRoutes -// method. +// - resourceGroupName - The name of the resource group. +// - hubName - The name of the virtual hub. +// - connectionName - The name of the virtual hub bgp connection. +// - options - VirtualHubBgpConnectionsClientBeginListLearnedRoutesOptions contains the optional parameters for the VirtualHubBgpConnectionsClient.BeginListLearnedRoutes +// method. func (client *VirtualHubBgpConnectionsClient) BeginListLearnedRoutes(ctx context.Context, resourceGroupName string, hubName string, connectionName string, options *VirtualHubBgpConnectionsClientBeginListLearnedRoutesOptions) (*runtime.Poller[VirtualHubBgpConnectionsClientListLearnedRoutesResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.listLearnedRoutes(ctx, resourceGroupName, hubName, connectionName, options) @@ -219,6 +223,7 @@ func (client *VirtualHubBgpConnectionsClient) BeginListLearnedRoutes(ctx context // ListLearnedRoutes - Retrieves a list of routes the virtual hub bgp connection has learned. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualHubBgpConnectionsClient) listLearnedRoutes(ctx context.Context, resourceGroupName string, hubName string, connectionName string, options *VirtualHubBgpConnectionsClientBeginListLearnedRoutesOptions) (*http.Response, error) { req, err := client.listLearnedRoutesCreateRequest(ctx, resourceGroupName, hubName, connectionName, options) diff --git a/sdk/resourcemanager/network/armnetwork/virtualhubbgpconnections_client_example_test.go b/sdk/resourcemanager/network/armnetwork/virtualhubbgpconnections_client_example_test.go deleted file mode 100644 index 4e8a3ee19561..000000000000 --- a/sdk/resourcemanager/network/armnetwork/virtualhubbgpconnections_client_example_test.go +++ /dev/null @@ -1,87 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualHubBgpConnectionList.json -func ExampleVirtualHubBgpConnectionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualHubBgpConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", "hub1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualRouterPeerListLearnedRoute.json -func ExampleVirtualHubBgpConnectionsClient_BeginListLearnedRoutes() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualHubBgpConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginListLearnedRoutes(ctx, "rg1", "virtualRouter1", "peer1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualRouterPeerListAdvertisedRoute.json -func ExampleVirtualHubBgpConnectionsClient_BeginListAdvertisedRoutes() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualHubBgpConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginListAdvertisedRoutes(ctx, "rg1", "virtualRouter1", "peer1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/virtualhubipconfiguration_client.go b/sdk/resourcemanager/network/armnetwork/virtualhubipconfiguration_client.go index 12a8f8aab662..bf813689992a 100644 --- a/sdk/resourcemanager/network/armnetwork/virtualhubipconfiguration_client.go +++ b/sdk/resourcemanager/network/armnetwork/virtualhubipconfiguration_client.go @@ -32,10 +32,10 @@ type VirtualHubIPConfigurationClient struct { } // NewVirtualHubIPConfigurationClient creates a new instance of VirtualHubIPConfigurationClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewVirtualHubIPConfigurationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualHubIPConfigurationClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewVirtualHubIPConfigurationClient(subscriptionID string, credential azcore // BeginCreateOrUpdate - Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// ipConfigName - The name of the ipconfig. -// parameters - Hub Ip Configuration parameters. -// options - VirtualHubIPConfigurationClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubIPConfigurationClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - ipConfigName - The name of the ipconfig. +// - parameters - Hub Ip Configuration parameters. +// - options - VirtualHubIPConfigurationClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubIPConfigurationClient.BeginCreateOrUpdate +// method. func (client *VirtualHubIPConfigurationClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, ipConfigName string, parameters HubIPConfiguration, options *VirtualHubIPConfigurationClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualHubIPConfigurationClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, ipConfigName, parameters, options) @@ -81,6 +82,7 @@ func (client *VirtualHubIPConfigurationClient) BeginCreateOrUpdate(ctx context.C // CreateOrUpdate - Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualHubIPConfigurationClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, ipConfigName string, parameters HubIPConfiguration, options *VirtualHubIPConfigurationClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualHubName, ipConfigName, parameters, options) @@ -129,12 +131,13 @@ func (client *VirtualHubIPConfigurationClient) createOrUpdateCreateRequest(ctx c // BeginDelete - Deletes a VirtualHubIpConfiguration. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VirtualHubBgpConnection. -// virtualHubName - The name of the VirtualHub. -// ipConfigName - The name of the ipconfig. -// options - VirtualHubIPConfigurationClientBeginDeleteOptions contains the optional parameters for the VirtualHubIPConfigurationClient.BeginDelete -// method. +// - resourceGroupName - The resource group name of the VirtualHubBgpConnection. +// - virtualHubName - The name of the VirtualHub. +// - ipConfigName - The name of the ipconfig. +// - options - VirtualHubIPConfigurationClientBeginDeleteOptions contains the optional parameters for the VirtualHubIPConfigurationClient.BeginDelete +// method. func (client *VirtualHubIPConfigurationClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, ipConfigName string, options *VirtualHubIPConfigurationClientBeginDeleteOptions) (*runtime.Poller[VirtualHubIPConfigurationClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, ipConfigName, options) @@ -151,6 +154,7 @@ func (client *VirtualHubIPConfigurationClient) BeginDelete(ctx context.Context, // Delete - Deletes a VirtualHubIpConfiguration. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualHubIPConfigurationClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualHubName string, ipConfigName string, options *VirtualHubIPConfigurationClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualHubName, ipConfigName, options) @@ -199,12 +203,13 @@ func (client *VirtualHubIPConfigurationClient) deleteCreateRequest(ctx context.C // Get - Retrieves the details of a Virtual Hub Ip configuration. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// ipConfigName - The name of the ipconfig. -// options - VirtualHubIPConfigurationClientGetOptions contains the optional parameters for the VirtualHubIPConfigurationClient.Get -// method. +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - ipConfigName - The name of the ipconfig. +// - options - VirtualHubIPConfigurationClientGetOptions contains the optional parameters for the VirtualHubIPConfigurationClient.Get +// method. func (client *VirtualHubIPConfigurationClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, ipConfigName string, options *VirtualHubIPConfigurationClientGetOptions) (VirtualHubIPConfigurationClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, virtualHubName, ipConfigName, options) if err != nil { @@ -260,11 +265,12 @@ func (client *VirtualHubIPConfigurationClient) getHandleResponse(resp *http.Resp } // NewListPager - Retrieves the details of all VirtualHubIpConfigurations. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// options - VirtualHubIPConfigurationClientListOptions contains the optional parameters for the VirtualHubIPConfigurationClient.List -// method. +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - options - VirtualHubIPConfigurationClientListOptions contains the optional parameters for the VirtualHubIPConfigurationClient.NewListPager +// method. func (client *VirtualHubIPConfigurationClient) NewListPager(resourceGroupName string, virtualHubName string, options *VirtualHubIPConfigurationClientListOptions) *runtime.Pager[VirtualHubIPConfigurationClientListResponse] { return runtime.NewPager(runtime.PagingHandler[VirtualHubIPConfigurationClientListResponse]{ More: func(page VirtualHubIPConfigurationClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/virtualhubipconfiguration_client_example_test.go b/sdk/resourcemanager/network/armnetwork/virtualhubipconfiguration_client_example_test.go deleted file mode 100644 index 76f902f54c8d..000000000000 --- a/sdk/resourcemanager/network/armnetwork/virtualhubipconfiguration_client_example_test.go +++ /dev/null @@ -1,111 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualHubIpConfigurationGet.json -func ExampleVirtualHubIPConfigurationClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualHubIPConfigurationClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "hub1", "ipconfig1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualHubIpConfigurationPut.json -func ExampleVirtualHubIPConfigurationClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualHubIPConfigurationClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "hub1", "ipconfig1", armnetwork.HubIPConfiguration{ - Properties: &armnetwork.HubIPConfigurationPropertiesFormat{ - Subnet: &armnetwork.Subnet{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualHubIpConfigurationDelete.json -func ExampleVirtualHubIPConfigurationClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualHubIPConfigurationClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "hub1", "ipconfig1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualHubIpConfigurationList.json -func ExampleVirtualHubIPConfigurationClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualHubIPConfigurationClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", "hub1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/virtualhubroutetablev2s_client.go b/sdk/resourcemanager/network/armnetwork/virtualhubroutetablev2s_client.go index 673c07f86fea..4390a5c669d5 100644 --- a/sdk/resourcemanager/network/armnetwork/virtualhubroutetablev2s_client.go +++ b/sdk/resourcemanager/network/armnetwork/virtualhubroutetablev2s_client.go @@ -32,10 +32,10 @@ type VirtualHubRouteTableV2SClient struct { } // NewVirtualHubRouteTableV2SClient creates a new instance of VirtualHubRouteTableV2SClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewVirtualHubRouteTableV2SClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualHubRouteTableV2SClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewVirtualHubRouteTableV2SClient(subscriptionID string, credential azcore.T // BeginCreateOrUpdate - Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// routeTableName - The name of the VirtualHubRouteTableV2. -// virtualHubRouteTableV2Parameters - Parameters supplied to create or update VirtualHubRouteTableV2. -// options - VirtualHubRouteTableV2SClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - routeTableName - The name of the VirtualHubRouteTableV2. +// - virtualHubRouteTableV2Parameters - Parameters supplied to create or update VirtualHubRouteTableV2. +// - options - VirtualHubRouteTableV2SClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.BeginCreateOrUpdate +// method. func (client *VirtualHubRouteTableV2SClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, virtualHubRouteTableV2Parameters VirtualHubRouteTableV2, options *VirtualHubRouteTableV2SClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualHubRouteTableV2SClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, routeTableName, virtualHubRouteTableV2Parameters, options) @@ -81,6 +82,7 @@ func (client *VirtualHubRouteTableV2SClient) BeginCreateOrUpdate(ctx context.Con // CreateOrUpdate - Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualHubRouteTableV2SClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, virtualHubRouteTableV2Parameters VirtualHubRouteTableV2, options *VirtualHubRouteTableV2SClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualHubName, routeTableName, virtualHubRouteTableV2Parameters, options) @@ -129,12 +131,13 @@ func (client *VirtualHubRouteTableV2SClient) createOrUpdateCreateRequest(ctx con // BeginDelete - Deletes a VirtualHubRouteTableV2. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VirtualHubRouteTableV2. -// virtualHubName - The name of the VirtualHub. -// routeTableName - The name of the VirtualHubRouteTableV2. -// options - VirtualHubRouteTableV2SClientBeginDeleteOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.BeginDelete -// method. +// - resourceGroupName - The resource group name of the VirtualHubRouteTableV2. +// - virtualHubName - The name of the VirtualHub. +// - routeTableName - The name of the VirtualHubRouteTableV2. +// - options - VirtualHubRouteTableV2SClientBeginDeleteOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.BeginDelete +// method. func (client *VirtualHubRouteTableV2SClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, options *VirtualHubRouteTableV2SClientBeginDeleteOptions) (*runtime.Poller[VirtualHubRouteTableV2SClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, routeTableName, options) @@ -151,6 +154,7 @@ func (client *VirtualHubRouteTableV2SClient) BeginDelete(ctx context.Context, re // Delete - Deletes a VirtualHubRouteTableV2. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualHubRouteTableV2SClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, options *VirtualHubRouteTableV2SClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualHubName, routeTableName, options) @@ -199,12 +203,13 @@ func (client *VirtualHubRouteTableV2SClient) deleteCreateRequest(ctx context.Con // Get - Retrieves the details of a VirtualHubRouteTableV2. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VirtualHubRouteTableV2. -// virtualHubName - The name of the VirtualHub. -// routeTableName - The name of the VirtualHubRouteTableV2. -// options - VirtualHubRouteTableV2SClientGetOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.Get -// method. +// - resourceGroupName - The resource group name of the VirtualHubRouteTableV2. +// - virtualHubName - The name of the VirtualHub. +// - routeTableName - The name of the VirtualHubRouteTableV2. +// - options - VirtualHubRouteTableV2SClientGetOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.Get +// method. func (client *VirtualHubRouteTableV2SClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, options *VirtualHubRouteTableV2SClientGetOptions) (VirtualHubRouteTableV2SClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, virtualHubName, routeTableName, options) if err != nil { @@ -260,11 +265,12 @@ func (client *VirtualHubRouteTableV2SClient) getHandleResponse(resp *http.Respon } // NewListPager - Retrieves the details of all VirtualHubRouteTableV2s. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// options - VirtualHubRouteTableV2SClientListOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.List -// method. +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - options - VirtualHubRouteTableV2SClientListOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.NewListPager +// method. func (client *VirtualHubRouteTableV2SClient) NewListPager(resourceGroupName string, virtualHubName string, options *VirtualHubRouteTableV2SClientListOptions) *runtime.Pager[VirtualHubRouteTableV2SClientListResponse] { return runtime.NewPager(runtime.PagingHandler[VirtualHubRouteTableV2SClientListResponse]{ More: func(page VirtualHubRouteTableV2SClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/virtualhubroutetablev2s_client_example_test.go b/sdk/resourcemanager/network/armnetwork/virtualhubroutetablev2s_client_example_test.go deleted file mode 100644 index 6a7d3a704737..000000000000 --- a/sdk/resourcemanager/network/armnetwork/virtualhubroutetablev2s_client_example_test.go +++ /dev/null @@ -1,128 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualHubRouteTableV2Get.json -func ExampleVirtualHubRouteTableV2SClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualHubRouteTableV2SClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "virtualHub1", "virtualHubRouteTable1a", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualHubRouteTableV2Put.json -func ExampleVirtualHubRouteTableV2SClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualHubRouteTableV2SClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "virtualHub1", "virtualHubRouteTable1a", armnetwork.VirtualHubRouteTableV2{ - Properties: &armnetwork.VirtualHubRouteTableV2Properties{ - AttachedConnections: []*string{ - to.Ptr("All_Vnets")}, - Routes: []*armnetwork.VirtualHubRouteV2{ - { - DestinationType: to.Ptr("CIDR"), - Destinations: []*string{ - to.Ptr("20.10.0.0/16"), - to.Ptr("20.20.0.0/16")}, - NextHopType: to.Ptr("IPAddress"), - NextHops: []*string{ - to.Ptr("10.0.0.68")}, - }, - { - DestinationType: to.Ptr("CIDR"), - Destinations: []*string{ - to.Ptr("0.0.0.0/0")}, - NextHopType: to.Ptr("IPAddress"), - NextHops: []*string{ - to.Ptr("10.0.0.68")}, - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualHubRouteTableV2Delete.json -func ExampleVirtualHubRouteTableV2SClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualHubRouteTableV2SClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "virtualHub1", "virtualHubRouteTable1a", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualHubRouteTableV2List.json -func ExampleVirtualHubRouteTableV2SClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualHubRouteTableV2SClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", "virtualHub1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/virtualhubs_client.go b/sdk/resourcemanager/network/armnetwork/virtualhubs_client.go index 30ccd8abfac4..d0d13fb27470 100644 --- a/sdk/resourcemanager/network/armnetwork/virtualhubs_client.go +++ b/sdk/resourcemanager/network/armnetwork/virtualhubs_client.go @@ -32,10 +32,10 @@ type VirtualHubsClient struct { } // NewVirtualHubsClient creates a new instance of VirtualHubsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewVirtualHubsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualHubsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewVirtualHubsClient(subscriptionID string, credential azcore.TokenCredenti // BeginCreateOrUpdate - Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// virtualHubParameters - Parameters supplied to create or update VirtualHub. -// options - VirtualHubsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - virtualHubParameters - Parameters supplied to create or update VirtualHub. +// - options - VirtualHubsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubsClient.BeginCreateOrUpdate +// method. func (client *VirtualHubsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters VirtualHub, options *VirtualHubsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualHubsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, virtualHubParameters, options) @@ -80,6 +81,7 @@ func (client *VirtualHubsClient) BeginCreateOrUpdate(ctx context.Context, resour // CreateOrUpdate - Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualHubsClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters VirtualHub, options *VirtualHubsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualHubName, virtualHubParameters, options) @@ -124,10 +126,11 @@ func (client *VirtualHubsClient) createOrUpdateCreateRequest(ctx context.Context // BeginDelete - Deletes a VirtualHub. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// options - VirtualHubsClientBeginDeleteOptions contains the optional parameters for the VirtualHubsClient.BeginDelete method. +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - options - VirtualHubsClientBeginDeleteOptions contains the optional parameters for the VirtualHubsClient.BeginDelete method. func (client *VirtualHubsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, options *VirtualHubsClientBeginDeleteOptions) (*runtime.Poller[VirtualHubsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, options) @@ -144,6 +147,7 @@ func (client *VirtualHubsClient) BeginDelete(ctx context.Context, resourceGroupN // Delete - Deletes a VirtualHub. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualHubsClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualHubName string, options *VirtualHubsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualHubName, options) @@ -188,10 +192,11 @@ func (client *VirtualHubsClient) deleteCreateRequest(ctx context.Context, resour // Get - Retrieves the details of a VirtualHub. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// options - VirtualHubsClientGetOptions contains the optional parameters for the VirtualHubsClient.Get method. +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - options - VirtualHubsClientGetOptions contains the optional parameters for the VirtualHubsClient.Get method. func (client *VirtualHubsClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, options *VirtualHubsClientGetOptions) (VirtualHubsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, virtualHubName, options) if err != nil { @@ -245,11 +250,12 @@ func (client *VirtualHubsClient) getHandleResponse(resp *http.Response) (Virtual // BeginGetEffectiveVirtualHubRoutes - Gets the effective routes configured for the Virtual Hub resource or the specified // resource . // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// options - VirtualHubsClientBeginGetEffectiveVirtualHubRoutesOptions contains the optional parameters for the VirtualHubsClient.BeginGetEffectiveVirtualHubRoutes -// method. +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - options - VirtualHubsClientBeginGetEffectiveVirtualHubRoutesOptions contains the optional parameters for the VirtualHubsClient.BeginGetEffectiveVirtualHubRoutes +// method. func (client *VirtualHubsClient) BeginGetEffectiveVirtualHubRoutes(ctx context.Context, resourceGroupName string, virtualHubName string, options *VirtualHubsClientBeginGetEffectiveVirtualHubRoutesOptions) (*runtime.Poller[VirtualHubsClientGetEffectiveVirtualHubRoutesResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.getEffectiveVirtualHubRoutes(ctx, resourceGroupName, virtualHubName, options) @@ -267,6 +273,7 @@ func (client *VirtualHubsClient) BeginGetEffectiveVirtualHubRoutes(ctx context.C // GetEffectiveVirtualHubRoutes - Gets the effective routes configured for the Virtual Hub resource or the specified resource // . // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualHubsClient) getEffectiveVirtualHubRoutes(ctx context.Context, resourceGroupName string, virtualHubName string, options *VirtualHubsClientBeginGetEffectiveVirtualHubRoutesOptions) (*http.Response, error) { req, err := client.getEffectiveVirtualHubRoutesCreateRequest(ctx, resourceGroupName, virtualHubName, options) @@ -314,12 +321,13 @@ func (client *VirtualHubsClient) getEffectiveVirtualHubRoutesCreateRequest(ctx c // BeginGetInboundRoutes - Gets the inbound routes configured for the Virtual Hub on a particular connection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// getInboundRoutesParameters - Parameters supplied to get the inbound routes for a connection resource. -// options - VirtualHubsClientBeginGetInboundRoutesOptions contains the optional parameters for the VirtualHubsClient.BeginGetInboundRoutes -// method. +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - getInboundRoutesParameters - Parameters supplied to get the inbound routes for a connection resource. +// - options - VirtualHubsClientBeginGetInboundRoutesOptions contains the optional parameters for the VirtualHubsClient.BeginGetInboundRoutes +// method. func (client *VirtualHubsClient) BeginGetInboundRoutes(ctx context.Context, resourceGroupName string, virtualHubName string, getInboundRoutesParameters GetInboundRoutesParameters, options *VirtualHubsClientBeginGetInboundRoutesOptions) (*runtime.Poller[VirtualHubsClientGetInboundRoutesResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.getInboundRoutes(ctx, resourceGroupName, virtualHubName, getInboundRoutesParameters, options) @@ -336,6 +344,7 @@ func (client *VirtualHubsClient) BeginGetInboundRoutes(ctx context.Context, reso // GetInboundRoutes - Gets the inbound routes configured for the Virtual Hub on a particular connection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualHubsClient) getInboundRoutes(ctx context.Context, resourceGroupName string, virtualHubName string, getInboundRoutesParameters GetInboundRoutesParameters, options *VirtualHubsClientBeginGetInboundRoutesOptions) (*http.Response, error) { req, err := client.getInboundRoutesCreateRequest(ctx, resourceGroupName, virtualHubName, getInboundRoutesParameters, options) @@ -380,12 +389,13 @@ func (client *VirtualHubsClient) getInboundRoutesCreateRequest(ctx context.Conte // BeginGetOutboundRoutes - Gets the outbound routes configured for the Virtual Hub on a particular connection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// getOutboundRoutesParameters - Parameters supplied to get the outbound routes for a connection resource. -// options - VirtualHubsClientBeginGetOutboundRoutesOptions contains the optional parameters for the VirtualHubsClient.BeginGetOutboundRoutes -// method. +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - getOutboundRoutesParameters - Parameters supplied to get the outbound routes for a connection resource. +// - options - VirtualHubsClientBeginGetOutboundRoutesOptions contains the optional parameters for the VirtualHubsClient.BeginGetOutboundRoutes +// method. func (client *VirtualHubsClient) BeginGetOutboundRoutes(ctx context.Context, resourceGroupName string, virtualHubName string, getOutboundRoutesParameters GetOutboundRoutesParameters, options *VirtualHubsClientBeginGetOutboundRoutesOptions) (*runtime.Poller[VirtualHubsClientGetOutboundRoutesResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.getOutboundRoutes(ctx, resourceGroupName, virtualHubName, getOutboundRoutesParameters, options) @@ -402,6 +412,7 @@ func (client *VirtualHubsClient) BeginGetOutboundRoutes(ctx context.Context, res // GetOutboundRoutes - Gets the outbound routes configured for the Virtual Hub on a particular connection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualHubsClient) getOutboundRoutes(ctx context.Context, resourceGroupName string, virtualHubName string, getOutboundRoutesParameters GetOutboundRoutesParameters, options *VirtualHubsClientBeginGetOutboundRoutesOptions) (*http.Response, error) { req, err := client.getOutboundRoutesCreateRequest(ctx, resourceGroupName, virtualHubName, getOutboundRoutesParameters, options) @@ -445,8 +456,9 @@ func (client *VirtualHubsClient) getOutboundRoutesCreateRequest(ctx context.Cont } // NewListPager - Lists all the VirtualHubs in a subscription. +// // Generated from API version 2022-07-01 -// options - VirtualHubsClientListOptions contains the optional parameters for the VirtualHubsClient.List method. +// - options - VirtualHubsClientListOptions contains the optional parameters for the VirtualHubsClient.NewListPager method. func (client *VirtualHubsClient) NewListPager(options *VirtualHubsClientListOptions) *runtime.Pager[VirtualHubsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[VirtualHubsClientListResponse]{ More: func(page VirtualHubsClientListResponse) bool { @@ -503,10 +515,11 @@ func (client *VirtualHubsClient) listHandleResponse(resp *http.Response) (Virtua } // NewListByResourceGroupPager - Lists all the VirtualHubs in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VirtualHub. -// options - VirtualHubsClientListByResourceGroupOptions contains the optional parameters for the VirtualHubsClient.ListByResourceGroup -// method. +// - resourceGroupName - The resource group name of the VirtualHub. +// - options - VirtualHubsClientListByResourceGroupOptions contains the optional parameters for the VirtualHubsClient.NewListByResourceGroupPager +// method. func (client *VirtualHubsClient) NewListByResourceGroupPager(resourceGroupName string, options *VirtualHubsClientListByResourceGroupOptions) *runtime.Pager[VirtualHubsClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[VirtualHubsClientListByResourceGroupResponse]{ More: func(page VirtualHubsClientListByResourceGroupResponse) bool { @@ -568,11 +581,12 @@ func (client *VirtualHubsClient) listByResourceGroupHandleResponse(resp *http.Re // UpdateTags - Updates VirtualHub tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VirtualHub. -// virtualHubName - The name of the VirtualHub. -// virtualHubParameters - Parameters supplied to update VirtualHub tags. -// options - VirtualHubsClientUpdateTagsOptions contains the optional parameters for the VirtualHubsClient.UpdateTags method. +// - resourceGroupName - The resource group name of the VirtualHub. +// - virtualHubName - The name of the VirtualHub. +// - virtualHubParameters - Parameters supplied to update VirtualHub tags. +// - options - VirtualHubsClientUpdateTagsOptions contains the optional parameters for the VirtualHubsClient.UpdateTags method. func (client *VirtualHubsClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters TagsObject, options *VirtualHubsClientUpdateTagsOptions) (VirtualHubsClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, virtualHubName, virtualHubParameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/virtualhubs_client_example_test.go b/sdk/resourcemanager/network/armnetwork/virtualhubs_client_example_test.go deleted file mode 100644 index 637d461c7de3..000000000000 --- a/sdk/resourcemanager/network/armnetwork/virtualhubs_client_example_test.go +++ /dev/null @@ -1,284 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualHubGet.json -func ExampleVirtualHubsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualHubsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "virtualHub1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualHubPut.json -func ExampleVirtualHubsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualHubsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "virtualHub2", armnetwork.VirtualHub{ - Location: to.Ptr("West US"), - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - }, - Properties: &armnetwork.VirtualHubProperties{ - AddressPrefix: to.Ptr("10.168.0.0/24"), - SKU: to.Ptr("Basic"), - VirtualWan: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualWans/virtualWan1"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualHubUpdateTags.json -func ExampleVirtualHubsClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualHubsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, "rg1", "virtualHub2", armnetwork.TagsObject{ - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - "key2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualHubDelete.json -func ExampleVirtualHubsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualHubsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "virtualHub1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualHubListByResourceGroup.json -func ExampleVirtualHubsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualHubsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualHubList.json -func ExampleVirtualHubsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualHubsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/EffectiveRoutesListForConnection.json -func ExampleVirtualHubsClient_BeginGetEffectiveVirtualHubRoutes_effectiveRoutesForAConnectionResource() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualHubsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGetEffectiveVirtualHubRoutes(ctx, "rg1", "virtualHub1", &armnetwork.VirtualHubsClientBeginGetEffectiveVirtualHubRoutesOptions{EffectiveRoutesParameters: &armnetwork.EffectiveRoutesParameters{ - ResourceID: to.Ptr("/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayName/expressRouteConnections/connectionName"), - VirtualWanResourceType: to.Ptr("ExpressRouteConnection"), - }, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/EffectiveRoutesListForRouteTable.json -func ExampleVirtualHubsClient_BeginGetEffectiveVirtualHubRoutes_effectiveRoutesForARouteTableResource() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualHubsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGetEffectiveVirtualHubRoutes(ctx, "rg1", "virtualHub1", &armnetwork.VirtualHubsClientBeginGetEffectiveVirtualHubRoutesOptions{EffectiveRoutesParameters: &armnetwork.EffectiveRoutesParameters{ - ResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1"), - VirtualWanResourceType: to.Ptr("RouteTable"), - }, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/EffectiveRoutesListForVirtualHub.json -func ExampleVirtualHubsClient_BeginGetEffectiveVirtualHubRoutes_effectiveRoutesForTheVirtualHub() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualHubsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGetEffectiveVirtualHubRoutes(ctx, "rg1", "virtualHub1", &armnetwork.VirtualHubsClientBeginGetEffectiveVirtualHubRoutesOptions{EffectiveRoutesParameters: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/GetInboundRoutes.json -func ExampleVirtualHubsClient_BeginGetInboundRoutes() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualHubsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGetInboundRoutes(ctx, "rg1", "virtualHub1", armnetwork.GetInboundRoutesParameters{ - ConnectionType: to.Ptr("ExpressRouteConnection"), - ResourceURI: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteGateways/exrGw1/expressRouteConnections/exrConn1"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/GetOutboundRoutes.json -func ExampleVirtualHubsClient_BeginGetOutboundRoutes() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualHubsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGetOutboundRoutes(ctx, "rg1", "virtualHub1", armnetwork.GetOutboundRoutesParameters{ - ConnectionType: to.Ptr("ExpressRouteConnection"), - ResourceURI: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteGateways/exrGw1/expressRouteConnections/exrConn1"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/network/armnetwork/virtualnetworkgatewayconnections_client.go b/sdk/resourcemanager/network/armnetwork/virtualnetworkgatewayconnections_client.go index a77c42ac295a..800ed42414ff 100644 --- a/sdk/resourcemanager/network/armnetwork/virtualnetworkgatewayconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/virtualnetworkgatewayconnections_client.go @@ -32,10 +32,10 @@ type VirtualNetworkGatewayConnectionsClient struct { } // NewVirtualNetworkGatewayConnectionsClient creates a new instance of VirtualNetworkGatewayConnectionsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworkGatewayConnectionsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string, credential // BeginCreateOrUpdate - Creates or updates a virtual network gateway connection in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayConnectionName - The name of the virtual network gateway connection. -// parameters - Parameters supplied to the create or update virtual network gateway connection operation. -// options - VirtualNetworkGatewayConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayConnectionName - The name of the virtual network gateway connection. +// - parameters - Parameters supplied to the create or update virtual network gateway connection operation. +// - options - VirtualNetworkGatewayConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginCreateOrUpdate +// method. func (client *VirtualNetworkGatewayConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VirtualNetworkGatewayConnection, options *VirtualNetworkGatewayConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) @@ -80,6 +81,7 @@ func (client *VirtualNetworkGatewayConnectionsClient) BeginCreateOrUpdate(ctx co // CreateOrUpdate - Creates or updates a virtual network gateway connection in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworkGatewayConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VirtualNetworkGatewayConnection, options *VirtualNetworkGatewayConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) @@ -124,11 +126,12 @@ func (client *VirtualNetworkGatewayConnectionsClient) createOrUpdateCreateReques // BeginDelete - Deletes the specified virtual network Gateway connection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayConnectionName - The name of the virtual network gateway connection. -// options - VirtualNetworkGatewayConnectionsClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayConnectionName - The name of the virtual network gateway connection. +// - options - VirtualNetworkGatewayConnectionsClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginDelete +// method. func (client *VirtualNetworkGatewayConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginDeleteOptions) (*runtime.Poller[VirtualNetworkGatewayConnectionsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) @@ -145,6 +148,7 @@ func (client *VirtualNetworkGatewayConnectionsClient) BeginDelete(ctx context.Co // Delete - Deletes the specified virtual network Gateway connection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworkGatewayConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) @@ -189,11 +193,12 @@ func (client *VirtualNetworkGatewayConnectionsClient) deleteCreateRequest(ctx co // Get - Gets the specified virtual network gateway connection by resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayConnectionName - The name of the virtual network gateway connection. -// options - VirtualNetworkGatewayConnectionsClientGetOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayConnectionName - The name of the virtual network gateway connection. +// - options - VirtualNetworkGatewayConnectionsClientGetOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.Get +// method. func (client *VirtualNetworkGatewayConnectionsClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientGetOptions) (VirtualNetworkGatewayConnectionsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) if err != nil { @@ -246,11 +251,12 @@ func (client *VirtualNetworkGatewayConnectionsClient) getHandleResponse(resp *ht // BeginGetIkeSas - Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayConnectionName - The name of the virtual network gateway Connection. -// options - VirtualNetworkGatewayConnectionsClientBeginGetIkeSasOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginGetIkeSas -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayConnectionName - The name of the virtual network gateway Connection. +// - options - VirtualNetworkGatewayConnectionsClientBeginGetIkeSasOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginGetIkeSas +// method. func (client *VirtualNetworkGatewayConnectionsClient) BeginGetIkeSas(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginGetIkeSasOptions) (*runtime.Poller[VirtualNetworkGatewayConnectionsClientGetIkeSasResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.getIkeSas(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) @@ -267,6 +273,7 @@ func (client *VirtualNetworkGatewayConnectionsClient) BeginGetIkeSas(ctx context // GetIkeSas - Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworkGatewayConnectionsClient) getIkeSas(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginGetIkeSasOptions) (*http.Response, error) { req, err := client.getIkeSasCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) @@ -312,11 +319,12 @@ func (client *VirtualNetworkGatewayConnectionsClient) getIkeSasCreateRequest(ctx // GetSharedKey - The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual // network gateway connection shared key through Network resource provider. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayConnectionName - The virtual network gateway connection shared key name. -// options - VirtualNetworkGatewayConnectionsClientGetSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.GetSharedKey -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayConnectionName - The virtual network gateway connection shared key name. +// - options - VirtualNetworkGatewayConnectionsClientGetSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.GetSharedKey +// method. func (client *VirtualNetworkGatewayConnectionsClient) GetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientGetSharedKeyOptions) (VirtualNetworkGatewayConnectionsClientGetSharedKeyResponse, error) { req, err := client.getSharedKeyCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) if err != nil { @@ -369,10 +377,11 @@ func (client *VirtualNetworkGatewayConnectionsClient) getSharedKeyHandleResponse // NewListPager - The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections // created. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - VirtualNetworkGatewayConnectionsClientListOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - options - VirtualNetworkGatewayConnectionsClientListOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.NewListPager +// method. func (client *VirtualNetworkGatewayConnectionsClient) NewListPager(resourceGroupName string, options *VirtualNetworkGatewayConnectionsClientListOptions) *runtime.Pager[VirtualNetworkGatewayConnectionsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[VirtualNetworkGatewayConnectionsClientListResponse]{ More: func(page VirtualNetworkGatewayConnectionsClientListResponse) bool { @@ -434,11 +443,12 @@ func (client *VirtualNetworkGatewayConnectionsClient) listHandleResponse(resp *h // BeginResetConnection - Resets the virtual network gateway connection specified. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayConnectionName - The name of the virtual network gateway Connection. -// options - VirtualNetworkGatewayConnectionsClientBeginResetConnectionOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginResetConnection -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayConnectionName - The name of the virtual network gateway Connection. +// - options - VirtualNetworkGatewayConnectionsClientBeginResetConnectionOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginResetConnection +// method. func (client *VirtualNetworkGatewayConnectionsClient) BeginResetConnection(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginResetConnectionOptions) (*runtime.Poller[VirtualNetworkGatewayConnectionsClientResetConnectionResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.resetConnection(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) @@ -455,6 +465,7 @@ func (client *VirtualNetworkGatewayConnectionsClient) BeginResetConnection(ctx c // ResetConnection - Resets the virtual network gateway connection specified. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworkGatewayConnectionsClient) resetConnection(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginResetConnectionOptions) (*http.Response, error) { req, err := client.resetConnectionCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) @@ -501,13 +512,14 @@ func (client *VirtualNetworkGatewayConnectionsClient) resetConnectionCreateReque // shared key for passed virtual network gateway connection in the specified resource group // through Network resource provider. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayConnectionName - The virtual network gateway connection reset shared key Name. -// parameters - Parameters supplied to the begin reset virtual network gateway connection shared key operation through network -// resource provider. -// options - VirtualNetworkGatewayConnectionsClientBeginResetSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginResetSharedKey -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayConnectionName - The virtual network gateway connection reset shared key Name. +// - parameters - Parameters supplied to the begin reset virtual network gateway connection shared key operation through network +// resource provider. +// - options - VirtualNetworkGatewayConnectionsClientBeginResetSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginResetSharedKey +// method. func (client *VirtualNetworkGatewayConnectionsClient) BeginResetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionResetSharedKey, options *VirtualNetworkGatewayConnectionsClientBeginResetSharedKeyOptions) (*runtime.Poller[VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.resetSharedKey(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) @@ -526,6 +538,7 @@ func (client *VirtualNetworkGatewayConnectionsClient) BeginResetSharedKey(ctx co // shared key for passed virtual network gateway connection in the specified resource group // through Network resource provider. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworkGatewayConnectionsClient) resetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionResetSharedKey, options *VirtualNetworkGatewayConnectionsClientBeginResetSharedKeyOptions) (*http.Response, error) { req, err := client.resetSharedKeyCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) @@ -572,13 +585,14 @@ func (client *VirtualNetworkGatewayConnectionsClient) resetSharedKeyCreateReques // shared key for passed virtual network gateway connection in the specified resource group through // Network resource provider. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayConnectionName - The virtual network gateway connection name. -// parameters - Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork -// resource provider. -// options - VirtualNetworkGatewayConnectionsClientBeginSetSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginSetSharedKey -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayConnectionName - The virtual network gateway connection name. +// - parameters - Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork +// resource provider. +// - options - VirtualNetworkGatewayConnectionsClientBeginSetSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginSetSharedKey +// method. func (client *VirtualNetworkGatewayConnectionsClient) BeginSetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionSharedKey, options *VirtualNetworkGatewayConnectionsClientBeginSetSharedKeyOptions) (*runtime.Poller[VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.setSharedKey(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) @@ -597,6 +611,7 @@ func (client *VirtualNetworkGatewayConnectionsClient) BeginSetSharedKey(ctx cont // key for passed virtual network gateway connection in the specified resource group through // Network resource provider. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworkGatewayConnectionsClient) setSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionSharedKey, options *VirtualNetworkGatewayConnectionsClientBeginSetSharedKeyOptions) (*http.Response, error) { req, err := client.setSharedKeyCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) @@ -641,11 +656,12 @@ func (client *VirtualNetworkGatewayConnectionsClient) setSharedKeyCreateRequest( // BeginStartPacketCapture - Starts packet capture on virtual network gateway connection in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayConnectionName - The name of the virtual network gateway connection. -// options - VirtualNetworkGatewayConnectionsClientBeginStartPacketCaptureOptions contains the optional parameters for the -// VirtualNetworkGatewayConnectionsClient.BeginStartPacketCapture method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayConnectionName - The name of the virtual network gateway connection. +// - options - VirtualNetworkGatewayConnectionsClientBeginStartPacketCaptureOptions contains the optional parameters for the +// VirtualNetworkGatewayConnectionsClient.BeginStartPacketCapture method. func (client *VirtualNetworkGatewayConnectionsClient) BeginStartPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginStartPacketCaptureOptions) (*runtime.Poller[VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.startPacketCapture(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) @@ -662,6 +678,7 @@ func (client *VirtualNetworkGatewayConnectionsClient) BeginStartPacketCapture(ct // StartPacketCapture - Starts packet capture on virtual network gateway connection in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworkGatewayConnectionsClient) startPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginStartPacketCaptureOptions) (*http.Response, error) { req, err := client.startPacketCaptureCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) @@ -709,12 +726,13 @@ func (client *VirtualNetworkGatewayConnectionsClient) startPacketCaptureCreateRe // BeginStopPacketCapture - Stops packet capture on virtual network gateway connection in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayConnectionName - The name of the virtual network gateway Connection. -// parameters - Virtual network gateway packet capture parameters supplied to stop packet capture on gateway connection. -// options - VirtualNetworkGatewayConnectionsClientBeginStopPacketCaptureOptions contains the optional parameters for the -// VirtualNetworkGatewayConnectionsClient.BeginStopPacketCapture method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayConnectionName - The name of the virtual network gateway Connection. +// - parameters - Virtual network gateway packet capture parameters supplied to stop packet capture on gateway connection. +// - options - VirtualNetworkGatewayConnectionsClientBeginStopPacketCaptureOptions contains the optional parameters for the +// VirtualNetworkGatewayConnectionsClient.BeginStopPacketCapture method. func (client *VirtualNetworkGatewayConnectionsClient) BeginStopPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VPNPacketCaptureStopParameters, options *VirtualNetworkGatewayConnectionsClientBeginStopPacketCaptureOptions) (*runtime.Poller[VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.stopPacketCapture(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) @@ -731,6 +749,7 @@ func (client *VirtualNetworkGatewayConnectionsClient) BeginStopPacketCapture(ctx // StopPacketCapture - Stops packet capture on virtual network gateway connection in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworkGatewayConnectionsClient) stopPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VPNPacketCaptureStopParameters, options *VirtualNetworkGatewayConnectionsClientBeginStopPacketCaptureOptions) (*http.Response, error) { req, err := client.stopPacketCaptureCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) @@ -775,12 +794,13 @@ func (client *VirtualNetworkGatewayConnectionsClient) stopPacketCaptureCreateReq // BeginUpdateTags - Updates a virtual network gateway connection tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayConnectionName - The name of the virtual network gateway connection. -// parameters - Parameters supplied to update virtual network gateway connection tags. -// options - VirtualNetworkGatewayConnectionsClientBeginUpdateTagsOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginUpdateTags -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayConnectionName - The name of the virtual network gateway connection. +// - parameters - Parameters supplied to update virtual network gateway connection tags. +// - options - VirtualNetworkGatewayConnectionsClientBeginUpdateTagsOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginUpdateTags +// method. func (client *VirtualNetworkGatewayConnectionsClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters TagsObject, options *VirtualNetworkGatewayConnectionsClientBeginUpdateTagsOptions) (*runtime.Poller[VirtualNetworkGatewayConnectionsClientUpdateTagsResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.updateTags(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) @@ -797,6 +817,7 @@ func (client *VirtualNetworkGatewayConnectionsClient) BeginUpdateTags(ctx contex // UpdateTags - Updates a virtual network gateway connection tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworkGatewayConnectionsClient) updateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters TagsObject, options *VirtualNetworkGatewayConnectionsClientBeginUpdateTagsOptions) (*http.Response, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) diff --git a/sdk/resourcemanager/network/armnetwork/virtualnetworkgatewayconnections_client_example_test.go b/sdk/resourcemanager/network/armnetwork/virtualnetworkgatewayconnections_client_example_test.go deleted file mode 100644 index 4b6d21b72830..000000000000 --- a/sdk/resourcemanager/network/armnetwork/virtualnetworkgatewayconnections_client_example_test.go +++ /dev/null @@ -1,397 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayConnectionCreate.json -func ExampleVirtualNetworkGatewayConnectionsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewayConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "connS2S", armnetwork.VirtualNetworkGatewayConnection{ - Location: to.Ptr("centralus"), - Properties: &armnetwork.VirtualNetworkGatewayConnectionPropertiesFormat{ - ConnectionMode: to.Ptr(armnetwork.VirtualNetworkGatewayConnectionModeDefault), - ConnectionProtocol: to.Ptr(armnetwork.VirtualNetworkGatewayConnectionProtocolIKEv2), - ConnectionType: to.Ptr(armnetwork.VirtualNetworkGatewayConnectionTypeIPsec), - DpdTimeoutSeconds: to.Ptr[int32](30), - EgressNatRules: []*armnetwork.SubResource{ - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule2"), - }}, - EnableBgp: to.Ptr(false), - GatewayCustomBgpIPAddresses: []*armnetwork.GatewayCustomBgpIPAddressIPConfiguration{ - { - CustomBgpIPAddress: to.Ptr("169.254.21.1"), - IPConfigurationID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/ipConfigurations/default"), - }, - { - CustomBgpIPAddress: to.Ptr("169.254.21.3"), - IPConfigurationID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/ipConfigurations/ActiveActive"), - }}, - IngressNatRules: []*armnetwork.SubResource{ - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1"), - }}, - IPSecPolicies: []*armnetwork.IPSecPolicy{}, - LocalNetworkGateway2: &armnetwork.LocalNetworkGateway{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/localNetworkGateways/localgw"), - Location: to.Ptr("centralus"), - Tags: map[string]*string{}, - Properties: &armnetwork.LocalNetworkGatewayPropertiesFormat{ - GatewayIPAddress: to.Ptr("x.x.x.x"), - LocalNetworkAddressSpace: &armnetwork.AddressSpace{ - AddressPrefixes: []*string{ - to.Ptr("10.1.0.0/16")}, - }, - }, - }, - RoutingWeight: to.Ptr[int32](0), - SharedKey: to.Ptr("Abc123"), - TrafficSelectorPolicies: []*armnetwork.TrafficSelectorPolicy{}, - UsePolicyBasedTrafficSelectors: to.Ptr(false), - VirtualNetworkGateway1: &armnetwork.VirtualNetworkGateway{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw"), - Location: to.Ptr("centralus"), - Tags: map[string]*string{}, - Properties: &armnetwork.VirtualNetworkGatewayPropertiesFormat{ - Active: to.Ptr(false), - BgpSettings: &armnetwork.BgpSettings{ - Asn: to.Ptr[int64](65514), - BgpPeeringAddress: to.Ptr("10.0.1.30"), - PeerWeight: to.Ptr[int32](0), - }, - EnableBgp: to.Ptr(false), - GatewayType: to.Ptr(armnetwork.VirtualNetworkGatewayTypeVPN), - IPConfigurations: []*armnetwork.VirtualNetworkGatewayIPConfiguration{ - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/ipConfigurations/gwipconfig1"), - Name: to.Ptr("gwipconfig1"), - Properties: &armnetwork.VirtualNetworkGatewayIPConfigurationPropertiesFormat{ - PrivateIPAllocationMethod: to.Ptr(armnetwork.IPAllocationMethodDynamic), - PublicIPAddress: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/gwpip"), - }, - Subnet: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet"), - }, - }, - }}, - SKU: &armnetwork.VirtualNetworkGatewaySKU{ - Name: to.Ptr(armnetwork.VirtualNetworkGatewaySKUNameVPNGw1), - Tier: to.Ptr(armnetwork.VirtualNetworkGatewaySKUTierVPNGw1), - }, - VPNType: to.Ptr(armnetwork.VPNTypeRouteBased), - }, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayConnectionGet.json -func ExampleVirtualNetworkGatewayConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewayConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "connS2S", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayConnectionDelete.json -func ExampleVirtualNetworkGatewayConnectionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewayConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "conn1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json -func ExampleVirtualNetworkGatewayConnectionsClient_BeginUpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewayConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdateTags(ctx, "rg1", "test", armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayConnectionSetSharedKey.json -func ExampleVirtualNetworkGatewayConnectionsClient_BeginSetSharedKey() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewayConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginSetSharedKey(ctx, "rg1", "connS2S", armnetwork.ConnectionSharedKey{ - Value: to.Ptr("AzureAbc123"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayConnectionGetSharedKey.json -func ExampleVirtualNetworkGatewayConnectionsClient_GetSharedKey() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewayConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetSharedKey(ctx, "rg1", "connS2S", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayConnectionsList.json -func ExampleVirtualNetworkGatewayConnectionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewayConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayConnectionResetSharedKey.json -func ExampleVirtualNetworkGatewayConnectionsClient_BeginResetSharedKey() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewayConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginResetSharedKey(ctx, "rg1", "conn1", armnetwork.ConnectionResetSharedKey{ - KeyLength: to.Ptr[int32](128), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayConnectionStartPacketCaptureFilterData.json -func ExampleVirtualNetworkGatewayConnectionsClient_BeginStartPacketCapture_startPacketCaptureOnVirtualNetworkGatewayConnectionWithFilter() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewayConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStartPacketCapture(ctx, "rg1", "vpngwcn1", &armnetwork.VirtualNetworkGatewayConnectionsClientBeginStartPacketCaptureOptions{Parameters: &armnetwork.VPNPacketCaptureStartParameters{ - FilterData: to.Ptr("{'TracingFlags': 11,'MaxPacketBufferSize': 120,'MaxFileSize': 200,'Filters': [{'SourceSubnets': ['20.1.1.0/24'],'DestinationSubnets': ['10.1.1.0/24'],'SourcePort': [500],'DestinationPort': [4500],'Protocol': 6,'TcpFlags': 16,'CaptureSingleDirectionTrafficOnly': true}]}"), - }, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayConnectionStartPacketCapture.json -func ExampleVirtualNetworkGatewayConnectionsClient_BeginStartPacketCapture_startPacketCaptureOnVirtualNetworkGatewayConnectionWithoutFilter() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewayConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStartPacketCapture(ctx, "rg1", "vpngwcn1", &armnetwork.VirtualNetworkGatewayConnectionsClientBeginStartPacketCaptureOptions{Parameters: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayConnectionStopPacketCapture.json -func ExampleVirtualNetworkGatewayConnectionsClient_BeginStopPacketCapture() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewayConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStopPacketCapture(ctx, "rg1", "vpngwcn1", armnetwork.VPNPacketCaptureStopParameters{ - SasURL: to.Ptr("https://teststorage.blob.core.windows.net/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-09-13T07:44:05Z&st=2019-09-06T23:44:05Z&spr=https&sig=V1h9D1riltvZMI69d6ihENnFo%2FrCvTqGgjO2lf%2FVBhE%3D"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayConnectionGetIkeSas.json -func ExampleVirtualNetworkGatewayConnectionsClient_BeginGetIkeSas() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewayConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGetIkeSas(ctx, "rg1", "vpngwcn1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayConnectionReset.json -func ExampleVirtualNetworkGatewayConnectionsClient_BeginResetConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewayConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginResetConnection(ctx, "rg1", "conn1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/network/armnetwork/virtualnetworkgatewaynatrules_client.go b/sdk/resourcemanager/network/armnetwork/virtualnetworkgatewaynatrules_client.go index 64c555aefef0..659680fc7ddc 100644 --- a/sdk/resourcemanager/network/armnetwork/virtualnetworkgatewaynatrules_client.go +++ b/sdk/resourcemanager/network/armnetwork/virtualnetworkgatewaynatrules_client.go @@ -32,10 +32,10 @@ type VirtualNetworkGatewayNatRulesClient struct { } // NewVirtualNetworkGatewayNatRulesClient creates a new instance of VirtualNetworkGatewayNatRulesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewVirtualNetworkGatewayNatRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworkGatewayNatRulesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -59,13 +59,14 @@ func NewVirtualNetworkGatewayNatRulesClient(subscriptionID string, credential az // BeginCreateOrUpdate - Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing // nat rules. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the Virtual Network Gateway. -// virtualNetworkGatewayName - The name of the gateway. -// natRuleName - The name of the nat rule. -// natRuleParameters - Parameters supplied to create or Update a Nat Rule. -// options - VirtualNetworkGatewayNatRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The resource group name of the Virtual Network Gateway. +// - virtualNetworkGatewayName - The name of the gateway. +// - natRuleName - The name of the nat rule. +// - natRuleParameters - Parameters supplied to create or Update a Nat Rule. +// - options - VirtualNetworkGatewayNatRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.BeginCreateOrUpdate +// method. func (client *VirtualNetworkGatewayNatRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string, natRuleParameters VirtualNetworkGatewayNatRule, options *VirtualNetworkGatewayNatRulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualNetworkGatewayName, natRuleName, natRuleParameters, options) @@ -83,6 +84,7 @@ func (client *VirtualNetworkGatewayNatRulesClient) BeginCreateOrUpdate(ctx conte // CreateOrUpdate - Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing // nat rules. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworkGatewayNatRulesClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string, natRuleParameters VirtualNetworkGatewayNatRule, options *VirtualNetworkGatewayNatRulesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, natRuleName, natRuleParameters, options) @@ -131,12 +133,13 @@ func (client *VirtualNetworkGatewayNatRulesClient) createOrUpdateCreateRequest(c // BeginDelete - Deletes a nat rule. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the Virtual Network Gateway. -// virtualNetworkGatewayName - The name of the gateway. -// natRuleName - The name of the nat rule. -// options - VirtualNetworkGatewayNatRulesClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.BeginDelete -// method. +// - resourceGroupName - The resource group name of the Virtual Network Gateway. +// - virtualNetworkGatewayName - The name of the gateway. +// - natRuleName - The name of the nat rule. +// - options - VirtualNetworkGatewayNatRulesClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.BeginDelete +// method. func (client *VirtualNetworkGatewayNatRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string, options *VirtualNetworkGatewayNatRulesClientBeginDeleteOptions) (*runtime.Poller[VirtualNetworkGatewayNatRulesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, virtualNetworkGatewayName, natRuleName, options) @@ -153,6 +156,7 @@ func (client *VirtualNetworkGatewayNatRulesClient) BeginDelete(ctx context.Conte // Delete - Deletes a nat rule. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworkGatewayNatRulesClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string, options *VirtualNetworkGatewayNatRulesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, natRuleName, options) @@ -201,12 +205,13 @@ func (client *VirtualNetworkGatewayNatRulesClient) deleteCreateRequest(ctx conte // Get - Retrieves the details of a nat rule. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the Virtual Network Gateway. -// virtualNetworkGatewayName - The name of the gateway. -// natRuleName - The name of the nat rule. -// options - VirtualNetworkGatewayNatRulesClientGetOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.Get -// method. +// - resourceGroupName - The resource group name of the Virtual Network Gateway. +// - virtualNetworkGatewayName - The name of the gateway. +// - natRuleName - The name of the nat rule. +// - options - VirtualNetworkGatewayNatRulesClientGetOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.Get +// method. func (client *VirtualNetworkGatewayNatRulesClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string, options *VirtualNetworkGatewayNatRulesClientGetOptions) (VirtualNetworkGatewayNatRulesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, natRuleName, options) if err != nil { @@ -262,11 +267,12 @@ func (client *VirtualNetworkGatewayNatRulesClient) getHandleResponse(resp *http. } // NewListByVirtualNetworkGatewayPager - Retrieves all nat rules for a particular virtual network gateway. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the virtual network gateway. -// virtualNetworkGatewayName - The name of the gateway. -// options - VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayOptions contains the optional parameters for the -// VirtualNetworkGatewayNatRulesClient.ListByVirtualNetworkGateway method. +// - resourceGroupName - The resource group name of the virtual network gateway. +// - virtualNetworkGatewayName - The name of the gateway. +// - options - VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayOptions contains the optional parameters for the +// VirtualNetworkGatewayNatRulesClient.NewListByVirtualNetworkGatewayPager method. func (client *VirtualNetworkGatewayNatRulesClient) NewListByVirtualNetworkGatewayPager(resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayOptions) *runtime.Pager[VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse] { return runtime.NewPager(runtime.PagingHandler[VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse]{ More: func(page VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/virtualnetworkgatewaynatrules_client_example_test.go b/sdk/resourcemanager/network/armnetwork/virtualnetworkgatewaynatrules_client_example_test.go deleted file mode 100644 index 0a786d6a088c..000000000000 --- a/sdk/resourcemanager/network/armnetwork/virtualnetworkgatewaynatrules_client_example_test.go +++ /dev/null @@ -1,121 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayNatRuleGet.json -func ExampleVirtualNetworkGatewayNatRulesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewayNatRulesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "gateway1", "natRule1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayNatRulePut.json -func ExampleVirtualNetworkGatewayNatRulesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewayNatRulesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "gateway1", "natRule1", armnetwork.VirtualNetworkGatewayNatRule{ - Properties: &armnetwork.VirtualNetworkGatewayNatRuleProperties{ - Type: to.Ptr(armnetwork.VPNNatRuleTypeStatic), - ExternalMappings: []*armnetwork.VPNNatRuleMapping{ - { - AddressSpace: to.Ptr("192.168.21.0/24"), - PortRange: to.Ptr("300-400"), - }}, - InternalMappings: []*armnetwork.VPNNatRuleMapping{ - { - AddressSpace: to.Ptr("10.4.0.0/24"), - PortRange: to.Ptr("200-300"), - }}, - IPConfigurationID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/gateway1/ipConfigurations/default"), - Mode: to.Ptr(armnetwork.VPNNatRuleModeEgressSnat), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayNatRuleDelete.json -func ExampleVirtualNetworkGatewayNatRulesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewayNatRulesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "gateway1", "natRule1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayNatRuleList.json -func ExampleVirtualNetworkGatewayNatRulesClient_NewListByVirtualNetworkGatewayPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewayNatRulesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByVirtualNetworkGatewayPager("rg1", "gateway1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/virtualnetworkgateways_client.go b/sdk/resourcemanager/network/armnetwork/virtualnetworkgateways_client.go index 4d7aa574d6b1..7c913816f29a 100644 --- a/sdk/resourcemanager/network/armnetwork/virtualnetworkgateways_client.go +++ b/sdk/resourcemanager/network/armnetwork/virtualnetworkgateways_client.go @@ -32,10 +32,10 @@ type VirtualNetworkGatewaysClient struct { } // NewVirtualNetworkGatewaysClient creates a new instance of VirtualNetworkGatewaysClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewVirtualNetworkGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworkGatewaysClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewVirtualNetworkGatewaysClient(subscriptionID string, credential azcore.To // BeginCreateOrUpdate - Creates or updates a virtual network gateway in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// parameters - Parameters supplied to create or update virtual network gateway operation. -// options - VirtualNetworkGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - parameters - Parameters supplied to create or update virtual network gateway operation. +// - options - VirtualNetworkGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginCreateOrUpdate +// method. func (client *VirtualNetworkGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VirtualNetworkGateway, options *VirtualNetworkGatewaysClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualNetworkGatewaysClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) @@ -80,6 +81,7 @@ func (client *VirtualNetworkGatewaysClient) BeginCreateOrUpdate(ctx context.Cont // CreateOrUpdate - Creates or updates a virtual network gateway in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworkGatewaysClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VirtualNetworkGateway, options *VirtualNetworkGatewaysClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) @@ -124,11 +126,12 @@ func (client *VirtualNetworkGatewaysClient) createOrUpdateCreateRequest(ctx cont // BeginDelete - Deletes the specified virtual network gateway. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// options - VirtualNetworkGatewaysClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - options - VirtualNetworkGatewaysClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginDelete +// method. func (client *VirtualNetworkGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginDeleteOptions) (*runtime.Poller[VirtualNetworkGatewaysClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, virtualNetworkGatewayName, options) @@ -145,6 +148,7 @@ func (client *VirtualNetworkGatewaysClient) BeginDelete(ctx context.Context, res // Delete - Deletes the specified virtual network gateway. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworkGatewaysClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) @@ -190,12 +194,13 @@ func (client *VirtualNetworkGatewaysClient) deleteCreateRequest(ctx context.Cont // BeginDisconnectVirtualNetworkGatewayVPNConnections - Disconnect vpn connections of virtual network gateway in the specified // resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// request - The parameters are supplied to disconnect vpn connections. -// options - VirtualNetworkGatewaysClientBeginDisconnectVirtualNetworkGatewayVPNConnectionsOptions contains the optional parameters -// for the VirtualNetworkGatewaysClient.BeginDisconnectVirtualNetworkGatewayVPNConnections method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - request - The parameters are supplied to disconnect vpn connections. +// - options - VirtualNetworkGatewaysClientBeginDisconnectVirtualNetworkGatewayVPNConnectionsOptions contains the optional parameters +// for the VirtualNetworkGatewaysClient.BeginDisconnectVirtualNetworkGatewayVPNConnections method. func (client *VirtualNetworkGatewaysClient) BeginDisconnectVirtualNetworkGatewayVPNConnections(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, request P2SVPNConnectionRequest, options *VirtualNetworkGatewaysClientBeginDisconnectVirtualNetworkGatewayVPNConnectionsOptions) (*runtime.Poller[VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.disconnectVirtualNetworkGatewayVPNConnections(ctx, resourceGroupName, virtualNetworkGatewayName, request, options) @@ -213,6 +218,7 @@ func (client *VirtualNetworkGatewaysClient) BeginDisconnectVirtualNetworkGateway // DisconnectVirtualNetworkGatewayVPNConnections - Disconnect vpn connections of virtual network gateway in the specified // resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworkGatewaysClient) disconnectVirtualNetworkGatewayVPNConnections(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, request P2SVPNConnectionRequest, options *VirtualNetworkGatewaysClientBeginDisconnectVirtualNetworkGatewayVPNConnectionsOptions) (*http.Response, error) { req, err := client.disconnectVirtualNetworkGatewayVPNConnectionsCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, request, options) @@ -258,12 +264,13 @@ func (client *VirtualNetworkGatewaysClient) disconnectVirtualNetworkGatewayVPNCo // BeginGenerateVPNProfile - Generates VPN profile for P2S client of the virtual network gateway in the specified resource // group. Used for IKEV2 and radius based authentication. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// parameters - Parameters supplied to the generate virtual network gateway VPN client package operation. -// options - VirtualNetworkGatewaysClientBeginGenerateVPNProfileOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGenerateVPNProfile -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - parameters - Parameters supplied to the generate virtual network gateway VPN client package operation. +// - options - VirtualNetworkGatewaysClientBeginGenerateVPNProfileOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGenerateVPNProfile +// method. func (client *VirtualNetworkGatewaysClient) BeginGenerateVPNProfile(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VPNClientParameters, options *VirtualNetworkGatewaysClientBeginGenerateVPNProfileOptions) (*runtime.Poller[VirtualNetworkGatewaysClientGenerateVPNProfileResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.generateVPNProfile(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) @@ -281,6 +288,7 @@ func (client *VirtualNetworkGatewaysClient) BeginGenerateVPNProfile(ctx context. // GenerateVPNProfile - Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. // Used for IKEV2 and radius based authentication. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworkGatewaysClient) generateVPNProfile(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VPNClientParameters, options *VirtualNetworkGatewaysClientBeginGenerateVPNProfileOptions) (*http.Response, error) { req, err := client.generateVPNProfileCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) @@ -326,12 +334,13 @@ func (client *VirtualNetworkGatewaysClient) generateVPNProfileCreateRequest(ctx // BeginGeneratevpnclientpackage - Generates VPN client package for P2S client of the virtual network gateway in the specified // resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// parameters - Parameters supplied to the generate virtual network gateway VPN client package operation. -// options - VirtualNetworkGatewaysClientBeginGeneratevpnclientpackageOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGeneratevpnclientpackage -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - parameters - Parameters supplied to the generate virtual network gateway VPN client package operation. +// - options - VirtualNetworkGatewaysClientBeginGeneratevpnclientpackageOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGeneratevpnclientpackage +// method. func (client *VirtualNetworkGatewaysClient) BeginGeneratevpnclientpackage(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VPNClientParameters, options *VirtualNetworkGatewaysClientBeginGeneratevpnclientpackageOptions) (*runtime.Poller[VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.generatevpnclientpackage(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) @@ -349,6 +358,7 @@ func (client *VirtualNetworkGatewaysClient) BeginGeneratevpnclientpackage(ctx co // Generatevpnclientpackage - Generates VPN client package for P2S client of the virtual network gateway in the specified // resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworkGatewaysClient) generatevpnclientpackage(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VPNClientParameters, options *VirtualNetworkGatewaysClientBeginGeneratevpnclientpackageOptions) (*http.Response, error) { req, err := client.generatevpnclientpackageCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) @@ -393,11 +403,12 @@ func (client *VirtualNetworkGatewaysClient) generatevpnclientpackageCreateReques // Get - Gets the specified virtual network gateway by resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// options - VirtualNetworkGatewaysClientGetOptions contains the optional parameters for the VirtualNetworkGatewaysClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - options - VirtualNetworkGatewaysClientGetOptions contains the optional parameters for the VirtualNetworkGatewaysClient.Get +// method. func (client *VirtualNetworkGatewaysClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientGetOptions) (VirtualNetworkGatewaysClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) if err != nil { @@ -451,12 +462,13 @@ func (client *VirtualNetworkGatewaysClient) getHandleResponse(resp *http.Respons // BeginGetAdvertisedRoutes - This operation retrieves a list of routes the virtual network gateway is advertising to the // specified peer. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// peer - The IP address of the peer. -// options - VirtualNetworkGatewaysClientBeginGetAdvertisedRoutesOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetAdvertisedRoutes -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - peer - The IP address of the peer. +// - options - VirtualNetworkGatewaysClientBeginGetAdvertisedRoutesOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetAdvertisedRoutes +// method. func (client *VirtualNetworkGatewaysClient) BeginGetAdvertisedRoutes(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peer string, options *VirtualNetworkGatewaysClientBeginGetAdvertisedRoutesOptions) (*runtime.Poller[VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.getAdvertisedRoutes(ctx, resourceGroupName, virtualNetworkGatewayName, peer, options) @@ -474,6 +486,7 @@ func (client *VirtualNetworkGatewaysClient) BeginGetAdvertisedRoutes(ctx context // GetAdvertisedRoutes - This operation retrieves a list of routes the virtual network gateway is advertising to the specified // peer. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworkGatewaysClient) getAdvertisedRoutes(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peer string, options *VirtualNetworkGatewaysClientBeginGetAdvertisedRoutesOptions) (*http.Response, error) { req, err := client.getAdvertisedRoutesCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, peer, options) @@ -519,11 +532,12 @@ func (client *VirtualNetworkGatewaysClient) getAdvertisedRoutesCreateRequest(ctx // BeginGetBgpPeerStatus - The GetBgpPeerStatus operation retrieves the status of all BGP peers. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// options - VirtualNetworkGatewaysClientBeginGetBgpPeerStatusOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetBgpPeerStatus -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - options - VirtualNetworkGatewaysClientBeginGetBgpPeerStatusOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetBgpPeerStatus +// method. func (client *VirtualNetworkGatewaysClient) BeginGetBgpPeerStatus(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetBgpPeerStatusOptions) (*runtime.Poller[VirtualNetworkGatewaysClientGetBgpPeerStatusResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.getBgpPeerStatus(ctx, resourceGroupName, virtualNetworkGatewayName, options) @@ -540,6 +554,7 @@ func (client *VirtualNetworkGatewaysClient) BeginGetBgpPeerStatus(ctx context.Co // GetBgpPeerStatus - The GetBgpPeerStatus operation retrieves the status of all BGP peers. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworkGatewaysClient) getBgpPeerStatus(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetBgpPeerStatusOptions) (*http.Response, error) { req, err := client.getBgpPeerStatusCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) @@ -588,11 +603,12 @@ func (client *VirtualNetworkGatewaysClient) getBgpPeerStatusCreateRequest(ctx co // BeginGetLearnedRoutes - This operation retrieves a list of routes the virtual network gateway has learned, including routes // learned from BGP peers. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// options - VirtualNetworkGatewaysClientBeginGetLearnedRoutesOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetLearnedRoutes -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - options - VirtualNetworkGatewaysClientBeginGetLearnedRoutesOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetLearnedRoutes +// method. func (client *VirtualNetworkGatewaysClient) BeginGetLearnedRoutes(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetLearnedRoutesOptions) (*runtime.Poller[VirtualNetworkGatewaysClientGetLearnedRoutesResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.getLearnedRoutes(ctx, resourceGroupName, virtualNetworkGatewayName, options) @@ -610,6 +626,7 @@ func (client *VirtualNetworkGatewaysClient) BeginGetLearnedRoutes(ctx context.Co // GetLearnedRoutes - This operation retrieves a list of routes the virtual network gateway has learned, including routes // learned from BGP peers. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworkGatewaysClient) getLearnedRoutes(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetLearnedRoutesOptions) (*http.Response, error) { req, err := client.getLearnedRoutesCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) @@ -655,11 +672,12 @@ func (client *VirtualNetworkGatewaysClient) getLearnedRoutesCreateRequest(ctx co // BeginGetVPNProfilePackageURL - Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified // resource group. The profile needs to be generated first using generateVpnProfile. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// options - VirtualNetworkGatewaysClientBeginGetVPNProfilePackageURLOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetVPNProfilePackageURL -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - options - VirtualNetworkGatewaysClientBeginGetVPNProfilePackageURLOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetVPNProfilePackageURL +// method. func (client *VirtualNetworkGatewaysClient) BeginGetVPNProfilePackageURL(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetVPNProfilePackageURLOptions) (*runtime.Poller[VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.getVPNProfilePackageURL(ctx, resourceGroupName, virtualNetworkGatewayName, options) @@ -677,6 +695,7 @@ func (client *VirtualNetworkGatewaysClient) BeginGetVPNProfilePackageURL(ctx con // GetVPNProfilePackageURL - Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified // resource group. The profile needs to be generated first using generateVpnProfile. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworkGatewaysClient) getVPNProfilePackageURL(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetVPNProfilePackageURLOptions) (*http.Response, error) { req, err := client.getVPNProfilePackageURLCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) @@ -722,11 +741,12 @@ func (client *VirtualNetworkGatewaysClient) getVPNProfilePackageURLCreateRequest // BeginGetVpnclientConnectionHealth - Get VPN client connection health detail per P2S client connection of the virtual network // gateway in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// options - VirtualNetworkGatewaysClientBeginGetVpnclientConnectionHealthOptions contains the optional parameters for the -// VirtualNetworkGatewaysClient.BeginGetVpnclientConnectionHealth method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - options - VirtualNetworkGatewaysClientBeginGetVpnclientConnectionHealthOptions contains the optional parameters for the +// VirtualNetworkGatewaysClient.BeginGetVpnclientConnectionHealth method. func (client *VirtualNetworkGatewaysClient) BeginGetVpnclientConnectionHealth(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetVpnclientConnectionHealthOptions) (*runtime.Poller[VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.getVpnclientConnectionHealth(ctx, resourceGroupName, virtualNetworkGatewayName, options) @@ -744,6 +764,7 @@ func (client *VirtualNetworkGatewaysClient) BeginGetVpnclientConnectionHealth(ct // GetVpnclientConnectionHealth - Get VPN client connection health detail per P2S client connection of the virtual network // gateway in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworkGatewaysClient) getVpnclientConnectionHealth(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetVpnclientConnectionHealthOptions) (*http.Response, error) { req, err := client.getVpnclientConnectionHealthCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) @@ -790,11 +811,12 @@ func (client *VirtualNetworkGatewaysClient) getVpnclientConnectionHealthCreateRe // ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource // provider. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The virtual network gateway name. -// options - VirtualNetworkGatewaysClientBeginGetVpnclientIPSecParametersOptions contains the optional parameters for the -// VirtualNetworkGatewaysClient.BeginGetVpnclientIPSecParameters method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The virtual network gateway name. +// - options - VirtualNetworkGatewaysClientBeginGetVpnclientIPSecParametersOptions contains the optional parameters for the +// VirtualNetworkGatewaysClient.BeginGetVpnclientIPSecParameters method. func (client *VirtualNetworkGatewaysClient) BeginGetVpnclientIPSecParameters(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetVpnclientIPSecParametersOptions) (*runtime.Poller[VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.getVpnclientIPSecParameters(ctx, resourceGroupName, virtualNetworkGatewayName, options) @@ -813,6 +835,7 @@ func (client *VirtualNetworkGatewaysClient) BeginGetVpnclientIPSecParameters(ctx // policy for P2S client of virtual network gateway in the specified resource group through Network resource // provider. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworkGatewaysClient) getVpnclientIPSecParameters(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetVpnclientIPSecParametersOptions) (*http.Response, error) { req, err := client.getVpnclientIPSecParametersCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) @@ -856,10 +879,11 @@ func (client *VirtualNetworkGatewaysClient) getVpnclientIPSecParametersCreateReq } // NewListPager - Gets all virtual network gateways by resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - VirtualNetworkGatewaysClientListOptions contains the optional parameters for the VirtualNetworkGatewaysClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - options - VirtualNetworkGatewaysClientListOptions contains the optional parameters for the VirtualNetworkGatewaysClient.NewListPager +// method. func (client *VirtualNetworkGatewaysClient) NewListPager(resourceGroupName string, options *VirtualNetworkGatewaysClientListOptions) *runtime.Pager[VirtualNetworkGatewaysClientListResponse] { return runtime.NewPager(runtime.PagingHandler[VirtualNetworkGatewaysClientListResponse]{ More: func(page VirtualNetworkGatewaysClientListResponse) bool { @@ -920,11 +944,12 @@ func (client *VirtualNetworkGatewaysClient) listHandleResponse(resp *http.Respon } // NewListConnectionsPager - Gets all the connections in a virtual network gateway. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// options - VirtualNetworkGatewaysClientListConnectionsOptions contains the optional parameters for the VirtualNetworkGatewaysClient.ListConnections -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - options - VirtualNetworkGatewaysClientListConnectionsOptions contains the optional parameters for the VirtualNetworkGatewaysClient.NewListConnectionsPager +// method. func (client *VirtualNetworkGatewaysClient) NewListConnectionsPager(resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientListConnectionsOptions) *runtime.Pager[VirtualNetworkGatewaysClientListConnectionsResponse] { return runtime.NewPager(runtime.PagingHandler[VirtualNetworkGatewaysClientListConnectionsResponse]{ More: func(page VirtualNetworkGatewaysClientListConnectionsResponse) bool { @@ -990,11 +1015,12 @@ func (client *VirtualNetworkGatewaysClient) listConnectionsHandleResponse(resp * // BeginReset - Resets the primary of the virtual network gateway in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// options - VirtualNetworkGatewaysClientBeginResetOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginReset -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - options - VirtualNetworkGatewaysClientBeginResetOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginReset +// method. func (client *VirtualNetworkGatewaysClient) BeginReset(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginResetOptions) (*runtime.Poller[VirtualNetworkGatewaysClientResetResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.reset(ctx, resourceGroupName, virtualNetworkGatewayName, options) @@ -1011,6 +1037,7 @@ func (client *VirtualNetworkGatewaysClient) BeginReset(ctx context.Context, reso // Reset - Resets the primary of the virtual network gateway in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworkGatewaysClient) reset(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginResetOptions) (*http.Response, error) { req, err := client.resetCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) @@ -1059,11 +1086,12 @@ func (client *VirtualNetworkGatewaysClient) resetCreateRequest(ctx context.Conte // BeginResetVPNClientSharedKey - Resets the VPN client shared key of the virtual network gateway in the specified resource // group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// options - VirtualNetworkGatewaysClientBeginResetVPNClientSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginResetVPNClientSharedKey -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - options - VirtualNetworkGatewaysClientBeginResetVPNClientSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginResetVPNClientSharedKey +// method. func (client *VirtualNetworkGatewaysClient) BeginResetVPNClientSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginResetVPNClientSharedKeyOptions) (*runtime.Poller[VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.resetVPNClientSharedKey(ctx, resourceGroupName, virtualNetworkGatewayName, options) @@ -1080,6 +1108,7 @@ func (client *VirtualNetworkGatewaysClient) BeginResetVPNClientSharedKey(ctx con // ResetVPNClientSharedKey - Resets the VPN client shared key of the virtual network gateway in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworkGatewaysClient) resetVPNClientSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginResetVPNClientSharedKeyOptions) (*http.Response, error) { req, err := client.resetVPNClientSharedKeyCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) @@ -1125,13 +1154,14 @@ func (client *VirtualNetworkGatewaysClient) resetVPNClientSharedKeyCreateRequest // BeginSetVpnclientIPSecParameters - The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client // of virtual network gateway in the specified resource group through Network resource provider. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// vpnclientIPSecParams - Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client -// operation through Network resource provider. -// options - VirtualNetworkGatewaysClientBeginSetVpnclientIPSecParametersOptions contains the optional parameters for the -// VirtualNetworkGatewaysClient.BeginSetVpnclientIPSecParameters method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - vpnclientIPSecParams - Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client +// operation through Network resource provider. +// - options - VirtualNetworkGatewaysClientBeginSetVpnclientIPSecParametersOptions contains the optional parameters for the +// VirtualNetworkGatewaysClient.BeginSetVpnclientIPSecParameters method. func (client *VirtualNetworkGatewaysClient) BeginSetVpnclientIPSecParameters(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, vpnclientIPSecParams VPNClientIPsecParameters, options *VirtualNetworkGatewaysClientBeginSetVpnclientIPSecParametersOptions) (*runtime.Poller[VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.setVpnclientIPSecParameters(ctx, resourceGroupName, virtualNetworkGatewayName, vpnclientIPSecParams, options) @@ -1149,6 +1179,7 @@ func (client *VirtualNetworkGatewaysClient) BeginSetVpnclientIPSecParameters(ctx // SetVpnclientIPSecParameters - The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client // of virtual network gateway in the specified resource group through Network resource provider. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworkGatewaysClient) setVpnclientIPSecParameters(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, vpnclientIPSecParams VPNClientIPsecParameters, options *VirtualNetworkGatewaysClientBeginSetVpnclientIPSecParametersOptions) (*http.Response, error) { req, err := client.setVpnclientIPSecParametersCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, vpnclientIPSecParams, options) @@ -1193,11 +1224,12 @@ func (client *VirtualNetworkGatewaysClient) setVpnclientIPSecParametersCreateReq // BeginStartPacketCapture - Starts packet capture on virtual network gateway in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// options - VirtualNetworkGatewaysClientBeginStartPacketCaptureOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginStartPacketCapture -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - options - VirtualNetworkGatewaysClientBeginStartPacketCaptureOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginStartPacketCapture +// method. func (client *VirtualNetworkGatewaysClient) BeginStartPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginStartPacketCaptureOptions) (*runtime.Poller[VirtualNetworkGatewaysClientStartPacketCaptureResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.startPacketCapture(ctx, resourceGroupName, virtualNetworkGatewayName, options) @@ -1214,6 +1246,7 @@ func (client *VirtualNetworkGatewaysClient) BeginStartPacketCapture(ctx context. // StartPacketCapture - Starts packet capture on virtual network gateway in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworkGatewaysClient) startPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginStartPacketCaptureOptions) (*http.Response, error) { req, err := client.startPacketCaptureCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) @@ -1261,12 +1294,13 @@ func (client *VirtualNetworkGatewaysClient) startPacketCaptureCreateRequest(ctx // BeginStopPacketCapture - Stops packet capture on virtual network gateway in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// parameters - Virtual network gateway packet capture parameters supplied to stop packet capture on gateway. -// options - VirtualNetworkGatewaysClientBeginStopPacketCaptureOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginStopPacketCapture -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - parameters - Virtual network gateway packet capture parameters supplied to stop packet capture on gateway. +// - options - VirtualNetworkGatewaysClientBeginStopPacketCaptureOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginStopPacketCapture +// method. func (client *VirtualNetworkGatewaysClient) BeginStopPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VPNPacketCaptureStopParameters, options *VirtualNetworkGatewaysClientBeginStopPacketCaptureOptions) (*runtime.Poller[VirtualNetworkGatewaysClientStopPacketCaptureResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.stopPacketCapture(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) @@ -1283,6 +1317,7 @@ func (client *VirtualNetworkGatewaysClient) BeginStopPacketCapture(ctx context.C // StopPacketCapture - Stops packet capture on virtual network gateway in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworkGatewaysClient) stopPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VPNPacketCaptureStopParameters, options *VirtualNetworkGatewaysClientBeginStopPacketCaptureOptions) (*http.Response, error) { req, err := client.stopPacketCaptureCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) @@ -1327,11 +1362,12 @@ func (client *VirtualNetworkGatewaysClient) stopPacketCaptureCreateRequest(ctx c // SupportedVPNDevices - Gets a xml format representation for supported vpn devices. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// options - VirtualNetworkGatewaysClientSupportedVPNDevicesOptions contains the optional parameters for the VirtualNetworkGatewaysClient.SupportedVPNDevices -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - options - VirtualNetworkGatewaysClientSupportedVPNDevicesOptions contains the optional parameters for the VirtualNetworkGatewaysClient.SupportedVPNDevices +// method. func (client *VirtualNetworkGatewaysClient) SupportedVPNDevices(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientSupportedVPNDevicesOptions) (VirtualNetworkGatewaysClientSupportedVPNDevicesResponse, error) { req, err := client.supportedVPNDevicesCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) if err != nil { @@ -1384,12 +1420,13 @@ func (client *VirtualNetworkGatewaysClient) supportedVPNDevicesHandleResponse(re // BeginUpdateTags - Updates a virtual network gateway tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayName - The name of the virtual network gateway. -// parameters - Parameters supplied to update virtual network gateway tags. -// options - VirtualNetworkGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginUpdateTags -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayName - The name of the virtual network gateway. +// - parameters - Parameters supplied to update virtual network gateway tags. +// - options - VirtualNetworkGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginUpdateTags +// method. func (client *VirtualNetworkGatewaysClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters TagsObject, options *VirtualNetworkGatewaysClientBeginUpdateTagsOptions) (*runtime.Poller[VirtualNetworkGatewaysClientUpdateTagsResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.updateTags(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) @@ -1406,6 +1443,7 @@ func (client *VirtualNetworkGatewaysClient) BeginUpdateTags(ctx context.Context, // UpdateTags - Updates a virtual network gateway tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworkGatewaysClient) updateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters TagsObject, options *VirtualNetworkGatewaysClientBeginUpdateTagsOptions) (*http.Response, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) @@ -1450,13 +1488,14 @@ func (client *VirtualNetworkGatewaysClient) updateTagsCreateRequest(ctx context. // VPNDeviceConfigurationScript - Gets a xml format representation for vpn device configuration script. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkGatewayConnectionName - The name of the virtual network gateway connection for which the configuration script -// is generated. -// parameters - Parameters supplied to the generate vpn device script operation. -// options - VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptOptions contains the optional parameters for the VirtualNetworkGatewaysClient.VPNDeviceConfigurationScript -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkGatewayConnectionName - The name of the virtual network gateway connection for which the configuration script +// is generated. +// - parameters - Parameters supplied to the generate vpn device script operation. +// - options - VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptOptions contains the optional parameters for the VirtualNetworkGatewaysClient.VPNDeviceConfigurationScript +// method. func (client *VirtualNetworkGatewaysClient) VPNDeviceConfigurationScript(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VPNDeviceScriptParameters, options *VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptOptions) (VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResponse, error) { req, err := client.vpnDeviceConfigurationScriptCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/virtualnetworkgateways_client_example_test.go b/sdk/resourcemanager/network/armnetwork/virtualnetworkgateways_client_example_test.go deleted file mode 100644 index 0ab8ad4340d5..000000000000 --- a/sdk/resourcemanager/network/armnetwork/virtualnetworkgateways_client_example_test.go +++ /dev/null @@ -1,644 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayUpdate.json -func ExampleVirtualNetworkGatewaysClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "vpngw", armnetwork.VirtualNetworkGateway{ - Location: to.Ptr("centralus"), - Properties: &armnetwork.VirtualNetworkGatewayPropertiesFormat{ - Active: to.Ptr(false), - AllowRemoteVnetTraffic: to.Ptr(false), - AllowVirtualWanTraffic: to.Ptr(false), - BgpSettings: &armnetwork.BgpSettings{ - Asn: to.Ptr[int64](65515), - BgpPeeringAddress: to.Ptr("10.0.1.30"), - PeerWeight: to.Ptr[int32](0), - }, - CustomRoutes: &armnetwork.AddressSpace{ - AddressPrefixes: []*string{ - to.Ptr("101.168.0.6/32")}, - }, - DisableIPSecReplayProtection: to.Ptr(false), - EnableBgp: to.Ptr(false), - EnableBgpRouteTranslationForNat: to.Ptr(false), - EnableDNSForwarding: to.Ptr(true), - GatewayType: to.Ptr(armnetwork.VirtualNetworkGatewayTypeVPN), - IPConfigurations: []*armnetwork.VirtualNetworkGatewayIPConfiguration{ - { - Name: to.Ptr("gwipconfig1"), - Properties: &armnetwork.VirtualNetworkGatewayIPConfigurationPropertiesFormat{ - PrivateIPAllocationMethod: to.Ptr(armnetwork.IPAllocationMethodDynamic), - PublicIPAddress: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/gwpip"), - }, - Subnet: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet"), - }, - }, - }}, - NatRules: []*armnetwork.VirtualNetworkGatewayNatRule{ - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1"), - Name: to.Ptr("natRule1"), - Properties: &armnetwork.VirtualNetworkGatewayNatRuleProperties{ - Type: to.Ptr(armnetwork.VPNNatRuleTypeStatic), - ExternalMappings: []*armnetwork.VPNNatRuleMapping{ - { - AddressSpace: to.Ptr("50.0.0.0/24"), - }}, - InternalMappings: []*armnetwork.VPNNatRuleMapping{ - { - AddressSpace: to.Ptr("10.10.0.0/24"), - }}, - IPConfigurationID: to.Ptr(""), - Mode: to.Ptr(armnetwork.VPNNatRuleModeEgressSnat), - }, - }, - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule2"), - Name: to.Ptr("natRule2"), - Properties: &armnetwork.VirtualNetworkGatewayNatRuleProperties{ - Type: to.Ptr(armnetwork.VPNNatRuleTypeStatic), - ExternalMappings: []*armnetwork.VPNNatRuleMapping{ - { - AddressSpace: to.Ptr("30.0.0.0/24"), - }}, - InternalMappings: []*armnetwork.VPNNatRuleMapping{ - { - AddressSpace: to.Ptr("20.10.0.0/24"), - }}, - IPConfigurationID: to.Ptr(""), - Mode: to.Ptr(armnetwork.VPNNatRuleModeIngressSnat), - }, - }}, - SKU: &armnetwork.VirtualNetworkGatewaySKU{ - Name: to.Ptr(armnetwork.VirtualNetworkGatewaySKUNameVPNGw1), - Tier: to.Ptr(armnetwork.VirtualNetworkGatewaySKUTierVPNGw1), - }, - VPNClientConfiguration: &armnetwork.VPNClientConfiguration{ - RadiusServers: []*armnetwork.RadiusServer{ - { - RadiusServerAddress: to.Ptr("10.2.0.0"), - RadiusServerScore: to.Ptr[int64](20), - RadiusServerSecret: to.Ptr("radiusServerSecret"), - }}, - VPNClientProtocols: []*armnetwork.VPNClientProtocol{ - to.Ptr(armnetwork.VPNClientProtocolOpenVPN)}, - VPNClientRevokedCertificates: []*armnetwork.VPNClientRevokedCertificate{}, - VPNClientRootCertificates: []*armnetwork.VPNClientRootCertificate{}, - }, - VPNType: to.Ptr(armnetwork.VPNTypeRouteBased), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayGet.json -func ExampleVirtualNetworkGatewaysClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "vpngw", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayDelete.json -func ExampleVirtualNetworkGatewaysClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "vpngw", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayUpdateTags.json -func ExampleVirtualNetworkGatewaysClient_BeginUpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdateTags(ctx, "rg1", "vpngw", armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayList.json -func ExampleVirtualNetworkGatewaysClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewaysListConnections.json -func ExampleVirtualNetworkGatewaysClient_NewListConnectionsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListConnectionsPager("testrg", "test-vpn-gateway-1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayReset.json -func ExampleVirtualNetworkGatewaysClient_BeginReset() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginReset(ctx, "rg1", "vpngw", &armnetwork.VirtualNetworkGatewaysClientBeginResetOptions{GatewayVip: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayResetVpnClientSharedKey.json -func ExampleVirtualNetworkGatewaysClient_BeginResetVPNClientSharedKey() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginResetVPNClientSharedKey(ctx, "rg1", "vpngw", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayGenerateVpnClientPackage.json -func ExampleVirtualNetworkGatewaysClient_BeginGeneratevpnclientpackage() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGeneratevpnclientpackage(ctx, "rg1", "vpngw", armnetwork.VPNClientParameters{}, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayGenerateVpnProfile.json -func ExampleVirtualNetworkGatewaysClient_BeginGenerateVPNProfile() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGenerateVPNProfile(ctx, "rg1", "vpngw", armnetwork.VPNClientParameters{}, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayGetVpnProfilePackageUrl.json -func ExampleVirtualNetworkGatewaysClient_BeginGetVPNProfilePackageURL() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGetVPNProfilePackageURL(ctx, "rg1", "vpngw", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayGetBGPPeerStatus.json -func ExampleVirtualNetworkGatewaysClient_BeginGetBgpPeerStatus() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGetBgpPeerStatus(ctx, "rg1", "vpngw", &armnetwork.VirtualNetworkGatewaysClientBeginGetBgpPeerStatusOptions{Peer: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewaySupportedVpnDevice.json -func ExampleVirtualNetworkGatewaysClient_SupportedVPNDevices() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.SupportedVPNDevices(ctx, "rg1", "vpngw", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayLearnedRoutes.json -func ExampleVirtualNetworkGatewaysClient_BeginGetLearnedRoutes() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGetLearnedRoutes(ctx, "rg1", "vpngw", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayGetAdvertisedRoutes.json -func ExampleVirtualNetworkGatewaysClient_BeginGetAdvertisedRoutes() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGetAdvertisedRoutes(ctx, "rg1", "vpngw", "test", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewaySetVpnClientIpsecParameters.json -func ExampleVirtualNetworkGatewaysClient_BeginSetVpnclientIPSecParameters() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginSetVpnclientIPSecParameters(ctx, "rg1", "vpngw", armnetwork.VPNClientIPsecParameters{ - DhGroup: to.Ptr(armnetwork.DhGroupDHGroup2), - IkeEncryption: to.Ptr(armnetwork.IkeEncryptionAES256), - IkeIntegrity: to.Ptr(armnetwork.IkeIntegritySHA384), - IPSecEncryption: to.Ptr(armnetwork.IPSecEncryptionAES256), - IPSecIntegrity: to.Ptr(armnetwork.IPSecIntegritySHA256), - PfsGroup: to.Ptr(armnetwork.PfsGroupPFS2), - SaDataSizeKilobytes: to.Ptr[int32](429497), - SaLifeTimeSeconds: to.Ptr[int32](86473), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayGetVpnClientIpsecParameters.json -func ExampleVirtualNetworkGatewaysClient_BeginGetVpnclientIPSecParameters() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGetVpnclientIPSecParameters(ctx, "rg1", "vpngw", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayVpnDeviceConfigurationScript.json -func ExampleVirtualNetworkGatewaysClient_VPNDeviceConfigurationScript() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.VPNDeviceConfigurationScript(ctx, "rg1", "vpngw", armnetwork.VPNDeviceScriptParameters{ - DeviceFamily: to.Ptr("ISR"), - FirmwareVersion: to.Ptr("IOS 15.1 (Preview)"), - Vendor: to.Ptr("Cisco"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayStartPacketCaptureFilterData.json -func ExampleVirtualNetworkGatewaysClient_BeginStartPacketCapture_startPacketCaptureOnVirtualNetworkGatewayWithFilter() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStartPacketCapture(ctx, "rg1", "vpngw", &armnetwork.VirtualNetworkGatewaysClientBeginStartPacketCaptureOptions{Parameters: &armnetwork.VPNPacketCaptureStartParameters{ - FilterData: to.Ptr("{'TracingFlags': 11,'MaxPacketBufferSize': 120,'MaxFileSize': 200,'Filters': [{'SourceSubnets': ['20.1.1.0/24'],'DestinationSubnets': ['10.1.1.0/24'],'SourcePort': [500],'DestinationPort': [4500],'Protocol': 6,'TcpFlags': 16,'CaptureSingleDirectionTrafficOnly': true}]}"), - }, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayStartPacketCapture.json -func ExampleVirtualNetworkGatewaysClient_BeginStartPacketCapture_startPacketCaptureOnVirtualNetworkGatewayWithoutFilter() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStartPacketCapture(ctx, "rg1", "vpngw", &armnetwork.VirtualNetworkGatewaysClientBeginStartPacketCaptureOptions{Parameters: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayStopPacketCapture.json -func ExampleVirtualNetworkGatewaysClient_BeginStopPacketCapture() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStopPacketCapture(ctx, "rg1", "vpngw", armnetwork.VPNPacketCaptureStopParameters{ - SasURL: to.Ptr("https://teststorage.blob.core.windows.net/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-09-13T07:44:05Z&st=2019-09-06T23:44:05Z&spr=https&sig=V1h9D1riltvZMI69d6ihENnFo%2FrCvTqGgjO2lf%2FVBhE%3D"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewayGetVpnclientConnectionHealth.json -func ExampleVirtualNetworkGatewaysClient_BeginGetVpnclientConnectionHealth() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGetVpnclientConnectionHealth(ctx, "p2s-vnet-test", "vpnp2sgw", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGatewaysDisconnectP2sVpnConnections.json -func ExampleVirtualNetworkGatewaysClient_BeginDisconnectVirtualNetworkGatewayVPNConnections() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDisconnectVirtualNetworkGatewayVPNConnections(ctx, "vpn-gateway-test", "vpngateway", armnetwork.P2SVPNConnectionRequest{ - VPNConnectionIDs: []*string{ - to.Ptr("vpnconnId1"), - to.Ptr("vpnconnId2")}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/network/armnetwork/virtualnetworkpeerings_client.go b/sdk/resourcemanager/network/armnetwork/virtualnetworkpeerings_client.go index 2ca708a0c6e6..15cac976c106 100644 --- a/sdk/resourcemanager/network/armnetwork/virtualnetworkpeerings_client.go +++ b/sdk/resourcemanager/network/armnetwork/virtualnetworkpeerings_client.go @@ -32,10 +32,10 @@ type VirtualNetworkPeeringsClient struct { } // NewVirtualNetworkPeeringsClient creates a new instance of VirtualNetworkPeeringsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewVirtualNetworkPeeringsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworkPeeringsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewVirtualNetworkPeeringsClient(subscriptionID string, credential azcore.To // BeginCreateOrUpdate - Creates or updates a peering in the specified virtual network. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// virtualNetworkPeeringName - The name of the peering. -// virtualNetworkPeeringParameters - Parameters supplied to the create or update virtual network peering operation. -// options - VirtualNetworkPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkPeeringsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - virtualNetworkPeeringName - The name of the peering. +// - virtualNetworkPeeringParameters - Parameters supplied to the create or update virtual network peering operation. +// - options - VirtualNetworkPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkPeeringsClient.BeginCreateOrUpdate +// method. func (client *VirtualNetworkPeeringsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, virtualNetworkPeeringParameters VirtualNetworkPeering, options *VirtualNetworkPeeringsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualNetworkPeeringsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, virtualNetworkPeeringParameters, options) @@ -81,6 +82,7 @@ func (client *VirtualNetworkPeeringsClient) BeginCreateOrUpdate(ctx context.Cont // CreateOrUpdate - Creates or updates a peering in the specified virtual network. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworkPeeringsClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, virtualNetworkPeeringParameters VirtualNetworkPeering, options *VirtualNetworkPeeringsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, virtualNetworkPeeringParameters, options) @@ -132,12 +134,13 @@ func (client *VirtualNetworkPeeringsClient) createOrUpdateCreateRequest(ctx cont // BeginDelete - Deletes the specified virtual network peering. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// virtualNetworkPeeringName - The name of the virtual network peering. -// options - VirtualNetworkPeeringsClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkPeeringsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - virtualNetworkPeeringName - The name of the virtual network peering. +// - options - VirtualNetworkPeeringsClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkPeeringsClient.BeginDelete +// method. func (client *VirtualNetworkPeeringsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, options *VirtualNetworkPeeringsClientBeginDeleteOptions) (*runtime.Poller[VirtualNetworkPeeringsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, options) @@ -154,6 +157,7 @@ func (client *VirtualNetworkPeeringsClient) BeginDelete(ctx context.Context, res // Delete - Deletes the specified virtual network peering. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworkPeeringsClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, options *VirtualNetworkPeeringsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, options) @@ -202,12 +206,13 @@ func (client *VirtualNetworkPeeringsClient) deleteCreateRequest(ctx context.Cont // Get - Gets the specified virtual network peering. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// virtualNetworkPeeringName - The name of the virtual network peering. -// options - VirtualNetworkPeeringsClientGetOptions contains the optional parameters for the VirtualNetworkPeeringsClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - virtualNetworkPeeringName - The name of the virtual network peering. +// - options - VirtualNetworkPeeringsClientGetOptions contains the optional parameters for the VirtualNetworkPeeringsClient.Get +// method. func (client *VirtualNetworkPeeringsClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, options *VirtualNetworkPeeringsClientGetOptions) (VirtualNetworkPeeringsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, options) if err != nil { @@ -263,11 +268,12 @@ func (client *VirtualNetworkPeeringsClient) getHandleResponse(resp *http.Respons } // NewListPager - Gets all virtual network peerings in a virtual network. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// options - VirtualNetworkPeeringsClientListOptions contains the optional parameters for the VirtualNetworkPeeringsClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - options - VirtualNetworkPeeringsClientListOptions contains the optional parameters for the VirtualNetworkPeeringsClient.NewListPager +// method. func (client *VirtualNetworkPeeringsClient) NewListPager(resourceGroupName string, virtualNetworkName string, options *VirtualNetworkPeeringsClientListOptions) *runtime.Pager[VirtualNetworkPeeringsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[VirtualNetworkPeeringsClientListResponse]{ More: func(page VirtualNetworkPeeringsClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/virtualnetworkpeerings_client_example_test.go b/sdk/resourcemanager/network/armnetwork/virtualnetworkpeerings_client_example_test.go deleted file mode 100644 index d9453f79613d..000000000000 --- a/sdk/resourcemanager/network/armnetwork/virtualnetworkpeerings_client_example_test.go +++ /dev/null @@ -1,224 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkPeeringDelete.json -func ExampleVirtualNetworkPeeringsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkPeeringsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "peerTest", "vnet1", "peer", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkPeeringGet.json -func ExampleVirtualNetworkPeeringsClient_Get_getPeering() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkPeeringsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "peerTest", "vnet1", "peer", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json -func ExampleVirtualNetworkPeeringsClient_Get_getPeeringWithRemoteVirtualNetworkEncryption() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkPeeringsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "peerTest", "vnet1", "peer", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkPeeringCreate.json -func ExampleVirtualNetworkPeeringsClient_BeginCreateOrUpdate_createPeering() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkPeeringsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "peerTest", "vnet1", "peer", armnetwork.VirtualNetworkPeering{ - Properties: &armnetwork.VirtualNetworkPeeringPropertiesFormat{ - AllowForwardedTraffic: to.Ptr(true), - AllowGatewayTransit: to.Ptr(false), - AllowVirtualNetworkAccess: to.Ptr(true), - RemoteVirtualNetwork: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"), - }, - UseRemoteGateways: to.Ptr(false), - }, - }, &armnetwork.VirtualNetworkPeeringsClientBeginCreateOrUpdateOptions{SyncRemoteAddressSpace: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkPeeringCreateWithRemoteVirtualNetworkEncryption.json -func ExampleVirtualNetworkPeeringsClient_BeginCreateOrUpdate_createPeeringWithRemoteVirtualNetworkEncryption() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkPeeringsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "peerTest", "vnet1", "peer", armnetwork.VirtualNetworkPeering{ - Properties: &armnetwork.VirtualNetworkPeeringPropertiesFormat{ - AllowForwardedTraffic: to.Ptr(true), - AllowGatewayTransit: to.Ptr(false), - AllowVirtualNetworkAccess: to.Ptr(true), - RemoteVirtualNetwork: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"), - }, - UseRemoteGateways: to.Ptr(false), - }, - }, &armnetwork.VirtualNetworkPeeringsClientBeginCreateOrUpdateOptions{SyncRemoteAddressSpace: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkPeeringSync.json -func ExampleVirtualNetworkPeeringsClient_BeginCreateOrUpdate_syncPeering() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkPeeringsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "peerTest", "vnet1", "peer", armnetwork.VirtualNetworkPeering{ - Properties: &armnetwork.VirtualNetworkPeeringPropertiesFormat{ - AllowForwardedTraffic: to.Ptr(true), - AllowGatewayTransit: to.Ptr(false), - AllowVirtualNetworkAccess: to.Ptr(true), - RemoteVirtualNetwork: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"), - }, - UseRemoteGateways: to.Ptr(false), - }, - }, &armnetwork.VirtualNetworkPeeringsClientBeginCreateOrUpdateOptions{SyncRemoteAddressSpace: to.Ptr(armnetwork.SyncRemoteAddressSpaceTrue)}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkPeeringList.json -func ExampleVirtualNetworkPeeringsClient_NewListPager_listPeerings() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkPeeringsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("peerTest", "vnet1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkPeeringListWithRemoteVirtualNetworkEncryption.json -func ExampleVirtualNetworkPeeringsClient_NewListPager_listPeeringsWithRemoteVirtualNetworkEncryption() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkPeeringsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("peerTest", "vnet1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/virtualnetworks_client.go b/sdk/resourcemanager/network/armnetwork/virtualnetworks_client.go index f2ff208e78e2..e7e51250c3fb 100644 --- a/sdk/resourcemanager/network/armnetwork/virtualnetworks_client.go +++ b/sdk/resourcemanager/network/armnetwork/virtualnetworks_client.go @@ -33,10 +33,10 @@ type VirtualNetworksClient struct { } // NewVirtualNetworksClient creates a new instance of VirtualNetworksClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewVirtualNetworksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworksClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -59,12 +59,13 @@ func NewVirtualNetworksClient(subscriptionID string, credential azcore.TokenCred // CheckIPAddressAvailability - Checks whether a private IP address is available for use. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// ipAddress - The private IP address to be verified. -// options - VirtualNetworksClientCheckIPAddressAvailabilityOptions contains the optional parameters for the VirtualNetworksClient.CheckIPAddressAvailability -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - ipAddress - The private IP address to be verified. +// - options - VirtualNetworksClientCheckIPAddressAvailabilityOptions contains the optional parameters for the VirtualNetworksClient.CheckIPAddressAvailability +// method. func (client *VirtualNetworksClient) CheckIPAddressAvailability(ctx context.Context, resourceGroupName string, virtualNetworkName string, ipAddress string, options *VirtualNetworksClientCheckIPAddressAvailabilityOptions) (VirtualNetworksClientCheckIPAddressAvailabilityResponse, error) { req, err := client.checkIPAddressAvailabilityCreateRequest(ctx, resourceGroupName, virtualNetworkName, ipAddress, options) if err != nil { @@ -118,12 +119,13 @@ func (client *VirtualNetworksClient) checkIPAddressAvailabilityHandleResponse(re // BeginCreateOrUpdate - Creates or updates a virtual network in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// parameters - Parameters supplied to the create or update virtual network operation. -// options - VirtualNetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworksClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - parameters - Parameters supplied to the create or update virtual network operation. +// - options - VirtualNetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworksClient.BeginCreateOrUpdate +// method. func (client *VirtualNetworksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters VirtualNetwork, options *VirtualNetworksClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualNetworksClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualNetworkName, parameters, options) @@ -140,6 +142,7 @@ func (client *VirtualNetworksClient) BeginCreateOrUpdate(ctx context.Context, re // CreateOrUpdate - Creates or updates a virtual network in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworksClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters VirtualNetwork, options *VirtualNetworksClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualNetworkName, parameters, options) @@ -184,11 +187,12 @@ func (client *VirtualNetworksClient) createOrUpdateCreateRequest(ctx context.Con // BeginDelete - Deletes the specified virtual network. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// options - VirtualNetworksClientBeginDeleteOptions contains the optional parameters for the VirtualNetworksClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - options - VirtualNetworksClientBeginDeleteOptions contains the optional parameters for the VirtualNetworksClient.BeginDelete +// method. func (client *VirtualNetworksClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientBeginDeleteOptions) (*runtime.Poller[VirtualNetworksClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, virtualNetworkName, options) @@ -205,6 +209,7 @@ func (client *VirtualNetworksClient) BeginDelete(ctx context.Context, resourceGr // Delete - Deletes the specified virtual network. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworksClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualNetworkName, options) @@ -249,10 +254,11 @@ func (client *VirtualNetworksClient) deleteCreateRequest(ctx context.Context, re // Get - Gets the specified virtual network by resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// options - VirtualNetworksClientGetOptions contains the optional parameters for the VirtualNetworksClient.Get method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - options - VirtualNetworksClientGetOptions contains the optional parameters for the VirtualNetworksClient.Get method. func (client *VirtualNetworksClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientGetOptions) (VirtualNetworksClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, virtualNetworkName, options) if err != nil { @@ -307,9 +313,11 @@ func (client *VirtualNetworksClient) getHandleResponse(resp *http.Response) (Vir } // NewListPager - Gets all virtual networks in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - VirtualNetworksClientListOptions contains the optional parameters for the VirtualNetworksClient.List method. +// - resourceGroupName - The name of the resource group. +// - options - VirtualNetworksClientListOptions contains the optional parameters for the VirtualNetworksClient.NewListPager +// method. func (client *VirtualNetworksClient) NewListPager(resourceGroupName string, options *VirtualNetworksClientListOptions) *runtime.Pager[VirtualNetworksClientListResponse] { return runtime.NewPager(runtime.PagingHandler[VirtualNetworksClientListResponse]{ More: func(page VirtualNetworksClientListResponse) bool { @@ -370,8 +378,10 @@ func (client *VirtualNetworksClient) listHandleResponse(resp *http.Response) (Vi } // NewListAllPager - Gets all virtual networks in a subscription. +// // Generated from API version 2022-07-01 -// options - VirtualNetworksClientListAllOptions contains the optional parameters for the VirtualNetworksClient.ListAll method. +// - options - VirtualNetworksClientListAllOptions contains the optional parameters for the VirtualNetworksClient.NewListAllPager +// method. func (client *VirtualNetworksClient) NewListAllPager(options *VirtualNetworksClientListAllOptions) *runtime.Pager[VirtualNetworksClientListAllResponse] { return runtime.NewPager(runtime.PagingHandler[VirtualNetworksClientListAllResponse]{ More: func(page VirtualNetworksClientListAllResponse) bool { @@ -428,11 +438,12 @@ func (client *VirtualNetworksClient) listAllHandleResponse(resp *http.Response) } // BeginListDdosProtectionStatus - Gets the Ddos Protection Status of all IP Addresses under the Virtual Network +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// options - VirtualNetworksClientBeginListDdosProtectionStatusOptions contains the optional parameters for the VirtualNetworksClient.BeginListDdosProtectionStatus -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - options - VirtualNetworksClientBeginListDdosProtectionStatusOptions contains the optional parameters for the VirtualNetworksClient.BeginListDdosProtectionStatus +// method. func (client *VirtualNetworksClient) BeginListDdosProtectionStatus(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientBeginListDdosProtectionStatusOptions) (*runtime.Poller[*runtime.Pager[VirtualNetworksClientListDdosProtectionStatusResponse]], error) { pager := runtime.NewPager(runtime.PagingHandler[VirtualNetworksClientListDdosProtectionStatusResponse]{ More: func(page VirtualNetworksClientListDdosProtectionStatusResponse) bool { @@ -470,6 +481,7 @@ func (client *VirtualNetworksClient) BeginListDdosProtectionStatus(ctx context.C } // ListDdosProtectionStatus - Gets the Ddos Protection Status of all IP Addresses under the Virtual Network +// // Generated from API version 2022-07-01 func (client *VirtualNetworksClient) listDdosProtectionStatus(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientBeginListDdosProtectionStatusOptions) (*http.Response, error) { req, err := client.listDdosProtectionStatusCreateRequest(ctx, resourceGroupName, virtualNetworkName, options) @@ -528,11 +540,12 @@ func (client *VirtualNetworksClient) listDdosProtectionStatusHandleResponse(resp } // NewListUsagePager - Lists usage stats. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// options - VirtualNetworksClientListUsageOptions contains the optional parameters for the VirtualNetworksClient.ListUsage -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - options - VirtualNetworksClientListUsageOptions contains the optional parameters for the VirtualNetworksClient.NewListUsagePager +// method. func (client *VirtualNetworksClient) NewListUsagePager(resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientListUsageOptions) *runtime.Pager[VirtualNetworksClientListUsageResponse] { return runtime.NewPager(runtime.PagingHandler[VirtualNetworksClientListUsageResponse]{ More: func(page VirtualNetworksClientListUsageResponse) bool { @@ -598,12 +611,13 @@ func (client *VirtualNetworksClient) listUsageHandleResponse(resp *http.Response // UpdateTags - Updates a virtual network tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualNetworkName - The name of the virtual network. -// parameters - Parameters supplied to update virtual network tags. -// options - VirtualNetworksClientUpdateTagsOptions contains the optional parameters for the VirtualNetworksClient.UpdateTags -// method. +// - resourceGroupName - The name of the resource group. +// - virtualNetworkName - The name of the virtual network. +// - parameters - Parameters supplied to update virtual network tags. +// - options - VirtualNetworksClientUpdateTagsOptions contains the optional parameters for the VirtualNetworksClient.UpdateTags +// method. func (client *VirtualNetworksClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters TagsObject, options *VirtualNetworksClientUpdateTagsOptions) (VirtualNetworksClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, virtualNetworkName, parameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/virtualnetworks_client_example_test.go b/sdk/resourcemanager/network/armnetwork/virtualnetworks_client_example_test.go deleted file mode 100644 index 27b5d7a27d62..000000000000 --- a/sdk/resourcemanager/network/armnetwork/virtualnetworks_client_example_test.go +++ /dev/null @@ -1,570 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkDelete.json -func ExampleVirtualNetworksClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "test-vnet", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGet.json -func ExampleVirtualNetworksClient_Get_getVirtualNetwork() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "test-vnet", &armnetwork.VirtualNetworksClientGetOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGetWithSubnetDelegation.json -func ExampleVirtualNetworksClient_Get_getVirtualNetworkWithADelegatedSubnet() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworksClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "test-vnet", &armnetwork.VirtualNetworksClientGetOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGetWithServiceAssociationLink.json -func ExampleVirtualNetworksClient_Get_getVirtualNetworkWithServiceAssociationLinks() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworksClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "test-vnet", &armnetwork.VirtualNetworksClientGetOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkCreate.json -func ExampleVirtualNetworksClient_BeginCreateOrUpdate_createVirtualNetwork() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "test-vnet", armnetwork.VirtualNetwork{ - Location: to.Ptr("eastus"), - Properties: &armnetwork.VirtualNetworkPropertiesFormat{ - AddressSpace: &armnetwork.AddressSpace{ - AddressPrefixes: []*string{ - to.Ptr("10.0.0.0/16")}, - }, - FlowTimeoutInMinutes: to.Ptr[int32](10), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkCreateWithBgpCommunities.json -func ExampleVirtualNetworksClient_BeginCreateOrUpdate_createVirtualNetworkWithBgpCommunities() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "test-vnet", armnetwork.VirtualNetwork{ - Location: to.Ptr("eastus"), - Properties: &armnetwork.VirtualNetworkPropertiesFormat{ - AddressSpace: &armnetwork.AddressSpace{ - AddressPrefixes: []*string{ - to.Ptr("10.0.0.0/16")}, - }, - BgpCommunities: &armnetwork.VirtualNetworkBgpCommunities{ - VirtualNetworkCommunity: to.Ptr("12076:20000"), - }, - Subnets: []*armnetwork.Subnet{ - { - Name: to.Ptr("test-1"), - Properties: &armnetwork.SubnetPropertiesFormat{ - AddressPrefix: to.Ptr("10.0.0.0/24"), - }, - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkCreateSubnetWithDelegation.json -func ExampleVirtualNetworksClient_BeginCreateOrUpdate_createVirtualNetworkWithDelegatedSubnets() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworksClient("subId", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "test-vnet", armnetwork.VirtualNetwork{ - Location: to.Ptr("westcentralus"), - Properties: &armnetwork.VirtualNetworkPropertiesFormat{ - AddressSpace: &armnetwork.AddressSpace{ - AddressPrefixes: []*string{ - to.Ptr("10.0.0.0/16")}, - }, - Subnets: []*armnetwork.Subnet{ - { - Name: to.Ptr("test-1"), - Properties: &armnetwork.SubnetPropertiesFormat{ - AddressPrefix: to.Ptr("10.0.0.0/24"), - Delegations: []*armnetwork.Delegation{ - { - Name: to.Ptr("myDelegation"), - Properties: &armnetwork.ServiceDelegationPropertiesFormat{ - ServiceName: to.Ptr("Microsoft.Sql/managedInstances"), - }, - }}, - }, - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkCreateWithEncryption.json -func ExampleVirtualNetworksClient_BeginCreateOrUpdate_createVirtualNetworkWithEncryption() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "test-vnet", armnetwork.VirtualNetwork{ - Location: to.Ptr("eastus"), - Properties: &armnetwork.VirtualNetworkPropertiesFormat{ - AddressSpace: &armnetwork.AddressSpace{ - AddressPrefixes: []*string{ - to.Ptr("10.0.0.0/16")}, - }, - Encryption: &armnetwork.VirtualNetworkEncryption{ - Enabled: to.Ptr(true), - Enforcement: to.Ptr(armnetwork.VirtualNetworkEncryptionEnforcementAllowUnencrypted), - }, - Subnets: []*armnetwork.Subnet{ - { - Name: to.Ptr("test-1"), - Properties: &armnetwork.SubnetPropertiesFormat{ - AddressPrefix: to.Ptr("10.0.0.0/24"), - }, - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkCreateServiceEndpoints.json -func ExampleVirtualNetworksClient_BeginCreateOrUpdate_createVirtualNetworkWithServiceEndpoints() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "vnetTest", "vnet1", armnetwork.VirtualNetwork{ - Location: to.Ptr("eastus"), - Properties: &armnetwork.VirtualNetworkPropertiesFormat{ - AddressSpace: &armnetwork.AddressSpace{ - AddressPrefixes: []*string{ - to.Ptr("10.0.0.0/16")}, - }, - Subnets: []*armnetwork.Subnet{ - { - Name: to.Ptr("test-1"), - Properties: &armnetwork.SubnetPropertiesFormat{ - AddressPrefix: to.Ptr("10.0.0.0/16"), - ServiceEndpoints: []*armnetwork.ServiceEndpointPropertiesFormat{ - { - Service: to.Ptr("Microsoft.Storage"), - }}, - }, - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkCreateServiceEndpointPolicy.json -func ExampleVirtualNetworksClient_BeginCreateOrUpdate_createVirtualNetworkWithServiceEndpointsAndServiceEndpointPolicy() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "vnetTest", "vnet1", armnetwork.VirtualNetwork{ - Location: to.Ptr("eastus2euap"), - Properties: &armnetwork.VirtualNetworkPropertiesFormat{ - AddressSpace: &armnetwork.AddressSpace{ - AddressPrefixes: []*string{ - to.Ptr("10.0.0.0/16")}, - }, - Subnets: []*armnetwork.Subnet{ - { - Name: to.Ptr("test-1"), - Properties: &armnetwork.SubnetPropertiesFormat{ - AddressPrefix: to.Ptr("10.0.0.0/16"), - ServiceEndpointPolicies: []*armnetwork.ServiceEndpointPolicy{ - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/vnetTest/providers/Microsoft.Network/serviceEndpointPolicies/ServiceEndpointPolicy1"), - }}, - ServiceEndpoints: []*armnetwork.ServiceEndpointPropertiesFormat{ - { - Service: to.Ptr("Microsoft.Storage"), - }}, - }, - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkCreateSubnet.json -func ExampleVirtualNetworksClient_BeginCreateOrUpdate_createVirtualNetworkWithSubnet() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "test-vnet", armnetwork.VirtualNetwork{ - Location: to.Ptr("eastus"), - Properties: &armnetwork.VirtualNetworkPropertiesFormat{ - AddressSpace: &armnetwork.AddressSpace{ - AddressPrefixes: []*string{ - to.Ptr("10.0.0.0/16")}, - }, - Subnets: []*armnetwork.Subnet{ - { - Name: to.Ptr("test-1"), - Properties: &armnetwork.SubnetPropertiesFormat{ - AddressPrefix: to.Ptr("10.0.0.0/24"), - }, - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkCreateSubnetWithAddressPrefixes.json -func ExampleVirtualNetworksClient_BeginCreateOrUpdate_createVirtualNetworkWithSubnetContainingAddressPrefixes() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "test-vnet", armnetwork.VirtualNetwork{ - Location: to.Ptr("eastus"), - Properties: &armnetwork.VirtualNetworkPropertiesFormat{ - AddressSpace: &armnetwork.AddressSpace{ - AddressPrefixes: []*string{ - to.Ptr("10.0.0.0/16")}, - }, - Subnets: []*armnetwork.Subnet{ - { - Name: to.Ptr("test-2"), - Properties: &armnetwork.SubnetPropertiesFormat{ - AddressPrefixes: []*string{ - to.Ptr("10.0.0.0/28"), - to.Ptr("10.0.1.0/28")}, - }, - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkUpdateTags.json -func ExampleVirtualNetworksClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, "rg1", "test-vnet", armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkListAll.json -func ExampleVirtualNetworksClient_NewListAllPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListAllPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkList.json -func ExampleVirtualNetworksClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkCheckIPAddressAvailability.json -func ExampleVirtualNetworksClient_CheckIPAddressAvailability() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CheckIPAddressAvailability(ctx, "rg1", "test-vnet", "10.0.1.4", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkListUsage.json -func ExampleVirtualNetworksClient_NewListUsagePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListUsagePager("rg1", "vnetName", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkGetDdosProtectionStatus.json -func ExampleVirtualNetworksClient_BeginListDdosProtectionStatus() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginListDdosProtectionStatus(ctx, "rg1", "test-vnet", &armnetwork.VirtualNetworksClientBeginListDdosProtectionStatusOptions{Top: to.Ptr[int32](75), - SkipToken: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - for res.More() { - nextResult, err := res.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/virtualnetworktaps_client.go b/sdk/resourcemanager/network/armnetwork/virtualnetworktaps_client.go index 1cf380a14390..2ab100c465f7 100644 --- a/sdk/resourcemanager/network/armnetwork/virtualnetworktaps_client.go +++ b/sdk/resourcemanager/network/armnetwork/virtualnetworktaps_client.go @@ -32,10 +32,10 @@ type VirtualNetworkTapsClient struct { } // NewVirtualNetworkTapsClient creates a new instance of VirtualNetworkTapsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewVirtualNetworkTapsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworkTapsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewVirtualNetworkTapsClient(subscriptionID string, credential azcore.TokenC // BeginCreateOrUpdate - Creates or updates a Virtual Network Tap. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// tapName - The name of the virtual network tap. -// parameters - Parameters supplied to the create or update virtual network tap operation. -// options - VirtualNetworkTapsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkTapsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - tapName - The name of the virtual network tap. +// - parameters - Parameters supplied to the create or update virtual network tap operation. +// - options - VirtualNetworkTapsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkTapsClient.BeginCreateOrUpdate +// method. func (client *VirtualNetworkTapsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, tapName string, parameters VirtualNetworkTap, options *VirtualNetworkTapsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualNetworkTapsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, tapName, parameters, options) @@ -80,6 +81,7 @@ func (client *VirtualNetworkTapsClient) BeginCreateOrUpdate(ctx context.Context, // CreateOrUpdate - Creates or updates a Virtual Network Tap. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworkTapsClient) createOrUpdate(ctx context.Context, resourceGroupName string, tapName string, parameters VirtualNetworkTap, options *VirtualNetworkTapsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, tapName, parameters, options) @@ -124,11 +126,12 @@ func (client *VirtualNetworkTapsClient) createOrUpdateCreateRequest(ctx context. // BeginDelete - Deletes the specified virtual network tap. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// tapName - The name of the virtual network tap. -// options - VirtualNetworkTapsClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkTapsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - tapName - The name of the virtual network tap. +// - options - VirtualNetworkTapsClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkTapsClient.BeginDelete +// method. func (client *VirtualNetworkTapsClient) BeginDelete(ctx context.Context, resourceGroupName string, tapName string, options *VirtualNetworkTapsClientBeginDeleteOptions) (*runtime.Poller[VirtualNetworkTapsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, tapName, options) @@ -145,6 +148,7 @@ func (client *VirtualNetworkTapsClient) BeginDelete(ctx context.Context, resourc // Delete - Deletes the specified virtual network tap. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualNetworkTapsClient) deleteOperation(ctx context.Context, resourceGroupName string, tapName string, options *VirtualNetworkTapsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, tapName, options) @@ -189,10 +193,11 @@ func (client *VirtualNetworkTapsClient) deleteCreateRequest(ctx context.Context, // Get - Gets information about the specified virtual network tap. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// tapName - The name of virtual network tap. -// options - VirtualNetworkTapsClientGetOptions contains the optional parameters for the VirtualNetworkTapsClient.Get method. +// - resourceGroupName - The name of the resource group. +// - tapName - The name of virtual network tap. +// - options - VirtualNetworkTapsClientGetOptions contains the optional parameters for the VirtualNetworkTapsClient.Get method. func (client *VirtualNetworkTapsClient) Get(ctx context.Context, resourceGroupName string, tapName string, options *VirtualNetworkTapsClientGetOptions) (VirtualNetworkTapsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, tapName, options) if err != nil { @@ -244,9 +249,10 @@ func (client *VirtualNetworkTapsClient) getHandleResponse(resp *http.Response) ( } // NewListAllPager - Gets all the VirtualNetworkTaps in a subscription. +// // Generated from API version 2022-07-01 -// options - VirtualNetworkTapsClientListAllOptions contains the optional parameters for the VirtualNetworkTapsClient.ListAll -// method. +// - options - VirtualNetworkTapsClientListAllOptions contains the optional parameters for the VirtualNetworkTapsClient.NewListAllPager +// method. func (client *VirtualNetworkTapsClient) NewListAllPager(options *VirtualNetworkTapsClientListAllOptions) *runtime.Pager[VirtualNetworkTapsClientListAllResponse] { return runtime.NewPager(runtime.PagingHandler[VirtualNetworkTapsClientListAllResponse]{ More: func(page VirtualNetworkTapsClientListAllResponse) bool { @@ -303,10 +309,11 @@ func (client *VirtualNetworkTapsClient) listAllHandleResponse(resp *http.Respons } // NewListByResourceGroupPager - Gets all the VirtualNetworkTaps in a subscription. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - VirtualNetworkTapsClientListByResourceGroupOptions contains the optional parameters for the VirtualNetworkTapsClient.ListByResourceGroup -// method. +// - resourceGroupName - The name of the resource group. +// - options - VirtualNetworkTapsClientListByResourceGroupOptions contains the optional parameters for the VirtualNetworkTapsClient.NewListByResourceGroupPager +// method. func (client *VirtualNetworkTapsClient) NewListByResourceGroupPager(resourceGroupName string, options *VirtualNetworkTapsClientListByResourceGroupOptions) *runtime.Pager[VirtualNetworkTapsClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[VirtualNetworkTapsClientListByResourceGroupResponse]{ More: func(page VirtualNetworkTapsClientListByResourceGroupResponse) bool { @@ -368,12 +375,13 @@ func (client *VirtualNetworkTapsClient) listByResourceGroupHandleResponse(resp * // UpdateTags - Updates an VirtualNetworkTap tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// tapName - The name of the tap. -// tapParameters - Parameters supplied to update VirtualNetworkTap tags. -// options - VirtualNetworkTapsClientUpdateTagsOptions contains the optional parameters for the VirtualNetworkTapsClient.UpdateTags -// method. +// - resourceGroupName - The name of the resource group. +// - tapName - The name of the tap. +// - tapParameters - Parameters supplied to update VirtualNetworkTap tags. +// - options - VirtualNetworkTapsClientUpdateTagsOptions contains the optional parameters for the VirtualNetworkTapsClient.UpdateTags +// method. func (client *VirtualNetworkTapsClient) UpdateTags(ctx context.Context, resourceGroupName string, tapName string, tapParameters TagsObject, options *VirtualNetworkTapsClientUpdateTagsOptions) (VirtualNetworkTapsClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, tapName, tapParameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/virtualnetworktaps_client_example_test.go b/sdk/resourcemanager/network/armnetwork/virtualnetworktaps_client_example_test.go deleted file mode 100644 index 7b21ceb590c4..000000000000 --- a/sdk/resourcemanager/network/armnetwork/virtualnetworktaps_client_example_test.go +++ /dev/null @@ -1,160 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkTapDelete.json -func ExampleVirtualNetworkTapsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkTapsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "test-vtap", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkTapGet.json -func ExampleVirtualNetworkTapsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkTapsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "testvtap", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkTapCreate.json -func ExampleVirtualNetworkTapsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkTapsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "test-vtap", armnetwork.VirtualNetworkTap{ - Location: to.Ptr("centraluseuap"), - Properties: &armnetwork.VirtualNetworkTapPropertiesFormat{ - DestinationNetworkInterfaceIPConfiguration: &armnetwork.InterfaceIPConfiguration{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/testNetworkInterface/ipConfigurations/ipconfig1"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkTapUpdateTags.json -func ExampleVirtualNetworkTapsClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkTapsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, "rg1", "test-vtap", armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkTapListAll.json -func ExampleVirtualNetworkTapsClient_NewListAllPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkTapsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListAllPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualNetworkTapList.json -func ExampleVirtualNetworkTapsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualNetworkTapsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/virtualrouterpeerings_client.go b/sdk/resourcemanager/network/armnetwork/virtualrouterpeerings_client.go index e87493548352..dddde98d7484 100644 --- a/sdk/resourcemanager/network/armnetwork/virtualrouterpeerings_client.go +++ b/sdk/resourcemanager/network/armnetwork/virtualrouterpeerings_client.go @@ -32,10 +32,10 @@ type VirtualRouterPeeringsClient struct { } // NewVirtualRouterPeeringsClient creates a new instance of VirtualRouterPeeringsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewVirtualRouterPeeringsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualRouterPeeringsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewVirtualRouterPeeringsClient(subscriptionID string, credential azcore.Tok // BeginCreateOrUpdate - Creates or updates the specified Virtual Router Peering. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualRouterName - The name of the Virtual Router. -// peeringName - The name of the Virtual Router Peering. -// parameters - Parameters supplied to the create or update Virtual Router Peering operation. -// options - VirtualRouterPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualRouterPeeringsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - virtualRouterName - The name of the Virtual Router. +// - peeringName - The name of the Virtual Router Peering. +// - parameters - Parameters supplied to the create or update Virtual Router Peering operation. +// - options - VirtualRouterPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualRouterPeeringsClient.BeginCreateOrUpdate +// method. func (client *VirtualRouterPeeringsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string, parameters VirtualRouterPeering, options *VirtualRouterPeeringsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualRouterPeeringsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualRouterName, peeringName, parameters, options) @@ -81,6 +82,7 @@ func (client *VirtualRouterPeeringsClient) BeginCreateOrUpdate(ctx context.Conte // CreateOrUpdate - Creates or updates the specified Virtual Router Peering. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualRouterPeeringsClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string, parameters VirtualRouterPeering, options *VirtualRouterPeeringsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualRouterName, peeringName, parameters, options) @@ -129,12 +131,13 @@ func (client *VirtualRouterPeeringsClient) createOrUpdateCreateRequest(ctx conte // BeginDelete - Deletes the specified peering from a Virtual Router. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualRouterName - The name of the Virtual Router. -// peeringName - The name of the peering. -// options - VirtualRouterPeeringsClientBeginDeleteOptions contains the optional parameters for the VirtualRouterPeeringsClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - virtualRouterName - The name of the Virtual Router. +// - peeringName - The name of the peering. +// - options - VirtualRouterPeeringsClientBeginDeleteOptions contains the optional parameters for the VirtualRouterPeeringsClient.BeginDelete +// method. func (client *VirtualRouterPeeringsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string, options *VirtualRouterPeeringsClientBeginDeleteOptions) (*runtime.Poller[VirtualRouterPeeringsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, virtualRouterName, peeringName, options) @@ -151,6 +154,7 @@ func (client *VirtualRouterPeeringsClient) BeginDelete(ctx context.Context, reso // Delete - Deletes the specified peering from a Virtual Router. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualRouterPeeringsClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string, options *VirtualRouterPeeringsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualRouterName, peeringName, options) @@ -199,12 +203,13 @@ func (client *VirtualRouterPeeringsClient) deleteCreateRequest(ctx context.Conte // Get - Gets the specified Virtual Router Peering. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualRouterName - The name of the Virtual Router. -// peeringName - The name of the Virtual Router Peering. -// options - VirtualRouterPeeringsClientGetOptions contains the optional parameters for the VirtualRouterPeeringsClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - virtualRouterName - The name of the Virtual Router. +// - peeringName - The name of the Virtual Router Peering. +// - options - VirtualRouterPeeringsClientGetOptions contains the optional parameters for the VirtualRouterPeeringsClient.Get +// method. func (client *VirtualRouterPeeringsClient) Get(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string, options *VirtualRouterPeeringsClientGetOptions) (VirtualRouterPeeringsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, virtualRouterName, peeringName, options) if err != nil { @@ -260,11 +265,12 @@ func (client *VirtualRouterPeeringsClient) getHandleResponse(resp *http.Response } // NewListPager - Lists all Virtual Router Peerings in a Virtual Router resource. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualRouterName - The name of the Virtual Router. -// options - VirtualRouterPeeringsClientListOptions contains the optional parameters for the VirtualRouterPeeringsClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - virtualRouterName - The name of the Virtual Router. +// - options - VirtualRouterPeeringsClientListOptions contains the optional parameters for the VirtualRouterPeeringsClient.NewListPager +// method. func (client *VirtualRouterPeeringsClient) NewListPager(resourceGroupName string, virtualRouterName string, options *VirtualRouterPeeringsClientListOptions) *runtime.Pager[VirtualRouterPeeringsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[VirtualRouterPeeringsClientListResponse]{ More: func(page VirtualRouterPeeringsClientListResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/virtualrouterpeerings_client_example_test.go b/sdk/resourcemanager/network/armnetwork/virtualrouterpeerings_client_example_test.go deleted file mode 100644 index 1661b8f0b1b5..000000000000 --- a/sdk/resourcemanager/network/armnetwork/virtualrouterpeerings_client_example_test.go +++ /dev/null @@ -1,110 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualRouterPeeringDelete.json -func ExampleVirtualRouterPeeringsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualRouterPeeringsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "virtualRouter", "peering1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualRouterPeeringGet.json -func ExampleVirtualRouterPeeringsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualRouterPeeringsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "virtualRouter", "peering1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualRouterPeeringPut.json -func ExampleVirtualRouterPeeringsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualRouterPeeringsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "virtualRouter", "peering1", armnetwork.VirtualRouterPeering{ - Properties: &armnetwork.VirtualRouterPeeringProperties{ - PeerAsn: to.Ptr[int64](20000), - PeerIP: to.Ptr("192.168.1.5"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualRouterPeeringList.json -func ExampleVirtualRouterPeeringsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualRouterPeeringsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", "virtualRouter", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/virtualrouters_client.go b/sdk/resourcemanager/network/armnetwork/virtualrouters_client.go index 164e07288e26..227bb4ed776e 100644 --- a/sdk/resourcemanager/network/armnetwork/virtualrouters_client.go +++ b/sdk/resourcemanager/network/armnetwork/virtualrouters_client.go @@ -32,10 +32,10 @@ type VirtualRoutersClient struct { } // NewVirtualRoutersClient creates a new instance of VirtualRoutersClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewVirtualRoutersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualRoutersClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewVirtualRoutersClient(subscriptionID string, credential azcore.TokenCrede // BeginCreateOrUpdate - Creates or updates the specified Virtual Router. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualRouterName - The name of the Virtual Router. -// parameters - Parameters supplied to the create or update Virtual Router. -// options - VirtualRoutersClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualRoutersClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - virtualRouterName - The name of the Virtual Router. +// - parameters - Parameters supplied to the create or update Virtual Router. +// - options - VirtualRoutersClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualRoutersClient.BeginCreateOrUpdate +// method. func (client *VirtualRoutersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualRouterName string, parameters VirtualRouter, options *VirtualRoutersClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualRoutersClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualRouterName, parameters, options) @@ -80,6 +81,7 @@ func (client *VirtualRoutersClient) BeginCreateOrUpdate(ctx context.Context, res // CreateOrUpdate - Creates or updates the specified Virtual Router. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualRoutersClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualRouterName string, parameters VirtualRouter, options *VirtualRoutersClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualRouterName, parameters, options) @@ -124,11 +126,12 @@ func (client *VirtualRoutersClient) createOrUpdateCreateRequest(ctx context.Cont // BeginDelete - Deletes the specified Virtual Router. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualRouterName - The name of the Virtual Router. -// options - VirtualRoutersClientBeginDeleteOptions contains the optional parameters for the VirtualRoutersClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - virtualRouterName - The name of the Virtual Router. +// - options - VirtualRoutersClientBeginDeleteOptions contains the optional parameters for the VirtualRoutersClient.BeginDelete +// method. func (client *VirtualRoutersClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualRouterName string, options *VirtualRoutersClientBeginDeleteOptions) (*runtime.Poller[VirtualRoutersClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, virtualRouterName, options) @@ -145,6 +148,7 @@ func (client *VirtualRoutersClient) BeginDelete(ctx context.Context, resourceGro // Delete - Deletes the specified Virtual Router. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualRoutersClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualRouterName string, options *VirtualRoutersClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualRouterName, options) @@ -189,10 +193,11 @@ func (client *VirtualRoutersClient) deleteCreateRequest(ctx context.Context, res // Get - Gets the specified Virtual Router. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// virtualRouterName - The name of the Virtual Router. -// options - VirtualRoutersClientGetOptions contains the optional parameters for the VirtualRoutersClient.Get method. +// - resourceGroupName - The name of the resource group. +// - virtualRouterName - The name of the Virtual Router. +// - options - VirtualRoutersClientGetOptions contains the optional parameters for the VirtualRoutersClient.Get method. func (client *VirtualRoutersClient) Get(ctx context.Context, resourceGroupName string, virtualRouterName string, options *VirtualRoutersClientGetOptions) (VirtualRoutersClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, virtualRouterName, options) if err != nil { @@ -247,8 +252,9 @@ func (client *VirtualRoutersClient) getHandleResponse(resp *http.Response) (Virt } // NewListPager - Gets all the Virtual Routers in a subscription. +// // Generated from API version 2022-07-01 -// options - VirtualRoutersClientListOptions contains the optional parameters for the VirtualRoutersClient.List method. +// - options - VirtualRoutersClientListOptions contains the optional parameters for the VirtualRoutersClient.NewListPager method. func (client *VirtualRoutersClient) NewListPager(options *VirtualRoutersClientListOptions) *runtime.Pager[VirtualRoutersClientListResponse] { return runtime.NewPager(runtime.PagingHandler[VirtualRoutersClientListResponse]{ More: func(page VirtualRoutersClientListResponse) bool { @@ -305,10 +311,11 @@ func (client *VirtualRoutersClient) listHandleResponse(resp *http.Response) (Vir } // NewListByResourceGroupPager - Lists all Virtual Routers in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - VirtualRoutersClientListByResourceGroupOptions contains the optional parameters for the VirtualRoutersClient.ListByResourceGroup -// method. +// - resourceGroupName - The name of the resource group. +// - options - VirtualRoutersClientListByResourceGroupOptions contains the optional parameters for the VirtualRoutersClient.NewListByResourceGroupPager +// method. func (client *VirtualRoutersClient) NewListByResourceGroupPager(resourceGroupName string, options *VirtualRoutersClientListByResourceGroupOptions) *runtime.Pager[VirtualRoutersClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[VirtualRoutersClientListByResourceGroupResponse]{ More: func(page VirtualRoutersClientListByResourceGroupResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/virtualrouters_client_example_test.go b/sdk/resourcemanager/network/armnetwork/virtualrouters_client_example_test.go deleted file mode 100644 index b24c0e0072f3..000000000000 --- a/sdk/resourcemanager/network/armnetwork/virtualrouters_client_example_test.go +++ /dev/null @@ -1,139 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualRouterDelete.json -func ExampleVirtualRoutersClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualRoutersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "virtualRouter", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualRouterGet.json -func ExampleVirtualRoutersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualRoutersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "virtualRouter", &armnetwork.VirtualRoutersClientGetOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualRouterPut.json -func ExampleVirtualRoutersClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualRoutersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "virtualRouter", armnetwork.VirtualRouter{ - Location: to.Ptr("West US"), - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - }, - Properties: &armnetwork.VirtualRouterPropertiesFormat{ - HostedGateway: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vnetGateway"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualRouterListByResourceGroup.json -func ExampleVirtualRoutersClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualRoutersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualRouterListBySubscription.json -func ExampleVirtualRoutersClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualRoutersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/virtualwans_client.go b/sdk/resourcemanager/network/armnetwork/virtualwans_client.go index cef287011420..78c27104700f 100644 --- a/sdk/resourcemanager/network/armnetwork/virtualwans_client.go +++ b/sdk/resourcemanager/network/armnetwork/virtualwans_client.go @@ -32,10 +32,10 @@ type VirtualWansClient struct { } // NewVirtualWansClient creates a new instance of VirtualWansClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewVirtualWansClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualWansClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewVirtualWansClient(subscriptionID string, credential azcore.TokenCredenti // BeginCreateOrUpdate - Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VirtualWan. -// virtualWANName - The name of the VirtualWAN being created or updated. -// wanParameters - Parameters supplied to create or update VirtualWAN. -// options - VirtualWansClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualWansClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The resource group name of the VirtualWan. +// - virtualWANName - The name of the VirtualWAN being created or updated. +// - wanParameters - Parameters supplied to create or update VirtualWAN. +// - options - VirtualWansClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualWansClient.BeginCreateOrUpdate +// method. func (client *VirtualWansClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualWANName string, wanParameters VirtualWAN, options *VirtualWansClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualWansClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualWANName, wanParameters, options) @@ -80,6 +81,7 @@ func (client *VirtualWansClient) BeginCreateOrUpdate(ctx context.Context, resour // CreateOrUpdate - Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualWansClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualWANName string, wanParameters VirtualWAN, options *VirtualWansClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, virtualWANName, wanParameters, options) @@ -124,10 +126,11 @@ func (client *VirtualWansClient) createOrUpdateCreateRequest(ctx context.Context // BeginDelete - Deletes a VirtualWAN. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VirtualWan. -// virtualWANName - The name of the VirtualWAN being deleted. -// options - VirtualWansClientBeginDeleteOptions contains the optional parameters for the VirtualWansClient.BeginDelete method. +// - resourceGroupName - The resource group name of the VirtualWan. +// - virtualWANName - The name of the VirtualWAN being deleted. +// - options - VirtualWansClientBeginDeleteOptions contains the optional parameters for the VirtualWansClient.BeginDelete method. func (client *VirtualWansClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualWANName string, options *VirtualWansClientBeginDeleteOptions) (*runtime.Poller[VirtualWansClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, virtualWANName, options) @@ -144,6 +147,7 @@ func (client *VirtualWansClient) BeginDelete(ctx context.Context, resourceGroupN // Delete - Deletes a VirtualWAN. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VirtualWansClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualWANName string, options *VirtualWansClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, virtualWANName, options) @@ -188,10 +192,11 @@ func (client *VirtualWansClient) deleteCreateRequest(ctx context.Context, resour // Get - Retrieves the details of a VirtualWAN. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VirtualWan. -// virtualWANName - The name of the VirtualWAN being retrieved. -// options - VirtualWansClientGetOptions contains the optional parameters for the VirtualWansClient.Get method. +// - resourceGroupName - The resource group name of the VirtualWan. +// - virtualWANName - The name of the VirtualWAN being retrieved. +// - options - VirtualWansClientGetOptions contains the optional parameters for the VirtualWansClient.Get method. func (client *VirtualWansClient) Get(ctx context.Context, resourceGroupName string, virtualWANName string, options *VirtualWansClientGetOptions) (VirtualWansClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, virtualWANName, options) if err != nil { @@ -243,8 +248,9 @@ func (client *VirtualWansClient) getHandleResponse(resp *http.Response) (Virtual } // NewListPager - Lists all the VirtualWANs in a subscription. +// // Generated from API version 2022-07-01 -// options - VirtualWansClientListOptions contains the optional parameters for the VirtualWansClient.List method. +// - options - VirtualWansClientListOptions contains the optional parameters for the VirtualWansClient.NewListPager method. func (client *VirtualWansClient) NewListPager(options *VirtualWansClientListOptions) *runtime.Pager[VirtualWansClientListResponse] { return runtime.NewPager(runtime.PagingHandler[VirtualWansClientListResponse]{ More: func(page VirtualWansClientListResponse) bool { @@ -301,10 +307,11 @@ func (client *VirtualWansClient) listHandleResponse(resp *http.Response) (Virtua } // NewListByResourceGroupPager - Lists all the VirtualWANs in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VirtualWan. -// options - VirtualWansClientListByResourceGroupOptions contains the optional parameters for the VirtualWansClient.ListByResourceGroup -// method. +// - resourceGroupName - The resource group name of the VirtualWan. +// - options - VirtualWansClientListByResourceGroupOptions contains the optional parameters for the VirtualWansClient.NewListByResourceGroupPager +// method. func (client *VirtualWansClient) NewListByResourceGroupPager(resourceGroupName string, options *VirtualWansClientListByResourceGroupOptions) *runtime.Pager[VirtualWansClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[VirtualWansClientListByResourceGroupResponse]{ More: func(page VirtualWansClientListByResourceGroupResponse) bool { @@ -366,11 +373,12 @@ func (client *VirtualWansClient) listByResourceGroupHandleResponse(resp *http.Re // UpdateTags - Updates a VirtualWAN tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VirtualWan. -// virtualWANName - The name of the VirtualWAN being updated. -// wanParameters - Parameters supplied to Update VirtualWAN tags. -// options - VirtualWansClientUpdateTagsOptions contains the optional parameters for the VirtualWansClient.UpdateTags method. +// - resourceGroupName - The resource group name of the VirtualWan. +// - virtualWANName - The name of the VirtualWAN being updated. +// - wanParameters - Parameters supplied to Update VirtualWAN tags. +// - options - VirtualWansClientUpdateTagsOptions contains the optional parameters for the VirtualWansClient.UpdateTags method. func (client *VirtualWansClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualWANName string, wanParameters TagsObject, options *VirtualWansClientUpdateTagsOptions) (VirtualWansClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, virtualWANName, wanParameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/virtualwans_client_example_test.go b/sdk/resourcemanager/network/armnetwork/virtualwans_client_example_test.go deleted file mode 100644 index 738b0c3d61c9..000000000000 --- a/sdk/resourcemanager/network/armnetwork/virtualwans_client_example_test.go +++ /dev/null @@ -1,162 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualWANGet.json -func ExampleVirtualWansClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualWansClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "wan1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualWANPut.json -func ExampleVirtualWansClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualWansClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "wan1", armnetwork.VirtualWAN{ - Location: to.Ptr("West US"), - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - }, - Properties: &armnetwork.VirtualWanProperties{ - Type: to.Ptr("Basic"), - DisableVPNEncryption: to.Ptr(false), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualWANUpdateTags.json -func ExampleVirtualWansClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualWansClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, "rg1", "wan1", armnetwork.TagsObject{ - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - "key2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualWANDelete.json -func ExampleVirtualWansClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualWansClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "virtualWan1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualWANListByResourceGroup.json -func ExampleVirtualWansClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualWansClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VirtualWANList.json -func ExampleVirtualWansClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVirtualWansClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/vpnconnections_client.go b/sdk/resourcemanager/network/armnetwork/vpnconnections_client.go index c9f2bdbdfb08..cfef4ed79620 100644 --- a/sdk/resourcemanager/network/armnetwork/vpnconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/vpnconnections_client.go @@ -32,10 +32,10 @@ type VPNConnectionsClient struct { } // NewVPNConnectionsClient creates a new instance of VPNConnectionsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewVPNConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNConnectionsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -59,13 +59,14 @@ func NewVPNConnectionsClient(subscriptionID string, credential azcore.TokenCrede // BeginCreateOrUpdate - Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing // connection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VpnGateway. -// gatewayName - The name of the gateway. -// connectionName - The name of the connection. -// vpnConnectionParameters - Parameters supplied to create or Update a VPN Connection. -// options - VPNConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNConnectionsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - connectionName - The name of the connection. +// - vpnConnectionParameters - Parameters supplied to create or Update a VPN Connection. +// - options - VPNConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNConnectionsClient.BeginCreateOrUpdate +// method. func (client *VPNConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, vpnConnectionParameters VPNConnection, options *VPNConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VPNConnectionsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, gatewayName, connectionName, vpnConnectionParameters, options) @@ -82,6 +83,7 @@ func (client *VPNConnectionsClient) BeginCreateOrUpdate(ctx context.Context, res // CreateOrUpdate - Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VPNConnectionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, vpnConnectionParameters VPNConnection, options *VPNConnectionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, gatewayName, connectionName, vpnConnectionParameters, options) @@ -130,12 +132,13 @@ func (client *VPNConnectionsClient) createOrUpdateCreateRequest(ctx context.Cont // BeginDelete - Deletes a vpn connection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VpnGateway. -// gatewayName - The name of the gateway. -// connectionName - The name of the connection. -// options - VPNConnectionsClientBeginDeleteOptions contains the optional parameters for the VPNConnectionsClient.BeginDelete -// method. +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - connectionName - The name of the connection. +// - options - VPNConnectionsClientBeginDeleteOptions contains the optional parameters for the VPNConnectionsClient.BeginDelete +// method. func (client *VPNConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, options *VPNConnectionsClientBeginDeleteOptions) (*runtime.Poller[VPNConnectionsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, gatewayName, connectionName, options) @@ -152,6 +155,7 @@ func (client *VPNConnectionsClient) BeginDelete(ctx context.Context, resourceGro // Delete - Deletes a vpn connection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VPNConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, options *VPNConnectionsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, gatewayName, connectionName, options) @@ -200,11 +204,12 @@ func (client *VPNConnectionsClient) deleteCreateRequest(ctx context.Context, res // Get - Retrieves the details of a vpn connection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VpnGateway. -// gatewayName - The name of the gateway. -// connectionName - The name of the vpn connection. -// options - VPNConnectionsClientGetOptions contains the optional parameters for the VPNConnectionsClient.Get method. +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - connectionName - The name of the vpn connection. +// - options - VPNConnectionsClientGetOptions contains the optional parameters for the VPNConnectionsClient.Get method. func (client *VPNConnectionsClient) Get(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, options *VPNConnectionsClientGetOptions) (VPNConnectionsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, gatewayName, connectionName, options) if err != nil { @@ -260,11 +265,12 @@ func (client *VPNConnectionsClient) getHandleResponse(resp *http.Response) (VPNC } // NewListByVPNGatewayPager - Retrieves all vpn connections for a particular virtual wan vpn gateway. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VpnGateway. -// gatewayName - The name of the gateway. -// options - VPNConnectionsClientListByVPNGatewayOptions contains the optional parameters for the VPNConnectionsClient.ListByVPNGateway -// method. +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - options - VPNConnectionsClientListByVPNGatewayOptions contains the optional parameters for the VPNConnectionsClient.NewListByVPNGatewayPager +// method. func (client *VPNConnectionsClient) NewListByVPNGatewayPager(resourceGroupName string, gatewayName string, options *VPNConnectionsClientListByVPNGatewayOptions) *runtime.Pager[VPNConnectionsClientListByVPNGatewayResponse] { return runtime.NewPager(runtime.PagingHandler[VPNConnectionsClientListByVPNGatewayResponse]{ More: func(page VPNConnectionsClientListByVPNGatewayResponse) bool { @@ -330,12 +336,13 @@ func (client *VPNConnectionsClient) listByVPNGatewayHandleResponse(resp *http.Re // BeginStartPacketCapture - Starts packet capture on Vpn connection in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// gatewayName - The name of the gateway. -// vpnConnectionName - The name of the vpn connection. -// options - VPNConnectionsClientBeginStartPacketCaptureOptions contains the optional parameters for the VPNConnectionsClient.BeginStartPacketCapture -// method. +// - resourceGroupName - The name of the resource group. +// - gatewayName - The name of the gateway. +// - vpnConnectionName - The name of the vpn connection. +// - options - VPNConnectionsClientBeginStartPacketCaptureOptions contains the optional parameters for the VPNConnectionsClient.BeginStartPacketCapture +// method. func (client *VPNConnectionsClient) BeginStartPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, vpnConnectionName string, options *VPNConnectionsClientBeginStartPacketCaptureOptions) (*runtime.Poller[VPNConnectionsClientStartPacketCaptureResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.startPacketCapture(ctx, resourceGroupName, gatewayName, vpnConnectionName, options) @@ -352,6 +359,7 @@ func (client *VPNConnectionsClient) BeginStartPacketCapture(ctx context.Context, // StartPacketCapture - Starts packet capture on Vpn connection in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VPNConnectionsClient) startPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, vpnConnectionName string, options *VPNConnectionsClientBeginStartPacketCaptureOptions) (*http.Response, error) { req, err := client.startPacketCaptureCreateRequest(ctx, resourceGroupName, gatewayName, vpnConnectionName, options) @@ -403,12 +411,13 @@ func (client *VPNConnectionsClient) startPacketCaptureCreateRequest(ctx context. // BeginStopPacketCapture - Stops packet capture on Vpn connection in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// gatewayName - The name of the gateway. -// vpnConnectionName - The name of the vpn connection. -// options - VPNConnectionsClientBeginStopPacketCaptureOptions contains the optional parameters for the VPNConnectionsClient.BeginStopPacketCapture -// method. +// - resourceGroupName - The name of the resource group. +// - gatewayName - The name of the gateway. +// - vpnConnectionName - The name of the vpn connection. +// - options - VPNConnectionsClientBeginStopPacketCaptureOptions contains the optional parameters for the VPNConnectionsClient.BeginStopPacketCapture +// method. func (client *VPNConnectionsClient) BeginStopPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, vpnConnectionName string, options *VPNConnectionsClientBeginStopPacketCaptureOptions) (*runtime.Poller[VPNConnectionsClientStopPacketCaptureResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.stopPacketCapture(ctx, resourceGroupName, gatewayName, vpnConnectionName, options) @@ -425,6 +434,7 @@ func (client *VPNConnectionsClient) BeginStopPacketCapture(ctx context.Context, // StopPacketCapture - Stops packet capture on Vpn connection in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VPNConnectionsClient) stopPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, vpnConnectionName string, options *VPNConnectionsClientBeginStopPacketCaptureOptions) (*http.Response, error) { req, err := client.stopPacketCaptureCreateRequest(ctx, resourceGroupName, gatewayName, vpnConnectionName, options) diff --git a/sdk/resourcemanager/network/armnetwork/vpnconnections_client_example_test.go b/sdk/resourcemanager/network/armnetwork/vpnconnections_client_example_test.go deleted file mode 100644 index 7cc177a7d01a..000000000000 --- a/sdk/resourcemanager/network/armnetwork/vpnconnections_client_example_test.go +++ /dev/null @@ -1,238 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnConnectionGet.json -func ExampleVPNConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "gateway1", "vpnConnection1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnConnectionPut.json -func ExampleVPNConnectionsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "gateway1", "vpnConnection1", armnetwork.VPNConnection{ - Properties: &armnetwork.VPNConnectionProperties{ - RemoteVPNSite: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1"), - }, - RoutingConfiguration: &armnetwork.RoutingConfiguration{ - AssociatedRouteTable: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1"), - }, - InboundRouteMap: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1"), - }, - OutboundRouteMap: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap2"), - }, - PropagatedRouteTables: &armnetwork.PropagatedRouteTable{ - IDs: []*armnetwork.SubResource{ - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable1"), - }, - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable2"), - }, - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/hub1/hubRouteTables/hubRouteTable3"), - }}, - Labels: []*string{ - to.Ptr("label1"), - to.Ptr("label2")}, - }, - }, - TrafficSelectorPolicies: []*armnetwork.TrafficSelectorPolicy{}, - VPNLinkConnections: []*armnetwork.VPNSiteLinkConnection{ - { - Name: to.Ptr("Connection-Link1"), - Properties: &armnetwork.VPNSiteLinkConnectionProperties{ - ConnectionBandwidth: to.Ptr[int32](200), - SharedKey: to.Ptr("key"), - UsePolicyBasedTrafficSelectors: to.Ptr(false), - VPNConnectionProtocolType: to.Ptr(armnetwork.VirtualNetworkGatewayConnectionProtocolIKEv2), - VPNLinkConnectionMode: to.Ptr(armnetwork.VPNLinkConnectionModeDefault), - VPNSiteLink: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1/vpnSiteLinks/siteLink1"), - }, - }, - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnConnectionDelete.json -func ExampleVPNConnectionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "gateway1", "vpnConnection1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnConnectionStartPacketCaptureFilterData.json -func ExampleVPNConnectionsClient_BeginStartPacketCapture_startPacketCaptureOnVpnConnectionWithFilter() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStartPacketCapture(ctx, "rg1", "gateway1", "vpnConnection1", &armnetwork.VPNConnectionsClientBeginStartPacketCaptureOptions{Parameters: &armnetwork.VPNConnectionPacketCaptureStartParameters{ - FilterData: to.Ptr("{'TracingFlags': 11,'MaxPacketBufferSize': 120,'MaxFileSize': 200,'Filters': [{'SourceSubnets': ['20.1.1.0/24'],'DestinationSubnets': ['10.1.1.0/24'],'SourcePort': [500],'DestinationPort': [4500],'Protocol': 6,'TcpFlags': 16,'CaptureSingleDirectionTrafficOnly': true}]}"), - LinkConnectionNames: []*string{ - to.Ptr("siteLink1"), - to.Ptr("siteLink2")}, - }, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnConnectionStartPacketCapture.json -func ExampleVPNConnectionsClient_BeginStartPacketCapture_startPacketCaptureOnVpnConnectionWithoutFilter() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStartPacketCapture(ctx, "rg1", "gateway1", "vpnConnection1", &armnetwork.VPNConnectionsClientBeginStartPacketCaptureOptions{Parameters: &armnetwork.VPNConnectionPacketCaptureStartParameters{ - LinkConnectionNames: []*string{ - to.Ptr("siteLink1"), - to.Ptr("siteLink2")}, - }, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnConnectionStopPacketCapture.json -func ExampleVPNConnectionsClient_BeginStopPacketCapture() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStopPacketCapture(ctx, "rg1", "gateway1", "vpnConnection1", &armnetwork.VPNConnectionsClientBeginStopPacketCaptureOptions{Parameters: &armnetwork.VPNConnectionPacketCaptureStopParameters{ - LinkConnectionNames: []*string{ - to.Ptr("vpnSiteLink1"), - to.Ptr("vpnSiteLink2")}, - SasURL: to.Ptr("https://teststorage.blob.core.windows.net/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-09-13T07:44:05Z&st=2019-09-06T23:44:05Z&spr=https&sig=V1h9D1riltvZMI69d6ihENnFo%2FrCvTqGgjO2lf%2FVBhE%3D"), - }, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnConnectionList.json -func ExampleVPNConnectionsClient_NewListByVPNGatewayPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByVPNGatewayPager("rg1", "gateway1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/vpngateways_client.go b/sdk/resourcemanager/network/armnetwork/vpngateways_client.go index 2d77839398da..001570ef23c0 100644 --- a/sdk/resourcemanager/network/armnetwork/vpngateways_client.go +++ b/sdk/resourcemanager/network/armnetwork/vpngateways_client.go @@ -32,10 +32,10 @@ type VPNGatewaysClient struct { } // NewVPNGatewaysClient creates a new instance of VPNGatewaysClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewVPNGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNGatewaysClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewVPNGatewaysClient(subscriptionID string, credential azcore.TokenCredenti // BeginCreateOrUpdate - Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VpnGateway. -// gatewayName - The name of the gateway. -// vpnGatewayParameters - Parameters supplied to create or Update a virtual wan vpn gateway. -// options - VPNGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNGatewaysClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - vpnGatewayParameters - Parameters supplied to create or Update a virtual wan vpn gateway. +// - options - VPNGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNGatewaysClient.BeginCreateOrUpdate +// method. func (client *VPNGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters VPNGateway, options *VPNGatewaysClientBeginCreateOrUpdateOptions) (*runtime.Poller[VPNGatewaysClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, gatewayName, vpnGatewayParameters, options) @@ -80,6 +81,7 @@ func (client *VPNGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resour // CreateOrUpdate - Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VPNGatewaysClient) createOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters VPNGateway, options *VPNGatewaysClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, gatewayName, vpnGatewayParameters, options) @@ -124,10 +126,11 @@ func (client *VPNGatewaysClient) createOrUpdateCreateRequest(ctx context.Context // BeginDelete - Deletes a virtual wan vpn gateway. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VpnGateway. -// gatewayName - The name of the gateway. -// options - VPNGatewaysClientBeginDeleteOptions contains the optional parameters for the VPNGatewaysClient.BeginDelete method. +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - options - VPNGatewaysClientBeginDeleteOptions contains the optional parameters for the VPNGatewaysClient.BeginDelete method. func (client *VPNGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginDeleteOptions) (*runtime.Poller[VPNGatewaysClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, gatewayName, options) @@ -144,6 +147,7 @@ func (client *VPNGatewaysClient) BeginDelete(ctx context.Context, resourceGroupN // Delete - Deletes a virtual wan vpn gateway. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VPNGatewaysClient) deleteOperation(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, gatewayName, options) @@ -188,10 +192,11 @@ func (client *VPNGatewaysClient) deleteCreateRequest(ctx context.Context, resour // Get - Retrieves the details of a virtual wan vpn gateway. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VpnGateway. -// gatewayName - The name of the gateway. -// options - VPNGatewaysClientGetOptions contains the optional parameters for the VPNGatewaysClient.Get method. +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - options - VPNGatewaysClientGetOptions contains the optional parameters for the VPNGatewaysClient.Get method. func (client *VPNGatewaysClient) Get(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientGetOptions) (VPNGatewaysClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, gatewayName, options) if err != nil { @@ -243,8 +248,9 @@ func (client *VPNGatewaysClient) getHandleResponse(resp *http.Response) (VPNGate } // NewListPager - Lists all the VpnGateways in a subscription. +// // Generated from API version 2022-07-01 -// options - VPNGatewaysClientListOptions contains the optional parameters for the VPNGatewaysClient.List method. +// - options - VPNGatewaysClientListOptions contains the optional parameters for the VPNGatewaysClient.NewListPager method. func (client *VPNGatewaysClient) NewListPager(options *VPNGatewaysClientListOptions) *runtime.Pager[VPNGatewaysClientListResponse] { return runtime.NewPager(runtime.PagingHandler[VPNGatewaysClientListResponse]{ More: func(page VPNGatewaysClientListResponse) bool { @@ -301,10 +307,11 @@ func (client *VPNGatewaysClient) listHandleResponse(resp *http.Response) (VPNGat } // NewListByResourceGroupPager - Lists all the VpnGateways in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VpnGateway. -// options - VPNGatewaysClientListByResourceGroupOptions contains the optional parameters for the VPNGatewaysClient.ListByResourceGroup -// method. +// - resourceGroupName - The resource group name of the VpnGateway. +// - options - VPNGatewaysClientListByResourceGroupOptions contains the optional parameters for the VPNGatewaysClient.NewListByResourceGroupPager +// method. func (client *VPNGatewaysClient) NewListByResourceGroupPager(resourceGroupName string, options *VPNGatewaysClientListByResourceGroupOptions) *runtime.Pager[VPNGatewaysClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[VPNGatewaysClientListByResourceGroupResponse]{ More: func(page VPNGatewaysClientListByResourceGroupResponse) bool { @@ -366,10 +373,11 @@ func (client *VPNGatewaysClient) listByResourceGroupHandleResponse(resp *http.Re // BeginReset - Resets the primary of the vpn gateway in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VpnGateway. -// gatewayName - The name of the gateway. -// options - VPNGatewaysClientBeginResetOptions contains the optional parameters for the VPNGatewaysClient.BeginReset method. +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - options - VPNGatewaysClientBeginResetOptions contains the optional parameters for the VPNGatewaysClient.BeginReset method. func (client *VPNGatewaysClient) BeginReset(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginResetOptions) (*runtime.Poller[VPNGatewaysClientResetResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.reset(ctx, resourceGroupName, gatewayName, options) @@ -386,6 +394,7 @@ func (client *VPNGatewaysClient) BeginReset(ctx context.Context, resourceGroupNa // Reset - Resets the primary of the vpn gateway in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VPNGatewaysClient) reset(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginResetOptions) (*http.Response, error) { req, err := client.resetCreateRequest(ctx, resourceGroupName, gatewayName, options) @@ -430,11 +439,12 @@ func (client *VPNGatewaysClient) resetCreateRequest(ctx context.Context, resourc // BeginStartPacketCapture - Starts packet capture on vpn gateway in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VpnGateway. -// gatewayName - The name of the gateway. -// options - VPNGatewaysClientBeginStartPacketCaptureOptions contains the optional parameters for the VPNGatewaysClient.BeginStartPacketCapture -// method. +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - options - VPNGatewaysClientBeginStartPacketCaptureOptions contains the optional parameters for the VPNGatewaysClient.BeginStartPacketCapture +// method. func (client *VPNGatewaysClient) BeginStartPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginStartPacketCaptureOptions) (*runtime.Poller[VPNGatewaysClientStartPacketCaptureResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.startPacketCapture(ctx, resourceGroupName, gatewayName, options) @@ -451,6 +461,7 @@ func (client *VPNGatewaysClient) BeginStartPacketCapture(ctx context.Context, re // StartPacketCapture - Starts packet capture on vpn gateway in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VPNGatewaysClient) startPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginStartPacketCaptureOptions) (*http.Response, error) { req, err := client.startPacketCaptureCreateRequest(ctx, resourceGroupName, gatewayName, options) @@ -498,11 +509,12 @@ func (client *VPNGatewaysClient) startPacketCaptureCreateRequest(ctx context.Con // BeginStopPacketCapture - Stops packet capture on vpn gateway in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VpnGateway. -// gatewayName - The name of the gateway. -// options - VPNGatewaysClientBeginStopPacketCaptureOptions contains the optional parameters for the VPNGatewaysClient.BeginStopPacketCapture -// method. +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - options - VPNGatewaysClientBeginStopPacketCaptureOptions contains the optional parameters for the VPNGatewaysClient.BeginStopPacketCapture +// method. func (client *VPNGatewaysClient) BeginStopPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginStopPacketCaptureOptions) (*runtime.Poller[VPNGatewaysClientStopPacketCaptureResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.stopPacketCapture(ctx, resourceGroupName, gatewayName, options) @@ -519,6 +531,7 @@ func (client *VPNGatewaysClient) BeginStopPacketCapture(ctx context.Context, res // StopPacketCapture - Stops packet capture on vpn gateway in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VPNGatewaysClient) stopPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginStopPacketCaptureOptions) (*http.Response, error) { req, err := client.stopPacketCaptureCreateRequest(ctx, resourceGroupName, gatewayName, options) @@ -566,12 +579,13 @@ func (client *VPNGatewaysClient) stopPacketCaptureCreateRequest(ctx context.Cont // BeginUpdateTags - Updates virtual wan vpn gateway tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VpnGateway. -// gatewayName - The name of the gateway. -// vpnGatewayParameters - Parameters supplied to update a virtual wan vpn gateway tags. -// options - VPNGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the VPNGatewaysClient.BeginUpdateTags -// method. +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - vpnGatewayParameters - Parameters supplied to update a virtual wan vpn gateway tags. +// - options - VPNGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the VPNGatewaysClient.BeginUpdateTags +// method. func (client *VPNGatewaysClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters TagsObject, options *VPNGatewaysClientBeginUpdateTagsOptions) (*runtime.Poller[VPNGatewaysClientUpdateTagsResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.updateTags(ctx, resourceGroupName, gatewayName, vpnGatewayParameters, options) @@ -588,6 +602,7 @@ func (client *VPNGatewaysClient) BeginUpdateTags(ctx context.Context, resourceGr // UpdateTags - Updates virtual wan vpn gateway tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VPNGatewaysClient) updateTags(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters TagsObject, options *VPNGatewaysClientBeginUpdateTagsOptions) (*http.Response, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, gatewayName, vpnGatewayParameters, options) diff --git a/sdk/resourcemanager/network/armnetwork/vpngateways_client_example_test.go b/sdk/resourcemanager/network/armnetwork/vpngateways_client_example_test.go deleted file mode 100644 index 6c13d2202967..000000000000 --- a/sdk/resourcemanager/network/armnetwork/vpngateways_client_example_test.go +++ /dev/null @@ -1,324 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnGatewayGet.json -func ExampleVPNGatewaysClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "gateway1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnGatewayPut.json -func ExampleVPNGatewaysClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "gateway1", armnetwork.VPNGateway{ - Location: to.Ptr("westcentralus"), - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - }, - Properties: &armnetwork.VPNGatewayProperties{ - BgpSettings: &armnetwork.BgpSettings{ - Asn: to.Ptr[int64](65515), - BgpPeeringAddresses: []*armnetwork.IPConfigurationBgpPeeringAddress{ - { - CustomBgpIPAddresses: []*string{ - to.Ptr("169.254.21.5")}, - IPConfigurationID: to.Ptr("Instance0"), - }, - { - CustomBgpIPAddresses: []*string{ - to.Ptr("169.254.21.10")}, - IPConfigurationID: to.Ptr("Instance1"), - }}, - PeerWeight: to.Ptr[int32](0), - }, - Connections: []*armnetwork.VPNConnection{ - { - Name: to.Ptr("vpnConnection1"), - Properties: &armnetwork.VPNConnectionProperties{ - RemoteVPNSite: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1"), - }, - VPNLinkConnections: []*armnetwork.VPNSiteLinkConnection{ - { - Name: to.Ptr("Connection-Link1"), - Properties: &armnetwork.VPNSiteLinkConnectionProperties{ - ConnectionBandwidth: to.Ptr[int32](200), - EgressNatRules: []*armnetwork.SubResource{ - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnGateways/gateway1/natRules/nat03"), - }}, - SharedKey: to.Ptr("key"), - VPNConnectionProtocolType: to.Ptr(armnetwork.VirtualNetworkGatewayConnectionProtocolIKEv2), - VPNSiteLink: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/vpnSite1/vpnSiteLinks/siteLink1"), - }, - }, - }}, - }, - }}, - EnableBgpRouteTranslationForNat: to.Ptr(false), - IsRoutingPreferenceInternet: to.Ptr(false), - NatRules: []*armnetwork.VPNGatewayNatRule{ - { - Name: to.Ptr("nat03"), - Properties: &armnetwork.VPNGatewayNatRuleProperties{ - Type: to.Ptr(armnetwork.VPNNatRuleTypeStatic), - ExternalMappings: []*armnetwork.VPNNatRuleMapping{ - { - AddressSpace: to.Ptr("192.168.0.0/26"), - }}, - InternalMappings: []*armnetwork.VPNNatRuleMapping{ - { - AddressSpace: to.Ptr("0.0.0.0/26"), - }}, - IPConfigurationID: to.Ptr(""), - Mode: to.Ptr(armnetwork.VPNNatRuleModeEgressSnat), - }, - }}, - VirtualHub: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnGatewayUpdateTags.json -func ExampleVPNGatewaysClient_BeginUpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdateTags(ctx, "rg1", "gateway1", armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnGatewayDelete.json -func ExampleVPNGatewaysClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "gateway1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnGatewayReset.json -func ExampleVPNGatewaysClient_BeginReset() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginReset(ctx, "rg1", "vpngw", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnGatewayStartPacketCaptureFilterData.json -func ExampleVPNGatewaysClient_BeginStartPacketCapture_startPacketCaptureOnVpnGatewayWithFilter() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStartPacketCapture(ctx, "rg1", "vpngw", &armnetwork.VPNGatewaysClientBeginStartPacketCaptureOptions{Parameters: &armnetwork.VPNGatewayPacketCaptureStartParameters{ - FilterData: to.Ptr("{'TracingFlags': 11,'MaxPacketBufferSize': 120,'MaxFileSize': 200,'Filters': [{'SourceSubnets': ['20.1.1.0/24'],'DestinationSubnets': ['10.1.1.0/24'],'SourcePort': [500],'DestinationPort': [4500],'Protocol': 6,'TcpFlags': 16,'CaptureSingleDirectionTrafficOnly': true}]}"), - }, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnGatewayStartPacketCapture.json -func ExampleVPNGatewaysClient_BeginStartPacketCapture_startPacketCaptureOnVpnGatewayWithoutFilter() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStartPacketCapture(ctx, "rg1", "vpngw", &armnetwork.VPNGatewaysClientBeginStartPacketCaptureOptions{Parameters: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnGatewayStopPacketCapture.json -func ExampleVPNGatewaysClient_BeginStopPacketCapture() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStopPacketCapture(ctx, "rg1", "vpngw", &armnetwork.VPNGatewaysClientBeginStopPacketCaptureOptions{Parameters: &armnetwork.VPNGatewayPacketCaptureStopParameters{ - SasURL: to.Ptr("https://teststorage.blob.core.windows.net/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-09-13T07:44:05Z&st=2019-09-06T23:44:05Z&spr=https&sig=V1h9D1riltvZMI69d6ihENnFo%2FrCvTqGgjO2lf%2FVBhE%3D"), - }, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnGatewayListByResourceGroup.json -func ExampleVPNGatewaysClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnGatewayList.json -func ExampleVPNGatewaysClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNGatewaysClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/vpnlinkconnections_client.go b/sdk/resourcemanager/network/armnetwork/vpnlinkconnections_client.go index 5ad002497d84..7afeac21480e 100644 --- a/sdk/resourcemanager/network/armnetwork/vpnlinkconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/vpnlinkconnections_client.go @@ -32,10 +32,10 @@ type VPNLinkConnectionsClient struct { } // NewVPNLinkConnectionsClient creates a new instance of VPNLinkConnectionsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewVPNLinkConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNLinkConnectionsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewVPNLinkConnectionsClient(subscriptionID string, credential azcore.TokenC // BeginGetIkeSas - Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// gatewayName - The name of the gateway. -// connectionName - The name of the vpn connection. -// linkConnectionName - The name of the vpn link connection. -// options - VPNLinkConnectionsClientBeginGetIkeSasOptions contains the optional parameters for the VPNLinkConnectionsClient.BeginGetIkeSas -// method. +// - resourceGroupName - The name of the resource group. +// - gatewayName - The name of the gateway. +// - connectionName - The name of the vpn connection. +// - linkConnectionName - The name of the vpn link connection. +// - options - VPNLinkConnectionsClientBeginGetIkeSasOptions contains the optional parameters for the VPNLinkConnectionsClient.BeginGetIkeSas +// method. func (client *VPNLinkConnectionsClient) BeginGetIkeSas(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, options *VPNLinkConnectionsClientBeginGetIkeSasOptions) (*runtime.Poller[VPNLinkConnectionsClientGetIkeSasResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.getIkeSas(ctx, resourceGroupName, gatewayName, connectionName, linkConnectionName, options) @@ -81,6 +82,7 @@ func (client *VPNLinkConnectionsClient) BeginGetIkeSas(ctx context.Context, reso // GetIkeSas - Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VPNLinkConnectionsClient) getIkeSas(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, options *VPNLinkConnectionsClientBeginGetIkeSasOptions) (*http.Response, error) { req, err := client.getIkeSasCreateRequest(ctx, resourceGroupName, gatewayName, connectionName, linkConnectionName, options) @@ -132,12 +134,13 @@ func (client *VPNLinkConnectionsClient) getIkeSasCreateRequest(ctx context.Conte } // NewListByVPNConnectionPager - Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the vpn gateway. -// gatewayName - The name of the gateway. -// connectionName - The name of the vpn connection. -// options - VPNLinkConnectionsClientListByVPNConnectionOptions contains the optional parameters for the VPNLinkConnectionsClient.ListByVPNConnection -// method. +// - resourceGroupName - The resource group name of the vpn gateway. +// - gatewayName - The name of the gateway. +// - connectionName - The name of the vpn connection. +// - options - VPNLinkConnectionsClientListByVPNConnectionOptions contains the optional parameters for the VPNLinkConnectionsClient.NewListByVPNConnectionPager +// method. func (client *VPNLinkConnectionsClient) NewListByVPNConnectionPager(resourceGroupName string, gatewayName string, connectionName string, options *VPNLinkConnectionsClientListByVPNConnectionOptions) *runtime.Pager[VPNLinkConnectionsClientListByVPNConnectionResponse] { return runtime.NewPager(runtime.PagingHandler[VPNLinkConnectionsClientListByVPNConnectionResponse]{ More: func(page VPNLinkConnectionsClientListByVPNConnectionResponse) bool { @@ -207,13 +210,14 @@ func (client *VPNLinkConnectionsClient) listByVPNConnectionHandleResponse(resp * // BeginResetConnection - Resets the VpnLink connection specified. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// gatewayName - The name of the gateway. -// connectionName - The name of the vpn connection. -// linkConnectionName - The name of the vpn link connection. -// options - VPNLinkConnectionsClientBeginResetConnectionOptions contains the optional parameters for the VPNLinkConnectionsClient.BeginResetConnection -// method. +// - resourceGroupName - The name of the resource group. +// - gatewayName - The name of the gateway. +// - connectionName - The name of the vpn connection. +// - linkConnectionName - The name of the vpn link connection. +// - options - VPNLinkConnectionsClientBeginResetConnectionOptions contains the optional parameters for the VPNLinkConnectionsClient.BeginResetConnection +// method. func (client *VPNLinkConnectionsClient) BeginResetConnection(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, options *VPNLinkConnectionsClientBeginResetConnectionOptions) (*runtime.Poller[VPNLinkConnectionsClientResetConnectionResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.resetConnection(ctx, resourceGroupName, gatewayName, connectionName, linkConnectionName, options) @@ -230,6 +234,7 @@ func (client *VPNLinkConnectionsClient) BeginResetConnection(ctx context.Context // ResetConnection - Resets the VpnLink connection specified. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VPNLinkConnectionsClient) resetConnection(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, options *VPNLinkConnectionsClientBeginResetConnectionOptions) (*http.Response, error) { req, err := client.resetConnectionCreateRequest(ctx, resourceGroupName, gatewayName, connectionName, linkConnectionName, options) diff --git a/sdk/resourcemanager/network/armnetwork/vpnlinkconnections_client_example_test.go b/sdk/resourcemanager/network/armnetwork/vpnlinkconnections_client_example_test.go deleted file mode 100644 index 28f7b59dc36b..000000000000 --- a/sdk/resourcemanager/network/armnetwork/vpnlinkconnections_client_example_test.go +++ /dev/null @@ -1,85 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnSiteLinkConnectionReset.json -func ExampleVPNLinkConnectionsClient_BeginResetConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNLinkConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginResetConnection(ctx, "rg1", "gateway1", "vpnConnection1", "Connection-Link1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnSiteLinkConnectionGetIkeSas.json -func ExampleVPNLinkConnectionsClient_BeginGetIkeSas() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNLinkConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGetIkeSas(ctx, "rg1", "gateway1", "vpnConnection1", "Connection-Link1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnSiteLinkConnectionList.json -func ExampleVPNLinkConnectionsClient_NewListByVPNConnectionPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNLinkConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByVPNConnectionPager("rg1", "gateway1", "vpnConnection1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/vpnserverconfigurations_client.go b/sdk/resourcemanager/network/armnetwork/vpnserverconfigurations_client.go index 744bb1289700..63e92a4965a0 100644 --- a/sdk/resourcemanager/network/armnetwork/vpnserverconfigurations_client.go +++ b/sdk/resourcemanager/network/armnetwork/vpnserverconfigurations_client.go @@ -32,10 +32,10 @@ type VPNServerConfigurationsClient struct { } // NewVPNServerConfigurationsClient creates a new instance of VPNServerConfigurationsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewVPNServerConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNServerConfigurationsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewVPNServerConfigurationsClient(subscriptionID string, credential azcore.T // BeginCreateOrUpdate - Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VpnServerConfiguration. -// vpnServerConfigurationName - The name of the VpnServerConfiguration being created or updated. -// vpnServerConfigurationParameters - Parameters supplied to create or update VpnServerConfiguration. -// options - VPNServerConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNServerConfigurationsClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The resource group name of the VpnServerConfiguration. +// - vpnServerConfigurationName - The name of the VpnServerConfiguration being created or updated. +// - vpnServerConfigurationParameters - Parameters supplied to create or update VpnServerConfiguration. +// - options - VPNServerConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNServerConfigurationsClient.BeginCreateOrUpdate +// method. func (client *VPNServerConfigurationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, vpnServerConfigurationParameters VPNServerConfiguration, options *VPNServerConfigurationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VPNServerConfigurationsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, vpnServerConfigurationName, vpnServerConfigurationParameters, options) @@ -80,6 +81,7 @@ func (client *VPNServerConfigurationsClient) BeginCreateOrUpdate(ctx context.Con // CreateOrUpdate - Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VPNServerConfigurationsClient) createOrUpdate(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, vpnServerConfigurationParameters VPNServerConfiguration, options *VPNServerConfigurationsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, vpnServerConfigurationName, vpnServerConfigurationParameters, options) @@ -124,11 +126,12 @@ func (client *VPNServerConfigurationsClient) createOrUpdateCreateRequest(ctx con // BeginDelete - Deletes a VpnServerConfiguration. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VpnServerConfiguration. -// vpnServerConfigurationName - The name of the VpnServerConfiguration being deleted. -// options - VPNServerConfigurationsClientBeginDeleteOptions contains the optional parameters for the VPNServerConfigurationsClient.BeginDelete -// method. +// - resourceGroupName - The resource group name of the VpnServerConfiguration. +// - vpnServerConfigurationName - The name of the VpnServerConfiguration being deleted. +// - options - VPNServerConfigurationsClientBeginDeleteOptions contains the optional parameters for the VPNServerConfigurationsClient.BeginDelete +// method. func (client *VPNServerConfigurationsClient) BeginDelete(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, options *VPNServerConfigurationsClientBeginDeleteOptions) (*runtime.Poller[VPNServerConfigurationsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, vpnServerConfigurationName, options) @@ -145,6 +148,7 @@ func (client *VPNServerConfigurationsClient) BeginDelete(ctx context.Context, re // Delete - Deletes a VpnServerConfiguration. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VPNServerConfigurationsClient) deleteOperation(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, options *VPNServerConfigurationsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, vpnServerConfigurationName, options) @@ -189,11 +193,12 @@ func (client *VPNServerConfigurationsClient) deleteCreateRequest(ctx context.Con // Get - Retrieves the details of a VpnServerConfiguration. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VpnServerConfiguration. -// vpnServerConfigurationName - The name of the VpnServerConfiguration being retrieved. -// options - VPNServerConfigurationsClientGetOptions contains the optional parameters for the VPNServerConfigurationsClient.Get -// method. +// - resourceGroupName - The resource group name of the VpnServerConfiguration. +// - vpnServerConfigurationName - The name of the VpnServerConfiguration being retrieved. +// - options - VPNServerConfigurationsClientGetOptions contains the optional parameters for the VPNServerConfigurationsClient.Get +// method. func (client *VPNServerConfigurationsClient) Get(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, options *VPNServerConfigurationsClientGetOptions) (VPNServerConfigurationsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, vpnServerConfigurationName, options) if err != nil { @@ -245,9 +250,10 @@ func (client *VPNServerConfigurationsClient) getHandleResponse(resp *http.Respon } // NewListPager - Lists all the VpnServerConfigurations in a subscription. +// // Generated from API version 2022-07-01 -// options - VPNServerConfigurationsClientListOptions contains the optional parameters for the VPNServerConfigurationsClient.List -// method. +// - options - VPNServerConfigurationsClientListOptions contains the optional parameters for the VPNServerConfigurationsClient.NewListPager +// method. func (client *VPNServerConfigurationsClient) NewListPager(options *VPNServerConfigurationsClientListOptions) *runtime.Pager[VPNServerConfigurationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[VPNServerConfigurationsClientListResponse]{ More: func(page VPNServerConfigurationsClientListResponse) bool { @@ -304,10 +310,11 @@ func (client *VPNServerConfigurationsClient) listHandleResponse(resp *http.Respo } // NewListByResourceGroupPager - Lists all the vpnServerConfigurations in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VpnServerConfiguration. -// options - VPNServerConfigurationsClientListByResourceGroupOptions contains the optional parameters for the VPNServerConfigurationsClient.ListByResourceGroup -// method. +// - resourceGroupName - The resource group name of the VpnServerConfiguration. +// - options - VPNServerConfigurationsClientListByResourceGroupOptions contains the optional parameters for the VPNServerConfigurationsClient.NewListByResourceGroupPager +// method. func (client *VPNServerConfigurationsClient) NewListByResourceGroupPager(resourceGroupName string, options *VPNServerConfigurationsClientListByResourceGroupOptions) *runtime.Pager[VPNServerConfigurationsClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[VPNServerConfigurationsClientListByResourceGroupResponse]{ More: func(page VPNServerConfigurationsClientListByResourceGroupResponse) bool { @@ -369,12 +376,13 @@ func (client *VPNServerConfigurationsClient) listByResourceGroupHandleResponse(r // UpdateTags - Updates VpnServerConfiguration tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VpnServerConfiguration. -// vpnServerConfigurationName - The name of the VpnServerConfiguration being updated. -// vpnServerConfigurationParameters - Parameters supplied to update VpnServerConfiguration tags. -// options - VPNServerConfigurationsClientUpdateTagsOptions contains the optional parameters for the VPNServerConfigurationsClient.UpdateTags -// method. +// - resourceGroupName - The resource group name of the VpnServerConfiguration. +// - vpnServerConfigurationName - The name of the VpnServerConfiguration being updated. +// - vpnServerConfigurationParameters - Parameters supplied to update VpnServerConfiguration tags. +// - options - VPNServerConfigurationsClientUpdateTagsOptions contains the optional parameters for the VPNServerConfigurationsClient.UpdateTags +// method. func (client *VPNServerConfigurationsClient) UpdateTags(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, vpnServerConfigurationParameters TagsObject, options *VPNServerConfigurationsClientUpdateTagsOptions) (VPNServerConfigurationsClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, vpnServerConfigurationName, vpnServerConfigurationParameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/vpnserverconfigurations_client_example_test.go b/sdk/resourcemanager/network/armnetwork/vpnserverconfigurations_client_example_test.go deleted file mode 100644 index 2df9dc316a17..000000000000 --- a/sdk/resourcemanager/network/armnetwork/vpnserverconfigurations_client_example_test.go +++ /dev/null @@ -1,228 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnServerConfigurationGet.json -func ExampleVPNServerConfigurationsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNServerConfigurationsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "vpnServerConfiguration1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnServerConfigurationPut.json -func ExampleVPNServerConfigurationsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNServerConfigurationsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "vpnServerConfiguration1", armnetwork.VPNServerConfiguration{ - Location: to.Ptr("West US"), - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - }, - Properties: &armnetwork.VPNServerConfigurationProperties{ - ConfigurationPolicyGroups: []*armnetwork.VPNServerConfigurationPolicyGroup{ - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfiguration1/vpnServerConfigurationPolicyGroups/policyGroup1"), - Name: to.Ptr("policyGroup1"), - Properties: &armnetwork.VPNServerConfigurationPolicyGroupProperties{ - IsDefault: to.Ptr(true), - PolicyMembers: []*armnetwork.VPNServerConfigurationPolicyGroupMember{ - { - Name: to.Ptr("policy1"), - AttributeType: to.Ptr(armnetwork.VPNPolicyMemberAttributeTypeRadiusAzureGroupID), - AttributeValue: to.Ptr("6ad1bd08"), - }}, - Priority: to.Ptr[int32](0), - }, - }, - { - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfiguration1/vpnServerConfigurationPolicyGroups/policyGroup2"), - Name: to.Ptr("policyGroup2"), - Properties: &armnetwork.VPNServerConfigurationPolicyGroupProperties{ - IsDefault: to.Ptr(true), - PolicyMembers: []*armnetwork.VPNServerConfigurationPolicyGroupMember{ - { - Name: to.Ptr("policy2"), - AttributeType: to.Ptr(armnetwork.VPNPolicyMemberAttributeTypeCertificateGroupID), - AttributeValue: to.Ptr("red.com"), - }}, - Priority: to.Ptr[int32](0), - }, - }}, - RadiusClientRootCertificates: []*armnetwork.VPNServerConfigRadiusClientRootCertificate{ - { - Name: to.Ptr("vpnServerConfigRadiusClientRootCert1"), - Thumbprint: to.Ptr("83FFBFC8848B5A5836C94D0112367E16148A286F"), - }}, - RadiusServerRootCertificates: []*armnetwork.VPNServerConfigRadiusServerRootCertificate{ - { - Name: to.Ptr("vpnServerConfigRadiusServerRootCer1"), - PublicCertData: to.Ptr("MIIC5zCCAc+gAwIBAgIQErQ0Hk4aDJxIA+Q5RagB+jANBgkqhkiG9w0BAQsFADAWMRQwEgYDVQQDDAtQMlNSb290Q2VydDAeFw0xNzEyMTQyMTA3MzhaFw0xODEyMTQyMTI3MzhaMBYxFDASBgNVBAMMC1AyU1Jvb3RDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArP7/NQXmW7cQ/ZR1mv3Y3I29Lt7HTOqzo/1KUOoVH3NItbQIRAQbwKy3UWrOFz4eGNX2GWtNRMdCyWsKeqy9Ltsdfcm1IbKXkl84DFeU/ZacXu4Dl3xX3gV5du4TLZjEowJELyur11Ea2YcjPRQ/FzAF9/hGuboS1HZQEPLx4FdUs9OxCYOtc0MxBCwLfVTTRqarb0Ne+arNYd4kCzIhAke1nOyKAJBda5ZL+VHy3S5S8qGlD46jm8HXugmAkUygS4oIIXOmj/1O9sNAi3LN60zufSzCmP8Rm/iUGX+DHAGGiXxwZOKQLEDaZXKqoHjMPP0XudmSWwOIbyeQVrLhkwIDAQABozEwLzAOBgNVHQ8BAf8EBAMCAgQwHQYDVR0OBBYEFEfeNU2trYxNLF9ONmuJUsT13pKDMA0GCSqGSIb3DQEBCwUAA4IBAQBmM6RJzsGGipxyMhimHKN2xlkejhVsgBoTAhOU0llW9aUSwINJ9zFUGgI8IzUFy1VG776fchHp0LMRmPSIUYk5btEPxbsrPtumPuMH8EQGrS+Rt4pD+78c8H1fEPkq5CmDl/PKu4JoFGv+aFcE+Od0hlILstIF10Qysf++QXDolKfzJa/56bgMeYKFiju73loiRM57ns8ddXpfLl792UVpRkFU62LNns6Y1LKTwapmUF4IvIuAIzd6LZNOQng64LAKXtKnViJ1JQiXwf4CEzhgvAti3/ejpb3U90hsrUcyZi6wBv9bZLcAJRWpz61JNYliM1d1grSwQDKGXNQE4xuM"), - }}, - RadiusServers: []*armnetwork.RadiusServer{ - { - RadiusServerAddress: to.Ptr("10.0.0.0"), - RadiusServerScore: to.Ptr[int64](25), - RadiusServerSecret: to.Ptr("radiusServerSecret"), - }}, - VPNClientIPSecPolicies: []*armnetwork.IPSecPolicy{ - { - DhGroup: to.Ptr(armnetwork.DhGroupDHGroup14), - IkeEncryption: to.Ptr(armnetwork.IkeEncryptionAES256), - IkeIntegrity: to.Ptr(armnetwork.IkeIntegritySHA384), - IPSecEncryption: to.Ptr(armnetwork.IPSecEncryptionAES256), - IPSecIntegrity: to.Ptr(armnetwork.IPSecIntegritySHA256), - PfsGroup: to.Ptr(armnetwork.PfsGroupPFS14), - SaDataSizeKilobytes: to.Ptr[int32](429497), - SaLifeTimeSeconds: to.Ptr[int32](86472), - }}, - VPNClientRevokedCertificates: []*armnetwork.VPNServerConfigVPNClientRevokedCertificate{ - { - Name: to.Ptr("vpnServerConfigVpnClientRevokedCert1"), - Thumbprint: to.Ptr("83FFBFC8848B5A5836C94D0112367E16148A286F"), - }}, - VPNClientRootCertificates: []*armnetwork.VPNServerConfigVPNClientRootCertificate{ - { - Name: to.Ptr("vpnServerConfigVpnClientRootCert1"), - PublicCertData: to.Ptr("MIIC5zCCAc+gAwIBAgIQErQ0Hk4aDJxIA+Q5RagB+jANBgkqhkiG9w0BAQsFADAWMRQwEgYDVQQDDAtQMlNSb290Q2VydDAeFw0xNzEyMTQyMTA3MzhaFw0xODEyMTQyMTI3MzhaMBYxFDASBgNVBAMMC1AyU1Jvb3RDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArP7/NQXmW7cQ/ZR1mv3Y3I29Lt7HTOqzo/1KUOoVH3NItbQIRAQbwKy3UWrOFz4eGNX2GWtNRMdCyWsKeqy9Ltsdfcm1IbKXkl84DFeU/ZacXu4Dl3xX3gV5du4TLZjEowJELyur11Ea2YcjPRQ/FzAF9/hGuboS1HZQEPLx4FdUs9OxCYOtc0MxBCwLfVTTRqarb0Ne+arNYd4kCzIhAke1nOyKAJBda5ZL+VHy3S5S8qGlD46jm8HXugmAkUygS4oIIXOmj/1O9sNAi3LN60zufSzCmP8Rm/iUGX+DHAGGiXxwZOKQLEDaZXKqoHjMPP0XudmSWwOIbyeQVrLhkwIDAQABozEwLzAOBgNVHQ8BAf8EBAMCAgQwHQYDVR0OBBYEFEfeNU2trYxNLF9ONmuJUsT13pKDMA0GCSqGSIb3DQEBCwUAA4IBAQBmM6RJzsGGipxyMhimHKN2xlkejhVsgBoTAhOU0llW9aUSwINJ9zFUGgI8IzUFy1VG776fchHp0LMRmPSIUYk5btEPxbsrPtumPuMH8EQGrS+Rt4pD+78c8H1fEPkq5CmDl/PKu4JoFGv+aFcE+Od0hlILstIF10Qysf++QXDolKfzJa/56bgMeYKFiju73loiRM57ns8ddXpfLl792UVpRkFU62LNns6Y1LKTwapmUF4IvIuAIzd6LZNOQng64LAKXtKnViJ1JQiXwf4CEzhgvAti3/ejpb3U90hsrUcyZi6wBv9bZLcAJRWpz61JNYliM1d1grSwQDKGXNQE4xuN"), - }}, - VPNProtocols: []*armnetwork.VPNGatewayTunnelingProtocol{ - to.Ptr(armnetwork.VPNGatewayTunnelingProtocolIkeV2)}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnServerConfigurationUpdateTags.json -func ExampleVPNServerConfigurationsClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNServerConfigurationsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, "rg1", "vpnServerConfiguration1", armnetwork.TagsObject{ - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - "key2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnServerConfigurationDelete.json -func ExampleVPNServerConfigurationsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNServerConfigurationsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "vpnServerConfiguration1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnServerConfigurationListByResourceGroup.json -func ExampleVPNServerConfigurationsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNServerConfigurationsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnServerConfigurationList.json -func ExampleVPNServerConfigurationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNServerConfigurationsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/vpnserverconfigurationsassociatedwithvirtualwan_client.go b/sdk/resourcemanager/network/armnetwork/vpnserverconfigurationsassociatedwithvirtualwan_client.go index fb6956911c92..da61e093353f 100644 --- a/sdk/resourcemanager/network/armnetwork/vpnserverconfigurationsassociatedwithvirtualwan_client.go +++ b/sdk/resourcemanager/network/armnetwork/vpnserverconfigurationsassociatedwithvirtualwan_client.go @@ -32,10 +32,10 @@ type VPNServerConfigurationsAssociatedWithVirtualWanClient struct { } // NewVPNServerConfigurationsAssociatedWithVirtualWanClient creates a new instance of VPNServerConfigurationsAssociatedWithVirtualWanClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewVPNServerConfigurationsAssociatedWithVirtualWanClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNServerConfigurationsAssociatedWithVirtualWanClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,11 +58,12 @@ func NewVPNServerConfigurationsAssociatedWithVirtualWanClient(subscriptionID str // BeginList - Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name. -// virtualWANName - The name of the VirtualWAN whose associated VpnServerConfigurations is needed. -// options - VPNServerConfigurationsAssociatedWithVirtualWanClientBeginListOptions contains the optional parameters for the -// VPNServerConfigurationsAssociatedWithVirtualWanClient.BeginList method. +// - resourceGroupName - The resource group name. +// - virtualWANName - The name of the VirtualWAN whose associated VpnServerConfigurations is needed. +// - options - VPNServerConfigurationsAssociatedWithVirtualWanClientBeginListOptions contains the optional parameters for the +// VPNServerConfigurationsAssociatedWithVirtualWanClient.BeginList method. func (client *VPNServerConfigurationsAssociatedWithVirtualWanClient) BeginList(ctx context.Context, resourceGroupName string, virtualWANName string, options *VPNServerConfigurationsAssociatedWithVirtualWanClientBeginListOptions) (*runtime.Poller[VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.listOperation(ctx, resourceGroupName, virtualWANName, options) @@ -79,6 +80,7 @@ func (client *VPNServerConfigurationsAssociatedWithVirtualWanClient) BeginList(c // List - Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VPNServerConfigurationsAssociatedWithVirtualWanClient) listOperation(ctx context.Context, resourceGroupName string, virtualWANName string, options *VPNServerConfigurationsAssociatedWithVirtualWanClientBeginListOptions) (*http.Response, error) { req, err := client.listCreateRequest(ctx, resourceGroupName, virtualWANName, options) diff --git a/sdk/resourcemanager/network/armnetwork/vpnserverconfigurationsassociatedwithvirtualwan_client_example_test.go b/sdk/resourcemanager/network/armnetwork/vpnserverconfigurationsassociatedwithvirtualwan_client_example_test.go deleted file mode 100644 index ec95b119b6e2..000000000000 --- a/sdk/resourcemanager/network/armnetwork/vpnserverconfigurationsassociatedwithvirtualwan_client_example_test.go +++ /dev/null @@ -1,40 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/GetVirtualWanVpnServerConfigurations.json -func ExampleVPNServerConfigurationsAssociatedWithVirtualWanClient_BeginList() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNServerConfigurationsAssociatedWithVirtualWanClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginList(ctx, "rg1", "wan1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/vpnsitelinkconnections_client.go b/sdk/resourcemanager/network/armnetwork/vpnsitelinkconnections_client.go index 9eb682bb804e..0d5802c9ce5d 100644 --- a/sdk/resourcemanager/network/armnetwork/vpnsitelinkconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/vpnsitelinkconnections_client.go @@ -32,10 +32,10 @@ type VPNSiteLinkConnectionsClient struct { } // NewVPNSiteLinkConnectionsClient creates a new instance of VPNSiteLinkConnectionsClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewVPNSiteLinkConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNSiteLinkConnectionsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ func NewVPNSiteLinkConnectionsClient(subscriptionID string, credential azcore.To // Get - Retrieves the details of a vpn site link connection. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VpnGateway. -// gatewayName - The name of the gateway. -// connectionName - The name of the vpn connection. -// linkConnectionName - The name of the vpn connection. -// options - VPNSiteLinkConnectionsClientGetOptions contains the optional parameters for the VPNSiteLinkConnectionsClient.Get -// method. +// - resourceGroupName - The resource group name of the VpnGateway. +// - gatewayName - The name of the gateway. +// - connectionName - The name of the vpn connection. +// - linkConnectionName - The name of the vpn connection. +// - options - VPNSiteLinkConnectionsClientGetOptions contains the optional parameters for the VPNSiteLinkConnectionsClient.Get +// method. func (client *VPNSiteLinkConnectionsClient) Get(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, options *VPNSiteLinkConnectionsClientGetOptions) (VPNSiteLinkConnectionsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, gatewayName, connectionName, linkConnectionName, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/vpnsitelinkconnections_client_example_test.go b/sdk/resourcemanager/network/armnetwork/vpnsitelinkconnections_client_example_test.go deleted file mode 100644 index 1c26520f30e5..000000000000 --- a/sdk/resourcemanager/network/armnetwork/vpnsitelinkconnections_client_example_test.go +++ /dev/null @@ -1,36 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnSiteLinkConnectionGet.json -func ExampleVPNSiteLinkConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNSiteLinkConnectionsClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "gateway1", "vpnConnection1", "Connection-Link1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/vpnsitelinks_client.go b/sdk/resourcemanager/network/armnetwork/vpnsitelinks_client.go index ed69ee8a6c6e..56db458571df 100644 --- a/sdk/resourcemanager/network/armnetwork/vpnsitelinks_client.go +++ b/sdk/resourcemanager/network/armnetwork/vpnsitelinks_client.go @@ -32,10 +32,10 @@ type VPNSiteLinksClient struct { } // NewVPNSiteLinksClient creates a new instance of VPNSiteLinksClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewVPNSiteLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNSiteLinksClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,11 +58,12 @@ func NewVPNSiteLinksClient(subscriptionID string, credential azcore.TokenCredent // Get - Retrieves the details of a VPN site link. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VpnSite. -// vpnSiteName - The name of the VpnSite. -// vpnSiteLinkName - The name of the VpnSiteLink being retrieved. -// options - VPNSiteLinksClientGetOptions contains the optional parameters for the VPNSiteLinksClient.Get method. +// - resourceGroupName - The resource group name of the VpnSite. +// - vpnSiteName - The name of the VpnSite. +// - vpnSiteLinkName - The name of the VpnSiteLink being retrieved. +// - options - VPNSiteLinksClientGetOptions contains the optional parameters for the VPNSiteLinksClient.Get method. func (client *VPNSiteLinksClient) Get(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteLinkName string, options *VPNSiteLinksClientGetOptions) (VPNSiteLinksClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, vpnSiteName, vpnSiteLinkName, options) if err != nil { @@ -118,11 +119,12 @@ func (client *VPNSiteLinksClient) getHandleResponse(resp *http.Response) (VPNSit } // NewListByVPNSitePager - Lists all the vpnSiteLinks in a resource group for a vpn site. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VpnSite. -// vpnSiteName - The name of the VpnSite. -// options - VPNSiteLinksClientListByVPNSiteOptions contains the optional parameters for the VPNSiteLinksClient.ListByVPNSite -// method. +// - resourceGroupName - The resource group name of the VpnSite. +// - vpnSiteName - The name of the VpnSite. +// - options - VPNSiteLinksClientListByVPNSiteOptions contains the optional parameters for the VPNSiteLinksClient.NewListByVPNSitePager +// method. func (client *VPNSiteLinksClient) NewListByVPNSitePager(resourceGroupName string, vpnSiteName string, options *VPNSiteLinksClientListByVPNSiteOptions) *runtime.Pager[VPNSiteLinksClientListByVPNSiteResponse] { return runtime.NewPager(runtime.PagingHandler[VPNSiteLinksClientListByVPNSiteResponse]{ More: func(page VPNSiteLinksClientListByVPNSiteResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/vpnsitelinks_client_example_test.go b/sdk/resourcemanager/network/armnetwork/vpnsitelinks_client_example_test.go deleted file mode 100644 index 3afe4d96be39..000000000000 --- a/sdk/resourcemanager/network/armnetwork/vpnsitelinks_client_example_test.go +++ /dev/null @@ -1,60 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnSiteLinkGet.json -func ExampleVPNSiteLinksClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNSiteLinksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "vpnSite1", "vpnSiteLink1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnSiteLinkListByVpnSite.json -func ExampleVPNSiteLinksClient_NewListByVPNSitePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNSiteLinksClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByVPNSitePager("rg1", "vpnSite1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/vpnsites_client.go b/sdk/resourcemanager/network/armnetwork/vpnsites_client.go index ae3c1ae8c933..bce487403b7f 100644 --- a/sdk/resourcemanager/network/armnetwork/vpnsites_client.go +++ b/sdk/resourcemanager/network/armnetwork/vpnsites_client.go @@ -32,10 +32,10 @@ type VPNSitesClient struct { } // NewVPNSitesClient creates a new instance of VPNSitesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewVPNSitesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNSitesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewVPNSitesClient(subscriptionID string, credential azcore.TokenCredential, // BeginCreateOrUpdate - Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VpnSite. -// vpnSiteName - The name of the VpnSite being created or updated. -// vpnSiteParameters - Parameters supplied to create or update VpnSite. -// options - VPNSitesClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNSitesClient.BeginCreateOrUpdate -// method. +// - resourceGroupName - The resource group name of the VpnSite. +// - vpnSiteName - The name of the VpnSite being created or updated. +// - vpnSiteParameters - Parameters supplied to create or update VpnSite. +// - options - VPNSitesClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNSitesClient.BeginCreateOrUpdate +// method. func (client *VPNSitesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters VPNSite, options *VPNSitesClientBeginCreateOrUpdateOptions) (*runtime.Poller[VPNSitesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, vpnSiteName, vpnSiteParameters, options) @@ -80,6 +81,7 @@ func (client *VPNSitesClient) BeginCreateOrUpdate(ctx context.Context, resourceG // CreateOrUpdate - Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VPNSitesClient) createOrUpdate(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters VPNSite, options *VPNSitesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, vpnSiteName, vpnSiteParameters, options) @@ -124,10 +126,11 @@ func (client *VPNSitesClient) createOrUpdateCreateRequest(ctx context.Context, r // BeginDelete - Deletes a VpnSite. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VpnSite. -// vpnSiteName - The name of the VpnSite being deleted. -// options - VPNSitesClientBeginDeleteOptions contains the optional parameters for the VPNSitesClient.BeginDelete method. +// - resourceGroupName - The resource group name of the VpnSite. +// - vpnSiteName - The name of the VpnSite being deleted. +// - options - VPNSitesClientBeginDeleteOptions contains the optional parameters for the VPNSitesClient.BeginDelete method. func (client *VPNSitesClient) BeginDelete(ctx context.Context, resourceGroupName string, vpnSiteName string, options *VPNSitesClientBeginDeleteOptions) (*runtime.Poller[VPNSitesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, vpnSiteName, options) @@ -144,6 +147,7 @@ func (client *VPNSitesClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Deletes a VpnSite. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VPNSitesClient) deleteOperation(ctx context.Context, resourceGroupName string, vpnSiteName string, options *VPNSitesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, vpnSiteName, options) @@ -188,10 +192,11 @@ func (client *VPNSitesClient) deleteCreateRequest(ctx context.Context, resourceG // Get - Retrieves the details of a VPN site. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VpnSite. -// vpnSiteName - The name of the VpnSite being retrieved. -// options - VPNSitesClientGetOptions contains the optional parameters for the VPNSitesClient.Get method. +// - resourceGroupName - The resource group name of the VpnSite. +// - vpnSiteName - The name of the VpnSite being retrieved. +// - options - VPNSitesClientGetOptions contains the optional parameters for the VPNSitesClient.Get method. func (client *VPNSitesClient) Get(ctx context.Context, resourceGroupName string, vpnSiteName string, options *VPNSitesClientGetOptions) (VPNSitesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, vpnSiteName, options) if err != nil { @@ -243,8 +248,9 @@ func (client *VPNSitesClient) getHandleResponse(resp *http.Response) (VPNSitesCl } // NewListPager - Lists all the VpnSites in a subscription. +// // Generated from API version 2022-07-01 -// options - VPNSitesClientListOptions contains the optional parameters for the VPNSitesClient.List method. +// - options - VPNSitesClientListOptions contains the optional parameters for the VPNSitesClient.NewListPager method. func (client *VPNSitesClient) NewListPager(options *VPNSitesClientListOptions) *runtime.Pager[VPNSitesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[VPNSitesClientListResponse]{ More: func(page VPNSitesClientListResponse) bool { @@ -301,10 +307,11 @@ func (client *VPNSitesClient) listHandleResponse(resp *http.Response) (VPNSitesC } // NewListByResourceGroupPager - Lists all the vpnSites in a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VpnSite. -// options - VPNSitesClientListByResourceGroupOptions contains the optional parameters for the VPNSitesClient.ListByResourceGroup -// method. +// - resourceGroupName - The resource group name of the VpnSite. +// - options - VPNSitesClientListByResourceGroupOptions contains the optional parameters for the VPNSitesClient.NewListByResourceGroupPager +// method. func (client *VPNSitesClient) NewListByResourceGroupPager(resourceGroupName string, options *VPNSitesClientListByResourceGroupOptions) *runtime.Pager[VPNSitesClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[VPNSitesClientListByResourceGroupResponse]{ More: func(page VPNSitesClientListByResourceGroupResponse) bool { @@ -366,11 +373,12 @@ func (client *VPNSitesClient) listByResourceGroupHandleResponse(resp *http.Respo // UpdateTags - Updates VpnSite tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name of the VpnSite. -// vpnSiteName - The name of the VpnSite being updated. -// vpnSiteParameters - Parameters supplied to update VpnSite tags. -// options - VPNSitesClientUpdateTagsOptions contains the optional parameters for the VPNSitesClient.UpdateTags method. +// - resourceGroupName - The resource group name of the VpnSite. +// - vpnSiteName - The name of the VpnSite being updated. +// - vpnSiteParameters - Parameters supplied to update VpnSite tags. +// - options - VPNSitesClientUpdateTagsOptions contains the optional parameters for the VPNSitesClient.UpdateTags method. func (client *VPNSitesClient) UpdateTags(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters TagsObject, options *VPNSitesClientUpdateTagsOptions) (VPNSitesClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, vpnSiteName, vpnSiteParameters, options) if err != nil { diff --git a/sdk/resourcemanager/network/armnetwork/vpnsites_client_example_test.go b/sdk/resourcemanager/network/armnetwork/vpnsites_client_example_test.go deleted file mode 100644 index 0afc08d8fce7..000000000000 --- a/sdk/resourcemanager/network/armnetwork/vpnsites_client_example_test.go +++ /dev/null @@ -1,191 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnSiteGet.json -func ExampleVPNSitesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNSitesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "vpnSite1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnSitePut.json -func ExampleVPNSitesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNSitesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, "rg1", "vpnSite1", armnetwork.VPNSite{ - Location: to.Ptr("West US"), - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - }, - Properties: &armnetwork.VPNSiteProperties{ - AddressSpace: &armnetwork.AddressSpace{ - AddressPrefixes: []*string{ - to.Ptr("10.0.0.0/16")}, - }, - IsSecuritySite: to.Ptr(false), - O365Policy: &armnetwork.O365PolicyProperties{ - BreakOutCategories: &armnetwork.O365BreakOutCategoryPolicies{ - Default: to.Ptr(false), - Allow: to.Ptr(true), - Optimize: to.Ptr(true), - }, - }, - VirtualWan: &armnetwork.SubResource{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualWANs/wan1"), - }, - VPNSiteLinks: []*armnetwork.VPNSiteLink{ - { - Name: to.Ptr("vpnSiteLink1"), - Properties: &armnetwork.VPNSiteLinkProperties{ - BgpProperties: &armnetwork.VPNLinkBgpSettings{ - Asn: to.Ptr[int64](1234), - BgpPeeringAddress: to.Ptr("192.168.0.0"), - }, - Fqdn: to.Ptr("link1.vpnsite1.contoso.com"), - IPAddress: to.Ptr("50.50.50.56"), - LinkProperties: &armnetwork.VPNLinkProviderProperties{ - LinkProviderName: to.Ptr("vendor1"), - LinkSpeedInMbps: to.Ptr[int32](0), - }, - }, - }}, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnSiteUpdateTags.json -func ExampleVPNSitesClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNSitesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, "rg1", "vpnSite1", armnetwork.TagsObject{ - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - "key2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnSiteDelete.json -func ExampleVPNSitesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNSitesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "vpnSite1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnSiteListByResourceGroup.json -func ExampleVPNSitesClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNSitesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnSiteList.json -func ExampleVPNSitesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNSitesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/vpnsitesconfiguration_client.go b/sdk/resourcemanager/network/armnetwork/vpnsitesconfiguration_client.go index 00aff36046c4..797a77e8aaba 100644 --- a/sdk/resourcemanager/network/armnetwork/vpnsitesconfiguration_client.go +++ b/sdk/resourcemanager/network/armnetwork/vpnsitesconfiguration_client.go @@ -32,10 +32,10 @@ type VPNSitesConfigurationClient struct { } // NewVPNSitesConfigurationClient creates a new instance of VPNSitesConfigurationClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewVPNSitesConfigurationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNSitesConfigurationClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewVPNSitesConfigurationClient(subscriptionID string, credential azcore.Tok // BeginDownload - Gives the sas-url to download the configurations for vpn-sites in a resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The resource group name. -// virtualWANName - The name of the VirtualWAN for which configuration of all vpn-sites is needed. -// request - Parameters supplied to download vpn-sites configuration. -// options - VPNSitesConfigurationClientBeginDownloadOptions contains the optional parameters for the VPNSitesConfigurationClient.BeginDownload -// method. +// - resourceGroupName - The resource group name. +// - virtualWANName - The name of the VirtualWAN for which configuration of all vpn-sites is needed. +// - request - Parameters supplied to download vpn-sites configuration. +// - options - VPNSitesConfigurationClientBeginDownloadOptions contains the optional parameters for the VPNSitesConfigurationClient.BeginDownload +// method. func (client *VPNSitesConfigurationClient) BeginDownload(ctx context.Context, resourceGroupName string, virtualWANName string, request GetVPNSitesConfigurationRequest, options *VPNSitesConfigurationClientBeginDownloadOptions) (*runtime.Poller[VPNSitesConfigurationClientDownloadResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.download(ctx, resourceGroupName, virtualWANName, request, options) @@ -80,6 +81,7 @@ func (client *VPNSitesConfigurationClient) BeginDownload(ctx context.Context, re // Download - Gives the sas-url to download the configurations for vpn-sites in a resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *VPNSitesConfigurationClient) download(ctx context.Context, resourceGroupName string, virtualWANName string, request GetVPNSitesConfigurationRequest, options *VPNSitesConfigurationClientBeginDownloadOptions) (*http.Response, error) { req, err := client.downloadCreateRequest(ctx, resourceGroupName, virtualWANName, request, options) diff --git a/sdk/resourcemanager/network/armnetwork/vpnsitesconfiguration_client_example_test.go b/sdk/resourcemanager/network/armnetwork/vpnsitesconfiguration_client_example_test.go deleted file mode 100644 index 283f26c9d744..000000000000 --- a/sdk/resourcemanager/network/armnetwork/vpnsitesconfiguration_client_example_test.go +++ /dev/null @@ -1,43 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/VpnSitesConfigurationDownload.json -func ExampleVPNSitesConfigurationClient_BeginDownload() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewVPNSitesConfigurationClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDownload(ctx, "rg1", "wan1", armnetwork.GetVPNSitesConfigurationRequest{ - OutputBlobSasURL: to.Ptr("https://blobcortextesturl.blob.core.windows.net/folderforconfig/vpnFile?sp=rw&se=2018-01-10T03%3A42%3A04Z&sv=2017-04-17&sig=WvXrT5bDmDFfgHs%2Brz%2BjAu123eRCNE9BO0eQYcPDT7pY%3D&sr=b"), - VPNSites: []*string{ - to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/abc")}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/network/armnetwork/watchers_client.go b/sdk/resourcemanager/network/armnetwork/watchers_client.go index 131e1d13ca12..d2749e80b686 100644 --- a/sdk/resourcemanager/network/armnetwork/watchers_client.go +++ b/sdk/resourcemanager/network/armnetwork/watchers_client.go @@ -32,10 +32,10 @@ type WatchersClient struct { } // NewWatchersClient creates a new instance of WatchersClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewWatchersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WatchersClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -59,12 +59,13 @@ func NewWatchersClient(subscriptionID string, credential azcore.TokenCredential, // BeginCheckConnectivity - Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given // endpoint including another VM or an arbitrary remote server. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the network watcher resource group. -// networkWatcherName - The name of the network watcher resource. -// parameters - Parameters that determine how the connectivity check will be performed. -// options - WatchersClientBeginCheckConnectivityOptions contains the optional parameters for the WatchersClient.BeginCheckConnectivity -// method. +// - resourceGroupName - The name of the network watcher resource group. +// - networkWatcherName - The name of the network watcher resource. +// - parameters - Parameters that determine how the connectivity check will be performed. +// - options - WatchersClientBeginCheckConnectivityOptions contains the optional parameters for the WatchersClient.BeginCheckConnectivity +// method. func (client *WatchersClient) BeginCheckConnectivity(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConnectivityParameters, options *WatchersClientBeginCheckConnectivityOptions) (*runtime.Poller[WatchersClientCheckConnectivityResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.checkConnectivity(ctx, resourceGroupName, networkWatcherName, parameters, options) @@ -82,6 +83,7 @@ func (client *WatchersClient) BeginCheckConnectivity(ctx context.Context, resour // CheckConnectivity - Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given // endpoint including another VM or an arbitrary remote server. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *WatchersClient) checkConnectivity(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConnectivityParameters, options *WatchersClientBeginCheckConnectivityOptions) (*http.Response, error) { req, err := client.checkConnectivityCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) @@ -126,11 +128,12 @@ func (client *WatchersClient) checkConnectivityCreateRequest(ctx context.Context // CreateOrUpdate - Creates or updates a network watcher in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// parameters - Parameters that define the network watcher resource. -// options - WatchersClientCreateOrUpdateOptions contains the optional parameters for the WatchersClient.CreateOrUpdate method. +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - parameters - Parameters that define the network watcher resource. +// - options - WatchersClientCreateOrUpdateOptions contains the optional parameters for the WatchersClient.CreateOrUpdate method. func (client *WatchersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters Watcher, options *WatchersClientCreateOrUpdateOptions) (WatchersClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) if err != nil { @@ -183,10 +186,11 @@ func (client *WatchersClient) createOrUpdateHandleResponse(resp *http.Response) // BeginDelete - Deletes the specified network watcher resource. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// options - WatchersClientBeginDeleteOptions contains the optional parameters for the WatchersClient.BeginDelete method. +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - options - WatchersClientBeginDeleteOptions contains the optional parameters for the WatchersClient.BeginDelete method. func (client *WatchersClient) BeginDelete(ctx context.Context, resourceGroupName string, networkWatcherName string, options *WatchersClientBeginDeleteOptions) (*runtime.Poller[WatchersClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, networkWatcherName, options) @@ -203,6 +207,7 @@ func (client *WatchersClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Deletes the specified network watcher resource. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *WatchersClient) deleteOperation(ctx context.Context, resourceGroupName string, networkWatcherName string, options *WatchersClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, networkWatcherName, options) @@ -247,10 +252,11 @@ func (client *WatchersClient) deleteCreateRequest(ctx context.Context, resourceG // Get - Gets the specified network watcher by resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// options - WatchersClientGetOptions contains the optional parameters for the WatchersClient.Get method. +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - options - WatchersClientGetOptions contains the optional parameters for the WatchersClient.Get method. func (client *WatchersClient) Get(ctx context.Context, resourceGroupName string, networkWatcherName string, options *WatchersClientGetOptions) (WatchersClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, networkWatcherName, options) if err != nil { @@ -304,12 +310,13 @@ func (client *WatchersClient) getHandleResponse(resp *http.Response) (WatchersCl // BeginGetAzureReachabilityReport - NOTE: This feature is currently in preview and still being tested for stability. Gets // the relative latency score for internet service providers from a specified location to Azure regions. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the network watcher resource group. -// networkWatcherName - The name of the network watcher resource. -// parameters - Parameters that determine Azure reachability report configuration. -// options - WatchersClientBeginGetAzureReachabilityReportOptions contains the optional parameters for the WatchersClient.BeginGetAzureReachabilityReport -// method. +// - resourceGroupName - The name of the network watcher resource group. +// - networkWatcherName - The name of the network watcher resource. +// - parameters - Parameters that determine Azure reachability report configuration. +// - options - WatchersClientBeginGetAzureReachabilityReportOptions contains the optional parameters for the WatchersClient.BeginGetAzureReachabilityReport +// method. func (client *WatchersClient) BeginGetAzureReachabilityReport(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AzureReachabilityReportParameters, options *WatchersClientBeginGetAzureReachabilityReportOptions) (*runtime.Poller[WatchersClientGetAzureReachabilityReportResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.getAzureReachabilityReport(ctx, resourceGroupName, networkWatcherName, parameters, options) @@ -327,6 +334,7 @@ func (client *WatchersClient) BeginGetAzureReachabilityReport(ctx context.Contex // GetAzureReachabilityReport - NOTE: This feature is currently in preview and still being tested for stability. Gets the // relative latency score for internet service providers from a specified location to Azure regions. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *WatchersClient) getAzureReachabilityReport(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AzureReachabilityReportParameters, options *WatchersClientBeginGetAzureReachabilityReportOptions) (*http.Response, error) { req, err := client.getAzureReachabilityReportCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) @@ -371,12 +379,13 @@ func (client *WatchersClient) getAzureReachabilityReportCreateRequest(ctx contex // BeginGetFlowLogStatus - Queries status of flow log and traffic analytics (optional) on a specified resource. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the network watcher resource group. -// networkWatcherName - The name of the network watcher resource. -// parameters - Parameters that define a resource to query flow log and traffic analytics (optional) status. -// options - WatchersClientBeginGetFlowLogStatusOptions contains the optional parameters for the WatchersClient.BeginGetFlowLogStatus -// method. +// - resourceGroupName - The name of the network watcher resource group. +// - networkWatcherName - The name of the network watcher resource. +// - parameters - Parameters that define a resource to query flow log and traffic analytics (optional) status. +// - options - WatchersClientBeginGetFlowLogStatusOptions contains the optional parameters for the WatchersClient.BeginGetFlowLogStatus +// method. func (client *WatchersClient) BeginGetFlowLogStatus(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogStatusParameters, options *WatchersClientBeginGetFlowLogStatusOptions) (*runtime.Poller[WatchersClientGetFlowLogStatusResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.getFlowLogStatus(ctx, resourceGroupName, networkWatcherName, parameters, options) @@ -393,6 +402,7 @@ func (client *WatchersClient) BeginGetFlowLogStatus(ctx context.Context, resourc // GetFlowLogStatus - Queries status of flow log and traffic analytics (optional) on a specified resource. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *WatchersClient) getFlowLogStatus(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogStatusParameters, options *WatchersClientBeginGetFlowLogStatusOptions) (*http.Response, error) { req, err := client.getFlowLogStatusCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) @@ -441,12 +451,13 @@ func (client *WatchersClient) getFlowLogStatusCreateRequest(ctx context.Context, // The API returns whether traffic was allowed or denied, the rules evaluated for // the specified flow and the evaluation results. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// parameters - Parameters to get network configuration diagnostic. -// options - WatchersClientBeginGetNetworkConfigurationDiagnosticOptions contains the optional parameters for the WatchersClient.BeginGetNetworkConfigurationDiagnostic -// method. +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - parameters - Parameters to get network configuration diagnostic. +// - options - WatchersClientBeginGetNetworkConfigurationDiagnosticOptions contains the optional parameters for the WatchersClient.BeginGetNetworkConfigurationDiagnostic +// method. func (client *WatchersClient) BeginGetNetworkConfigurationDiagnostic(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConfigurationDiagnosticParameters, options *WatchersClientBeginGetNetworkConfigurationDiagnosticOptions) (*runtime.Poller[WatchersClientGetNetworkConfigurationDiagnosticResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.getNetworkConfigurationDiagnostic(ctx, resourceGroupName, networkWatcherName, parameters, options) @@ -467,6 +478,7 @@ func (client *WatchersClient) BeginGetNetworkConfigurationDiagnostic(ctx context // The API returns whether traffic was allowed or denied, the rules evaluated for // the specified flow and the evaluation results. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *WatchersClient) getNetworkConfigurationDiagnostic(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConfigurationDiagnosticParameters, options *WatchersClientBeginGetNetworkConfigurationDiagnosticOptions) (*http.Response, error) { req, err := client.getNetworkConfigurationDiagnosticCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) @@ -511,12 +523,13 @@ func (client *WatchersClient) getNetworkConfigurationDiagnosticCreateRequest(ctx // BeginGetNextHop - Gets the next hop from the specified VM. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// parameters - Parameters that define the source and destination endpoint. -// options - WatchersClientBeginGetNextHopOptions contains the optional parameters for the WatchersClient.BeginGetNextHop -// method. +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - parameters - Parameters that define the source and destination endpoint. +// - options - WatchersClientBeginGetNextHopOptions contains the optional parameters for the WatchersClient.BeginGetNextHop +// method. func (client *WatchersClient) BeginGetNextHop(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters NextHopParameters, options *WatchersClientBeginGetNextHopOptions) (*runtime.Poller[WatchersClientGetNextHopResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.getNextHop(ctx, resourceGroupName, networkWatcherName, parameters, options) @@ -533,6 +546,7 @@ func (client *WatchersClient) BeginGetNextHop(ctx context.Context, resourceGroup // GetNextHop - Gets the next hop from the specified VM. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *WatchersClient) getNextHop(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters NextHopParameters, options *WatchersClientBeginGetNextHopOptions) (*http.Response, error) { req, err := client.getNextHopCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) @@ -577,11 +591,12 @@ func (client *WatchersClient) getNextHopCreateRequest(ctx context.Context, resou // GetTopology - Gets the current network topology by resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// parameters - Parameters that define the representation of topology. -// options - WatchersClientGetTopologyOptions contains the optional parameters for the WatchersClient.GetTopology method. +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - parameters - Parameters that define the representation of topology. +// - options - WatchersClientGetTopologyOptions contains the optional parameters for the WatchersClient.GetTopology method. func (client *WatchersClient) GetTopology(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TopologyParameters, options *WatchersClientGetTopologyOptions) (WatchersClientGetTopologyResponse, error) { req, err := client.getTopologyCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) if err != nil { @@ -634,12 +649,13 @@ func (client *WatchersClient) getTopologyHandleResponse(resp *http.Response) (Wa // BeginGetTroubleshooting - Initiate troubleshooting on a specified resource. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher resource. -// parameters - Parameters that define the resource to troubleshoot. -// options - WatchersClientBeginGetTroubleshootingOptions contains the optional parameters for the WatchersClient.BeginGetTroubleshooting -// method. +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher resource. +// - parameters - Parameters that define the resource to troubleshoot. +// - options - WatchersClientBeginGetTroubleshootingOptions contains the optional parameters for the WatchersClient.BeginGetTroubleshooting +// method. func (client *WatchersClient) BeginGetTroubleshooting(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TroubleshootingParameters, options *WatchersClientBeginGetTroubleshootingOptions) (*runtime.Poller[WatchersClientGetTroubleshootingResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.getTroubleshooting(ctx, resourceGroupName, networkWatcherName, parameters, options) @@ -656,6 +672,7 @@ func (client *WatchersClient) BeginGetTroubleshooting(ctx context.Context, resou // GetTroubleshooting - Initiate troubleshooting on a specified resource. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *WatchersClient) getTroubleshooting(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TroubleshootingParameters, options *WatchersClientBeginGetTroubleshootingOptions) (*http.Response, error) { req, err := client.getTroubleshootingCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) @@ -700,12 +717,13 @@ func (client *WatchersClient) getTroubleshootingCreateRequest(ctx context.Contex // BeginGetTroubleshootingResult - Get the last completed troubleshooting result on a specified resource. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher resource. -// parameters - Parameters that define the resource to query the troubleshooting result. -// options - WatchersClientBeginGetTroubleshootingResultOptions contains the optional parameters for the WatchersClient.BeginGetTroubleshootingResult -// method. +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher resource. +// - parameters - Parameters that define the resource to query the troubleshooting result. +// - options - WatchersClientBeginGetTroubleshootingResultOptions contains the optional parameters for the WatchersClient.BeginGetTroubleshootingResult +// method. func (client *WatchersClient) BeginGetTroubleshootingResult(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters QueryTroubleshootingParameters, options *WatchersClientBeginGetTroubleshootingResultOptions) (*runtime.Poller[WatchersClientGetTroubleshootingResultResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.getTroubleshootingResult(ctx, resourceGroupName, networkWatcherName, parameters, options) @@ -722,6 +740,7 @@ func (client *WatchersClient) BeginGetTroubleshootingResult(ctx context.Context, // GetTroubleshootingResult - Get the last completed troubleshooting result on a specified resource. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *WatchersClient) getTroubleshootingResult(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters QueryTroubleshootingParameters, options *WatchersClientBeginGetTroubleshootingResultOptions) (*http.Response, error) { req, err := client.getTroubleshootingResultCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) @@ -766,12 +785,13 @@ func (client *WatchersClient) getTroubleshootingResultCreateRequest(ctx context. // BeginGetVMSecurityRules - Gets the configured and effective security group rules on the specified VM. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// parameters - Parameters that define the VM to check security groups for. -// options - WatchersClientBeginGetVMSecurityRulesOptions contains the optional parameters for the WatchersClient.BeginGetVMSecurityRules -// method. +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - parameters - Parameters that define the VM to check security groups for. +// - options - WatchersClientBeginGetVMSecurityRulesOptions contains the optional parameters for the WatchersClient.BeginGetVMSecurityRules +// method. func (client *WatchersClient) BeginGetVMSecurityRules(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters SecurityGroupViewParameters, options *WatchersClientBeginGetVMSecurityRulesOptions) (*runtime.Poller[WatchersClientGetVMSecurityRulesResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.getVMSecurityRules(ctx, resourceGroupName, networkWatcherName, parameters, options) @@ -788,6 +808,7 @@ func (client *WatchersClient) BeginGetVMSecurityRules(ctx context.Context, resou // GetVMSecurityRules - Gets the configured and effective security group rules on the specified VM. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *WatchersClient) getVMSecurityRules(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters SecurityGroupViewParameters, options *WatchersClientBeginGetVMSecurityRulesOptions) (*http.Response, error) { req, err := client.getVMSecurityRulesCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) @@ -831,9 +852,10 @@ func (client *WatchersClient) getVMSecurityRulesCreateRequest(ctx context.Contex } // NewListPager - Gets all network watchers by resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - WatchersClientListOptions contains the optional parameters for the WatchersClient.List method. +// - resourceGroupName - The name of the resource group. +// - options - WatchersClientListOptions contains the optional parameters for the WatchersClient.NewListPager method. func (client *WatchersClient) NewListPager(resourceGroupName string, options *WatchersClientListOptions) *runtime.Pager[WatchersClientListResponse] { return runtime.NewPager(runtime.PagingHandler[WatchersClientListResponse]{ More: func(page WatchersClientListResponse) bool { @@ -888,8 +910,9 @@ func (client *WatchersClient) listHandleResponse(resp *http.Response) (WatchersC } // NewListAllPager - Gets all network watchers by subscription. +// // Generated from API version 2022-07-01 -// options - WatchersClientListAllOptions contains the optional parameters for the WatchersClient.ListAll method. +// - options - WatchersClientListAllOptions contains the optional parameters for the WatchersClient.NewListAllPager method. func (client *WatchersClient) NewListAllPager(options *WatchersClientListAllOptions) *runtime.Pager[WatchersClientListAllResponse] { return runtime.NewPager(runtime.PagingHandler[WatchersClientListAllResponse]{ More: func(page WatchersClientListAllResponse) bool { @@ -942,12 +965,13 @@ func (client *WatchersClient) listAllHandleResponse(resp *http.Response) (Watche // BeginListAvailableProviders - NOTE: This feature is currently in preview and still being tested for stability. Lists all // available internet service providers for a specified Azure region. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the network watcher resource group. -// networkWatcherName - The name of the network watcher resource. -// parameters - Parameters that scope the list of available providers. -// options - WatchersClientBeginListAvailableProvidersOptions contains the optional parameters for the WatchersClient.BeginListAvailableProviders -// method. +// - resourceGroupName - The name of the network watcher resource group. +// - networkWatcherName - The name of the network watcher resource. +// - parameters - Parameters that scope the list of available providers. +// - options - WatchersClientBeginListAvailableProvidersOptions contains the optional parameters for the WatchersClient.BeginListAvailableProviders +// method. func (client *WatchersClient) BeginListAvailableProviders(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AvailableProvidersListParameters, options *WatchersClientBeginListAvailableProvidersOptions) (*runtime.Poller[WatchersClientListAvailableProvidersResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.listAvailableProviders(ctx, resourceGroupName, networkWatcherName, parameters, options) @@ -965,6 +989,7 @@ func (client *WatchersClient) BeginListAvailableProviders(ctx context.Context, r // ListAvailableProviders - NOTE: This feature is currently in preview and still being tested for stability. Lists all available // internet service providers for a specified Azure region. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *WatchersClient) listAvailableProviders(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AvailableProvidersListParameters, options *WatchersClientBeginListAvailableProvidersOptions) (*http.Response, error) { req, err := client.listAvailableProvidersCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) @@ -1009,12 +1034,13 @@ func (client *WatchersClient) listAvailableProvidersCreateRequest(ctx context.Co // BeginSetFlowLogConfiguration - Configures flow log and traffic analytics (optional) on a specified resource. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the network watcher resource group. -// networkWatcherName - The name of the network watcher resource. -// parameters - Parameters that define the configuration of flow log. -// options - WatchersClientBeginSetFlowLogConfigurationOptions contains the optional parameters for the WatchersClient.BeginSetFlowLogConfiguration -// method. +// - resourceGroupName - The name of the network watcher resource group. +// - networkWatcherName - The name of the network watcher resource. +// - parameters - Parameters that define the configuration of flow log. +// - options - WatchersClientBeginSetFlowLogConfigurationOptions contains the optional parameters for the WatchersClient.BeginSetFlowLogConfiguration +// method. func (client *WatchersClient) BeginSetFlowLogConfiguration(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogInformation, options *WatchersClientBeginSetFlowLogConfigurationOptions) (*runtime.Poller[WatchersClientSetFlowLogConfigurationResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.setFlowLogConfiguration(ctx, resourceGroupName, networkWatcherName, parameters, options) @@ -1031,6 +1057,7 @@ func (client *WatchersClient) BeginSetFlowLogConfiguration(ctx context.Context, // SetFlowLogConfiguration - Configures flow log and traffic analytics (optional) on a specified resource. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *WatchersClient) setFlowLogConfiguration(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogInformation, options *WatchersClientBeginSetFlowLogConfigurationOptions) (*http.Response, error) { req, err := client.setFlowLogConfigurationCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) @@ -1075,11 +1102,12 @@ func (client *WatchersClient) setFlowLogConfigurationCreateRequest(ctx context.C // UpdateTags - Updates a network watcher tags. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// parameters - Parameters supplied to update network watcher tags. -// options - WatchersClientUpdateTagsOptions contains the optional parameters for the WatchersClient.UpdateTags method. +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - parameters - Parameters supplied to update network watcher tags. +// - options - WatchersClientUpdateTagsOptions contains the optional parameters for the WatchersClient.UpdateTags method. func (client *WatchersClient) UpdateTags(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TagsObject, options *WatchersClientUpdateTagsOptions) (WatchersClientUpdateTagsResponse, error) { req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) if err != nil { @@ -1132,12 +1160,13 @@ func (client *WatchersClient) updateTagsHandleResponse(resp *http.Response) (Wat // BeginVerifyIPFlow - Verify IP flow from the specified VM to a location given the currently configured NSG rules. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// networkWatcherName - The name of the network watcher. -// parameters - Parameters that define the IP flow to be verified. -// options - WatchersClientBeginVerifyIPFlowOptions contains the optional parameters for the WatchersClient.BeginVerifyIPFlow -// method. +// - resourceGroupName - The name of the resource group. +// - networkWatcherName - The name of the network watcher. +// - parameters - Parameters that define the IP flow to be verified. +// - options - WatchersClientBeginVerifyIPFlowOptions contains the optional parameters for the WatchersClient.BeginVerifyIPFlow +// method. func (client *WatchersClient) BeginVerifyIPFlow(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters VerificationIPFlowParameters, options *WatchersClientBeginVerifyIPFlowOptions) (*runtime.Poller[WatchersClientVerifyIPFlowResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.verifyIPFlow(ctx, resourceGroupName, networkWatcherName, parameters, options) @@ -1154,6 +1183,7 @@ func (client *WatchersClient) BeginVerifyIPFlow(ctx context.Context, resourceGro // VerifyIPFlow - Verify IP flow from the specified VM to a location given the currently configured NSG rules. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *WatchersClient) verifyIPFlow(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters VerificationIPFlowParameters, options *WatchersClientBeginVerifyIPFlowOptions) (*http.Response, error) { req, err := client.verifyIPFlowCreateRequest(ctx, resourceGroupName, networkWatcherName, parameters, options) diff --git a/sdk/resourcemanager/network/armnetwork/watchers_client_example_test.go b/sdk/resourcemanager/network/armnetwork/watchers_client_example_test.go deleted file mode 100644 index ed5a544c797d..000000000000 --- a/sdk/resourcemanager/network/armnetwork/watchers_client_example_test.go +++ /dev/null @@ -1,495 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherCreate.json -func ExampleWatchersClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewWatchersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, "rg1", "nw1", armnetwork.Watcher{ - Location: to.Ptr("eastus"), - Properties: &armnetwork.WatcherPropertiesFormat{}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherGet.json -func ExampleWatchersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewWatchersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "nw1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherDelete.json -func ExampleWatchersClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewWatchersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "nw1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherUpdateTags.json -func ExampleWatchersClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewWatchersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.UpdateTags(ctx, "rg1", "nw1", armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherList.json -func ExampleWatchersClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewWatchersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherListAll.json -func ExampleWatchersClient_NewListAllPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewWatchersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListAllPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherTopologyGet.json -func ExampleWatchersClient_GetTopology() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewWatchersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetTopology(ctx, "rg1", "nw1", armnetwork.TopologyParameters{ - TargetResourceGroupName: to.Ptr("rg2"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherIpFlowVerify.json -func ExampleWatchersClient_BeginVerifyIPFlow() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewWatchersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginVerifyIPFlow(ctx, "rg1", "nw1", armnetwork.VerificationIPFlowParameters{ - Direction: to.Ptr(armnetwork.DirectionOutbound), - LocalIPAddress: to.Ptr("10.2.0.4"), - LocalPort: to.Ptr("80"), - RemoteIPAddress: to.Ptr("121.10.1.1"), - RemotePort: to.Ptr("80"), - TargetResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1"), - Protocol: to.Ptr(armnetwork.IPFlowProtocolTCP), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherNextHopGet.json -func ExampleWatchersClient_BeginGetNextHop() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewWatchersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGetNextHop(ctx, "rg1", "nw1", armnetwork.NextHopParameters{ - DestinationIPAddress: to.Ptr("10.0.0.10"), - SourceIPAddress: to.Ptr("10.0.0.5"), - TargetNicResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/nic1"), - TargetResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherSecurityGroupViewGet.json -func ExampleWatchersClient_BeginGetVMSecurityRules() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewWatchersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGetVMSecurityRules(ctx, "rg1", "nw1", armnetwork.SecurityGroupViewParameters{ - TargetResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherTroubleshootGet.json -func ExampleWatchersClient_BeginGetTroubleshooting() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewWatchersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGetTroubleshooting(ctx, "rg1", "nw1", armnetwork.TroubleshootingParameters{ - Properties: &armnetwork.TroubleshootingProperties{ - StorageID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/st1"), - StoragePath: to.Ptr("https://st1.blob.core.windows.net/cn1"), - }, - TargetResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherTroubleshootResultQuery.json -func ExampleWatchersClient_BeginGetTroubleshootingResult() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewWatchersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGetTroubleshootingResult(ctx, "rg1", "nw1", armnetwork.QueryTroubleshootingParameters{ - TargetResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherFlowLogConfigure.json -func ExampleWatchersClient_BeginSetFlowLogConfiguration() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewWatchersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginSetFlowLogConfiguration(ctx, "rg1", "nw1", armnetwork.FlowLogInformation{ - Properties: &armnetwork.FlowLogProperties{ - Enabled: to.Ptr(true), - StorageID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/st1"), - }, - TargetResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/nsg1"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherFlowLogStatusQuery.json -func ExampleWatchersClient_BeginGetFlowLogStatus() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewWatchersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGetFlowLogStatus(ctx, "rg1", "nw1", armnetwork.FlowLogStatusParameters{ - TargetResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/nsg1"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherConnectivityCheck.json -func ExampleWatchersClient_BeginCheckConnectivity() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewWatchersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCheckConnectivity(ctx, "rg1", "nw1", armnetwork.ConnectivityParameters{ - Destination: &armnetwork.ConnectivityDestination{ - Address: to.Ptr("192.168.100.4"), - Port: to.Ptr[int32](3389), - }, - PreferredIPVersion: to.Ptr(armnetwork.IPVersionIPv4), - Source: &armnetwork.ConnectivitySource{ - ResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherAzureReachabilityReportGet.json -func ExampleWatchersClient_BeginGetAzureReachabilityReport() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewWatchersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGetAzureReachabilityReport(ctx, "rg1", "nw1", armnetwork.AzureReachabilityReportParameters{ - AzureLocations: []*string{ - to.Ptr("West US")}, - EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-09-10T00:00:00Z"); return t }()), - ProviderLocation: &armnetwork.AzureReachabilityReportLocation{ - Country: to.Ptr("United States"), - State: to.Ptr("washington"), - }, - Providers: []*string{ - to.Ptr("Frontier Communications of America, Inc. - ASN 5650")}, - StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-09-07T00:00:00Z"); return t }()), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherAvailableProvidersListGet.json -func ExampleWatchersClient_BeginListAvailableProviders() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewWatchersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginListAvailableProviders(ctx, "rg1", "nw1", armnetwork.AvailableProvidersListParameters{ - AzureLocations: []*string{ - to.Ptr("West US")}, - City: to.Ptr("seattle"), - Country: to.Ptr("United States"), - State: to.Ptr("washington"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json -func ExampleWatchersClient_BeginGetNetworkConfigurationDiagnostic() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewWatchersClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginGetNetworkConfigurationDiagnostic(ctx, "rg1", "nw1", armnetwork.ConfigurationDiagnosticParameters{ - Profiles: []*armnetwork.ConfigurationDiagnosticProfile{ - { - Destination: to.Ptr("12.11.12.14"), - DestinationPort: to.Ptr("12100"), - Direction: to.Ptr(armnetwork.DirectionInbound), - Source: to.Ptr("10.1.0.4"), - Protocol: to.Ptr("TCP"), - }}, - TargetResourceID: to.Ptr("/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Compute/virtualMachines/vm1"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/network/armnetwork/webapplicationfirewallpolicies_client.go b/sdk/resourcemanager/network/armnetwork/webapplicationfirewallpolicies_client.go index 87043fc07186..e1e5d124f131 100644 --- a/sdk/resourcemanager/network/armnetwork/webapplicationfirewallpolicies_client.go +++ b/sdk/resourcemanager/network/armnetwork/webapplicationfirewallpolicies_client.go @@ -32,10 +32,10 @@ type WebApplicationFirewallPoliciesClient struct { } // NewWebApplicationFirewallPoliciesClient creates a new instance of WebApplicationFirewallPoliciesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewWebApplicationFirewallPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WebApplicationFirewallPoliciesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,12 +58,13 @@ func NewWebApplicationFirewallPoliciesClient(subscriptionID string, credential a // CreateOrUpdate - Creates or update policy with specified rule set name within a resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// policyName - The name of the policy. -// parameters - Policy to be created. -// options - WebApplicationFirewallPoliciesClientCreateOrUpdateOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.CreateOrUpdate -// method. +// - resourceGroupName - The name of the resource group. +// - policyName - The name of the policy. +// - parameters - Policy to be created. +// - options - WebApplicationFirewallPoliciesClientCreateOrUpdateOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.CreateOrUpdate +// method. func (client *WebApplicationFirewallPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, policyName string, parameters WebApplicationFirewallPolicy, options *WebApplicationFirewallPoliciesClientCreateOrUpdateOptions) (WebApplicationFirewallPoliciesClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, policyName, parameters, options) if err != nil { @@ -116,11 +117,12 @@ func (client *WebApplicationFirewallPoliciesClient) createOrUpdateHandleResponse // BeginDelete - Deletes Policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// policyName - The name of the policy. -// options - WebApplicationFirewallPoliciesClientBeginDeleteOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.BeginDelete -// method. +// - resourceGroupName - The name of the resource group. +// - policyName - The name of the policy. +// - options - WebApplicationFirewallPoliciesClientBeginDeleteOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.BeginDelete +// method. func (client *WebApplicationFirewallPoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, policyName string, options *WebApplicationFirewallPoliciesClientBeginDeleteOptions) (*runtime.Poller[WebApplicationFirewallPoliciesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, policyName, options) @@ -137,6 +139,7 @@ func (client *WebApplicationFirewallPoliciesClient) BeginDelete(ctx context.Cont // Delete - Deletes Policy. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 func (client *WebApplicationFirewallPoliciesClient) deleteOperation(ctx context.Context, resourceGroupName string, policyName string, options *WebApplicationFirewallPoliciesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, policyName, options) @@ -181,11 +184,12 @@ func (client *WebApplicationFirewallPoliciesClient) deleteCreateRequest(ctx cont // Get - Retrieve protection policy with specified name within a resource group. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// policyName - The name of the policy. -// options - WebApplicationFirewallPoliciesClientGetOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.Get -// method. +// - resourceGroupName - The name of the resource group. +// - policyName - The name of the policy. +// - options - WebApplicationFirewallPoliciesClientGetOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.Get +// method. func (client *WebApplicationFirewallPoliciesClient) Get(ctx context.Context, resourceGroupName string, policyName string, options *WebApplicationFirewallPoliciesClientGetOptions) (WebApplicationFirewallPoliciesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, policyName, options) if err != nil { @@ -237,10 +241,11 @@ func (client *WebApplicationFirewallPoliciesClient) getHandleResponse(resp *http } // NewListPager - Lists all of the protection policies within a resource group. +// // Generated from API version 2022-07-01 -// resourceGroupName - The name of the resource group. -// options - WebApplicationFirewallPoliciesClientListOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.List -// method. +// - resourceGroupName - The name of the resource group. +// - options - WebApplicationFirewallPoliciesClientListOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.NewListPager +// method. func (client *WebApplicationFirewallPoliciesClient) NewListPager(resourceGroupName string, options *WebApplicationFirewallPoliciesClientListOptions) *runtime.Pager[WebApplicationFirewallPoliciesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[WebApplicationFirewallPoliciesClientListResponse]{ More: func(page WebApplicationFirewallPoliciesClientListResponse) bool { @@ -301,9 +306,10 @@ func (client *WebApplicationFirewallPoliciesClient) listHandleResponse(resp *htt } // NewListAllPager - Gets all the WAF policies in a subscription. +// // Generated from API version 2022-07-01 -// options - WebApplicationFirewallPoliciesClientListAllOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.ListAll -// method. +// - options - WebApplicationFirewallPoliciesClientListAllOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.NewListAllPager +// method. func (client *WebApplicationFirewallPoliciesClient) NewListAllPager(options *WebApplicationFirewallPoliciesClientListAllOptions) *runtime.Pager[WebApplicationFirewallPoliciesClientListAllResponse] { return runtime.NewPager(runtime.PagingHandler[WebApplicationFirewallPoliciesClientListAllResponse]{ More: func(page WebApplicationFirewallPoliciesClientListAllResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/webapplicationfirewallpolicies_client_example_test.go b/sdk/resourcemanager/network/armnetwork/webapplicationfirewallpolicies_client_example_test.go deleted file mode 100644 index 17b7f2b347ca..000000000000 --- a/sdk/resourcemanager/network/armnetwork/webapplicationfirewallpolicies_client_example_test.go +++ /dev/null @@ -1,238 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/WafListPolicies.json -func ExampleWebApplicationFirewallPoliciesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewWebApplicationFirewallPoliciesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg1", nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/WafListAllPolicies.json -func ExampleWebApplicationFirewallPoliciesClient_NewListAllPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewWebApplicationFirewallPoliciesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListAllPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/WafPolicyGet.json -func ExampleWebApplicationFirewallPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewWebApplicationFirewallPoliciesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "rg1", "Policy1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/WafPolicyCreateOrUpdate.json -func ExampleWebApplicationFirewallPoliciesClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewWebApplicationFirewallPoliciesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, "rg1", "Policy1", armnetwork.WebApplicationFirewallPolicy{ - Location: to.Ptr("WestUs"), - Properties: &armnetwork.WebApplicationFirewallPolicyPropertiesFormat{ - CustomRules: []*armnetwork.WebApplicationFirewallCustomRule{ - { - Name: to.Ptr("Rule1"), - Action: to.Ptr(armnetwork.WebApplicationFirewallActionBlock), - MatchConditions: []*armnetwork.MatchCondition{ - { - MatchValues: []*string{ - to.Ptr("192.168.1.0/24"), - to.Ptr("10.0.0.0/24")}, - MatchVariables: []*armnetwork.MatchVariable{ - { - VariableName: to.Ptr(armnetwork.WebApplicationFirewallMatchVariableRemoteAddr), - }}, - Operator: to.Ptr(armnetwork.WebApplicationFirewallOperatorIPMatch), - }}, - Priority: to.Ptr[int32](1), - RuleType: to.Ptr(armnetwork.WebApplicationFirewallRuleTypeMatchRule), - }, - { - Name: to.Ptr("Rule2"), - Action: to.Ptr(armnetwork.WebApplicationFirewallActionBlock), - MatchConditions: []*armnetwork.MatchCondition{ - { - MatchValues: []*string{ - to.Ptr("192.168.1.0/24")}, - MatchVariables: []*armnetwork.MatchVariable{ - { - VariableName: to.Ptr(armnetwork.WebApplicationFirewallMatchVariableRemoteAddr), - }}, - Operator: to.Ptr(armnetwork.WebApplicationFirewallOperatorIPMatch), - }, - { - MatchValues: []*string{ - to.Ptr("Windows")}, - MatchVariables: []*armnetwork.MatchVariable{ - { - Selector: to.Ptr("UserAgent"), - VariableName: to.Ptr(armnetwork.WebApplicationFirewallMatchVariableRequestHeaders), - }}, - Operator: to.Ptr(armnetwork.WebApplicationFirewallOperatorContains), - }}, - Priority: to.Ptr[int32](2), - RuleType: to.Ptr(armnetwork.WebApplicationFirewallRuleTypeMatchRule), - }}, - ManagedRules: &armnetwork.ManagedRulesDefinition{ - Exclusions: []*armnetwork.OwaspCrsExclusionEntry{ - { - ExclusionManagedRuleSets: []*armnetwork.ExclusionManagedRuleSet{ - { - RuleGroups: []*armnetwork.ExclusionManagedRuleGroup{ - { - RuleGroupName: to.Ptr("REQUEST-930-APPLICATION-ATTACK-LFI"), - Rules: []*armnetwork.ExclusionManagedRule{ - { - RuleID: to.Ptr("930120"), - }}, - }, - { - RuleGroupName: to.Ptr("REQUEST-932-APPLICATION-ATTACK-RCE"), - }}, - RuleSetType: to.Ptr("OWASP"), - RuleSetVersion: to.Ptr("3.2"), - }}, - MatchVariable: to.Ptr(armnetwork.OwaspCrsExclusionEntryMatchVariableRequestArgNames), - Selector: to.Ptr("hello"), - SelectorMatchOperator: to.Ptr(armnetwork.OwaspCrsExclusionEntrySelectorMatchOperatorStartsWith), - }, - { - ExclusionManagedRuleSets: []*armnetwork.ExclusionManagedRuleSet{ - { - RuleGroups: []*armnetwork.ExclusionManagedRuleGroup{}, - RuleSetType: to.Ptr("OWASP"), - RuleSetVersion: to.Ptr("3.1"), - }}, - MatchVariable: to.Ptr(armnetwork.OwaspCrsExclusionEntryMatchVariableRequestArgNames), - Selector: to.Ptr("hello"), - SelectorMatchOperator: to.Ptr(armnetwork.OwaspCrsExclusionEntrySelectorMatchOperatorEndsWith), - }, - { - MatchVariable: to.Ptr(armnetwork.OwaspCrsExclusionEntryMatchVariableRequestArgNames), - Selector: to.Ptr("test"), - SelectorMatchOperator: to.Ptr(armnetwork.OwaspCrsExclusionEntrySelectorMatchOperatorStartsWith), - }, - { - MatchVariable: to.Ptr(armnetwork.OwaspCrsExclusionEntryMatchVariableRequestArgValues), - Selector: to.Ptr("test"), - SelectorMatchOperator: to.Ptr(armnetwork.OwaspCrsExclusionEntrySelectorMatchOperatorStartsWith), - }}, - ManagedRuleSets: []*armnetwork.ManagedRuleSet{ - { - RuleGroupOverrides: []*armnetwork.ManagedRuleGroupOverride{ - { - RuleGroupName: to.Ptr("REQUEST-931-APPLICATION-ATTACK-RFI"), - Rules: []*armnetwork.ManagedRuleOverride{ - { - Action: to.Ptr(armnetwork.ActionTypeLog), - RuleID: to.Ptr("931120"), - State: to.Ptr(armnetwork.ManagedRuleEnabledStateEnabled), - }, - { - Action: to.Ptr(armnetwork.ActionTypeAnomalyScoring), - RuleID: to.Ptr("931130"), - State: to.Ptr(armnetwork.ManagedRuleEnabledStateDisabled), - }}, - }}, - RuleSetType: to.Ptr("OWASP"), - RuleSetVersion: to.Ptr("3.2"), - }}, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/WafPolicyDelete.json -func ExampleWebApplicationFirewallPoliciesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewWebApplicationFirewallPoliciesClient("subid", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, "rg1", "Policy1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/network/armnetwork/webcategories_client.go b/sdk/resourcemanager/network/armnetwork/webcategories_client.go index 47a5115252fd..ba78025d01dc 100644 --- a/sdk/resourcemanager/network/armnetwork/webcategories_client.go +++ b/sdk/resourcemanager/network/armnetwork/webcategories_client.go @@ -32,10 +32,10 @@ type WebCategoriesClient struct { } // NewWebCategoriesClient creates a new instance of WebCategoriesClient with the specified values. -// subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription -// ID forms part of the URI for every service call. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - subscriptionID - The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription +// ID forms part of the URI for every service call. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewWebCategoriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WebCategoriesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,9 +58,10 @@ func NewWebCategoriesClient(subscriptionID string, credential azcore.TokenCreden // Get - Gets the specified Azure Web Category. // If the operation fails it returns an *azcore.ResponseError type. +// // Generated from API version 2022-07-01 -// name - The name of the azureWebCategory. -// options - WebCategoriesClientGetOptions contains the optional parameters for the WebCategoriesClient.Get method. +// - name - The name of the azureWebCategory. +// - options - WebCategoriesClientGetOptions contains the optional parameters for the WebCategoriesClient.Get method. func (client *WebCategoriesClient) Get(ctx context.Context, name string, options *WebCategoriesClientGetOptions) (WebCategoriesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, name, options) if err != nil { @@ -111,9 +112,10 @@ func (client *WebCategoriesClient) getHandleResponse(resp *http.Response) (WebCa } // NewListBySubscriptionPager - Gets all the Azure Web Categories in a subscription. +// // Generated from API version 2022-07-01 -// options - WebCategoriesClientListBySubscriptionOptions contains the optional parameters for the WebCategoriesClient.ListBySubscription -// method. +// - options - WebCategoriesClientListBySubscriptionOptions contains the optional parameters for the WebCategoriesClient.NewListBySubscriptionPager +// method. func (client *WebCategoriesClient) NewListBySubscriptionPager(options *WebCategoriesClientListBySubscriptionOptions) *runtime.Pager[WebCategoriesClientListBySubscriptionResponse] { return runtime.NewPager(runtime.PagingHandler[WebCategoriesClientListBySubscriptionResponse]{ More: func(page WebCategoriesClientListBySubscriptionResponse) bool { diff --git a/sdk/resourcemanager/network/armnetwork/webcategories_client_example_test.go b/sdk/resourcemanager/network/armnetwork/webcategories_client_example_test.go deleted file mode 100644 index d6412737fc75..000000000000 --- a/sdk/resourcemanager/network/armnetwork/webcategories_client_example_test.go +++ /dev/null @@ -1,60 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/AzureWebCategoryGet.json -func ExampleWebCategoriesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewWebCategoriesClient("4de8428a-4a92-4cea-90ff-b47128b8cab8", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, "Arts", &armnetwork.WebCategoriesClientGetOptions{Expand: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2022-07-01/examples/AzureWebCategoriesListBySubscription.json -func ExampleWebCategoriesClient_NewListBySubscriptionPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armnetwork.NewWebCategoriesClient("4de8428a-4a92-4cea-90ff-b47128b8cab8", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListBySubscriptionPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -}