diff --git a/sdk/resourcemanager/network/armnetwork/CHANGELOG.md b/sdk/resourcemanager/network/armnetwork/CHANGELOG.md index 5ef89adf9c0e..dbc75f8aa928 100644 --- a/sdk/resourcemanager/network/armnetwork/CHANGELOG.md +++ b/sdk/resourcemanager/network/armnetwork/CHANGELOG.md @@ -1,5 +1,28 @@ # Release History +## 1.1.0 (2022-05-24) +### Features Added + +- New const `WebApplicationFirewallOperatorAny` +- New const `ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20220101S` +- New const `ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20220101` +- New const `ApplicationGatewaySSLProtocolTLSv13` +- New const `ApplicationGatewaySSLPolicyTypeCustomV2` +- New function `ExpressRouteProviderPort.MarshalJSON() ([]byte, error)` +- New function `*ManagementClient.ExpressRouteProviderPort(context.Context, string, *ManagementClientExpressRouteProviderPortOptions) (ManagementClientExpressRouteProviderPortResponse, error)` +- New struct `ExpressRouteProviderPort` +- New struct `ExpressRouteProviderPortListResult` +- New struct `ExpressRouteProviderPortProperties` +- New struct `ExpressRouteProviderPortsLocationClientListOptions` +- New struct `ExpressRouteProviderPortsLocationClientListResponse` +- New struct `ManagementClientExpressRouteProviderPortOptions` +- New struct `ManagementClientExpressRouteProviderPortResponse` +- New struct `VirtualRouterAutoScaleConfiguration` +- New field `EnablePacFile` in struct `ExplicitProxySettings` +- New field `VirtualRouterAutoScaleConfiguration` in struct `VirtualHubProperties` +- New field `Priority` in struct `ApplicationGatewayRoutingRulePropertiesFormat` + + ## 1.0.0 (2022-05-16) ### Breaking Changes diff --git a/sdk/resourcemanager/network/armnetwork/autorest.md b/sdk/resourcemanager/network/armnetwork/autorest.md index 1bd355a47d15..52cb7d131efc 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/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/network/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/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: 1.0.0 +module-version: 1.1.0 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/network/armnetwork/go.mod b/sdk/resourcemanager/network/armnetwork/go.mod index db5f3492ccfc..42ba09f66c71 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/ze_generated_example_applicationgatewayprivateendpointconnections_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_applicationgatewayprivateendpointconnections_client_test.go deleted file mode 100644 index 0f01654d769f..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_applicationgatewayprivateendpointconnections_client_test.go +++ /dev/null @@ -1,131 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_applicationgatewayprivatelinkresources_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_applicationgatewayprivatelinkresources_client_test.go deleted file mode 100644 index 355ed0ebcbf0..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_applicationgatewayprivatelinkresources_client_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/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/ze_generated_example_applicationgateways_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_applicationgateways_client_test.go deleted file mode 100644 index 9fa376197318..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_applicationgateways_client_test.go +++ /dev/null @@ -1,661 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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 -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_applicationsecuritygroups_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_applicationsecuritygroups_client_test.go deleted file mode 100644 index 9ed4cae7cb9f..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_applicationsecuritygroups_client_test.go +++ /dev/null @@ -1,171 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_availabledelegations_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_availabledelegations_client_test.go deleted file mode 100644 index bce8ae61bc5b..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_availabledelegations_client_test.go +++ /dev/null @@ -1,42 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/ze_generated_example_availableendpointservices_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_availableendpointservices_client_test.go deleted file mode 100644 index 57699162d290..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_availableendpointservices_client_test.go +++ /dev/null @@ -1,42 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/ze_generated_example_availableprivateendpointtypes_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_availableprivateendpointtypes_client_test.go deleted file mode 100644 index 428f5b7d45cd..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_availableprivateendpointtypes_client_test.go +++ /dev/null @@ -1,68 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/ze_generated_example_availableresourcegroupdelegations_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_availableresourcegroupdelegations_client_test.go deleted file mode 100644 index a6e637257ad7..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_availableresourcegroupdelegations_client_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/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/ze_generated_example_availableservicealiases_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_availableservicealiases_client_test.go deleted file mode 100644 index f8e489ee44a6..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_availableservicealiases_client_test.go +++ /dev/null @@ -1,68 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/ze_generated_example_azurefirewallfqdntags_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_azurefirewallfqdntags_client_test.go deleted file mode 100644 index 8b2970b388c4..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_azurefirewallfqdntags_client_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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/ze_generated_example_azurefirewalls_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_azurefirewalls_client_test.go deleted file mode 100644 index 66d0d086c7d3..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_azurefirewalls_client_test.go +++ /dev/null @@ -1,299 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-01/examples/AzureFirewallGet.json -func ExampleAzureFirewallsClient_Get() { - 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/2021-08-01/examples/AzureFirewallPut.json -func ExampleAzureFirewallsClient_BeginCreateOrUpdate() { - 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/2021-08-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/2021-08-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/2021-08-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 - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_bastionhosts_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_bastionhosts_client_test.go deleted file mode 100644 index d087beb80cd5..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_bastionhosts_client_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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_bgpservicecommunities_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_bgpservicecommunities_client_test.go deleted file mode 100644 index 5ec463a46908..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_bgpservicecommunities_client_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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/ze_generated_example_configurationpolicygroups_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_configurationpolicygroups_client_test.go deleted file mode 100644 index e4b3deeab463..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_configurationpolicygroups_client_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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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 -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_connectionmonitors_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_connectionmonitors_client_test.go deleted file mode 100644 index 07eeb47b0f7a..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_connectionmonitors_client_test.go +++ /dev/null @@ -1,258 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-01/examples/NetworkWatcherConnectionMonitorCreate.json -func ExampleConnectionMonitorsClient_BeginCreateOrUpdate() { - 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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_customipprefixes_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_customipprefixes_client_test.go deleted file mode 100644 index 361f973588b2..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_customipprefixes_client_test.go +++ /dev/null @@ -1,173 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_ddoscustompolicies_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_ddoscustompolicies_client_test.go deleted file mode 100644 index 41085df2c9ec..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_ddoscustompolicies_client_test.go +++ /dev/null @@ -1,127 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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"), - Properties: &armnetwork.DdosCustomPolicyPropertiesFormat{ - ProtocolCustomSettings: []*armnetwork.ProtocolCustomSettingsFormat{ - { - Protocol: to.Ptr(armnetwork.DdosCustomPolicyProtocolTCP), - }}, - }, - }, - 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/2021-08-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/ze_generated_example_ddosprotectionplans_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_ddosprotectionplans_client_test.go deleted file mode 100644 index 3db766097e13..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_ddosprotectionplans_client_test.go +++ /dev/null @@ -1,171 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_defaultsecurityrules_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_defaultsecurityrules_client_test.go deleted file mode 100644 index 007467a94f25..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_defaultsecurityrules_client_test.go +++ /dev/null @@ -1,66 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/ze_generated_example_dscpconfiguration_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_dscpconfiguration_client_test.go deleted file mode 100644 index 59b38238197f..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_dscpconfiguration_client_test.go +++ /dev/null @@ -1,199 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_expressroutecircuitauthorizations_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecircuitauthorizations_client_test.go deleted file mode 100644 index 804110f24365..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecircuitauthorizations_client_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/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_expressroutecircuitconnections_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecircuitconnections_client_test.go deleted file mode 100644 index c27cc7f534e0..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecircuitconnections_client_test.go +++ /dev/null @@ -1,138 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_expressroutecircuitpeerings_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecircuitpeerings_client_test.go deleted file mode 100644 index 8c5eacf06f31..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecircuitpeerings_client_test.go +++ /dev/null @@ -1,127 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_expressroutecircuits_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecircuits_client_test.go deleted file mode 100644 index 9f5a19b95489..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecircuits_client_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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-01/examples/ExpressRouteCircuitCreate.json -func ExampleExpressRouteCircuitsClient_BeginCreateOrUpdate() { - 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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_expressrouteconnections_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressrouteconnections_client_test.go deleted file mode 100644 index 388c772a7fcc..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressrouteconnections_client_test.go +++ /dev/null @@ -1,126 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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"), - }, - 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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_expressroutecrossconnectionpeerings_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecrossconnectionpeerings_client_test.go deleted file mode 100644 index 92b8704e94aa..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecrossconnectionpeerings_client_test.go +++ /dev/null @@ -1,131 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_expressroutecrossconnections_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecrossconnections_client_test.go deleted file mode 100644 index fae029d294e6..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecrossconnections_client_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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_expressroutegateways_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutegateways_client_test.go deleted file mode 100644 index e5dd246882e5..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutegateways_client_test.go +++ /dev/null @@ -1,176 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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{ - 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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_expressroutelinks_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutelinks_client_test.go deleted file mode 100644 index facd80ab93f1..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutelinks_client_test.go +++ /dev/null @@ -1,66 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/ze_generated_example_expressrouteportauthorizations_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressrouteportauthorizations_client_test.go deleted file mode 100644 index c2331ac6595c..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressrouteportauthorizations_client_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/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_expressrouteports_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressrouteports_client_test.go deleted file mode 100644 index 91a960bb1125..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressrouteports_client_test.go +++ /dev/null @@ -1,200 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-01/examples/ExpressRoutePortCreate.json -func ExampleExpressRoutePortsClient_BeginCreateOrUpdate() { - 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), - 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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_expressrouteportslocations_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressrouteportslocations_client_test.go deleted file mode 100644 index 60b3d91397e1..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressrouteportslocations_client_test.go +++ /dev/null @@ -1,62 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/ze_generated_example_expressrouteserviceproviders_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressrouteserviceproviders_client_test.go deleted file mode 100644 index 001b7c9f4ff3..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressrouteserviceproviders_client_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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/ze_generated_example_firewallpolicies_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_firewallpolicies_client_test.go deleted file mode 100644 index 4af3081fbf17..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_firewallpolicies_client_test.go +++ /dev/null @@ -1,255 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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")}, - }, - ExplicitProxySettings: &armnetwork.ExplicitProxySettings{ - EnableExplicitProxy: to.Ptr(true), - HTTPPort: to.Ptr[int32](8087), - HTTPSPort: to.Ptr[int32](8087), - PacFile: to.Ptr("https://tinawstorage.file.core.windows.net/?sv=2020-02-10&ss=bfqt&srt=sco&sp=rwdlacuptfx&se=2021-06-04T07:01:12Z&st=2021-06-03T23:01:12Z&sip=68.65.171.11&spr=https&sig=Plsa0RRVpGbY0IETZZOT6znOHcSro71LLTTbzquYPgs%3D"), - PacFilePort: to.Ptr[int32](8087), - }, - 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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_firewallpolicyidpssignatures_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_firewallpolicyidpssignatures_client_test.go deleted file mode 100644 index 91f1c5f11f67..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_firewallpolicyidpssignatures_client_test.go +++ /dev/null @@ -1,55 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/ze_generated_example_firewallpolicyidpssignaturesfiltervalues_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_firewallpolicyidpssignaturesfiltervalues_client_test.go deleted file mode 100644 index 0f2a2f0291e6..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_firewallpolicyidpssignaturesfiltervalues_client_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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/ze_generated_example_firewallpolicyidpssignaturesoverrides_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_firewallpolicyidpssignaturesoverrides_client_test.go deleted file mode 100644 index d55665780128..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_firewallpolicyidpssignaturesoverrides_client_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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_firewallpolicyrulecollectiongroups_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_firewallpolicyrulecollectiongroups_client_test.go deleted file mode 100644 index 2cbf0371d39d..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_firewallpolicyrulecollectiongroups_client_test.go +++ /dev/null @@ -1,150 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json -func ExampleFirewallPolicyRuleCollectionGroupsClient_Get() { - 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/2021-08-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json -func ExampleFirewallPolicyRuleCollectionGroupsClient_BeginCreateOrUpdate() { - 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/2021-08-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesList.json -func ExampleFirewallPolicyRuleCollectionGroupsClient_NewListPager() { - 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 - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_flowlogs_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_flowlogs_client_test.go deleted file mode 100644 index 05377c7a8730..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_flowlogs_client_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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_hubroutetables_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_hubroutetables_client_test.go deleted file mode 100644 index 2f321871b440..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_hubroutetables_client_test.go +++ /dev/null @@ -1,137 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_hubvirtualnetworkconnections_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_hubvirtualnetworkconnections_client_test.go deleted file mode 100644 index 477c9bdaa805..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_hubvirtualnetworkconnections_client_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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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"), - }, - 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"), - }}, - }, - }, - }, - }, - 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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_inboundnatrules_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_inboundnatrules_client_test.go deleted file mode 100644 index 93259840d61f..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_inboundnatrules_client_test.go +++ /dev/null @@ -1,132 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_inboundsecurityrule_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_inboundsecurityrule_client_test.go deleted file mode 100644 index f955144571ac..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_inboundsecurityrule_client_test.go +++ /dev/null @@ -1,55 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/ze_generated_example_ipallocations_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_ipallocations_client_test.go deleted file mode 100644 index 07e03807fea6..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_ipallocations_client_test.go +++ /dev/null @@ -1,177 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_ipgroups_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_ipgroups_client_test.go deleted file mode 100644 index df02f959157f..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_ipgroups_client_test.go +++ /dev/null @@ -1,179 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_loadbalancerbackendaddresspools_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancerbackendaddresspools_client_test.go deleted file mode 100644 index a9e0299ffcfa..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancerbackendaddresspools_client_test.go +++ /dev/null @@ -1,142 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-01/examples/LBBackendAddressPoolListWithBackendAddressesPoolType.json -func ExampleLoadBalancerBackendAddressPoolsClient_NewListPager() { - 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/2021-08-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json -func ExampleLoadBalancerBackendAddressPoolsClient_Get() { - 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/2021-08-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/2021-08-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/ze_generated_example_loadbalancerfrontendipconfigurations_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancerfrontendipconfigurations_client_test.go deleted file mode 100644 index c6c007c34b9d..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancerfrontendipconfigurations_client_test.go +++ /dev/null @@ -1,66 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/ze_generated_example_loadbalancerloadbalancingrules_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancerloadbalancingrules_client_test.go deleted file mode 100644 index 85037c791466..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancerloadbalancingrules_client_test.go +++ /dev/null @@ -1,66 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/ze_generated_example_loadbalancernetworkinterfaces_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancernetworkinterfaces_client_test.go deleted file mode 100644 index 8fcb90a3e629..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancernetworkinterfaces_client_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/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-01/examples/LoadBalancerNetworkInterfaceListSimple.json -func ExampleLoadBalancerNetworkInterfacesClient_NewListPager() { - 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/ze_generated_example_loadbalanceroutboundrules_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalanceroutboundrules_client_test.go deleted file mode 100644 index f2784f457f26..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalanceroutboundrules_client_test.go +++ /dev/null @@ -1,66 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/ze_generated_example_loadbalancerprobes_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancerprobes_client_test.go deleted file mode 100644 index 4746680f5272..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancerprobes_client_test.go +++ /dev/null @@ -1,66 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/ze_generated_example_loadbalancers_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancers_client_test.go deleted file mode 100644 index e8f1694d8eb8..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancers_client_test.go +++ /dev/null @@ -1,265 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-01/examples/LoadBalancerGet.json -func ExampleLoadBalancersClient_Get() { - 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/2021-08-01/examples/LoadBalancerCreate.json -func ExampleLoadBalancersClient_BeginCreateOrUpdate() { - 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), - 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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_localnetworkgateways_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_localnetworkgateways_client_test.go deleted file mode 100644 index 3438c257c34e..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_localnetworkgateways_client_test.go +++ /dev/null @@ -1,154 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_natgateways_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_natgateways_client_test.go deleted file mode 100644 index 2772a6a4257d..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_natgateways_client_test.go +++ /dev/null @@ -1,183 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_natrules_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_natrules_client_test.go deleted file mode 100644 index 06a65a3f55ee..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_natrules_client_test.go +++ /dev/null @@ -1,108 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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) - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkinterfaceipconfigurations_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkinterfaceipconfigurations_client_test.go deleted file mode 100644 index be1c6c76688c..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkinterfaceipconfigurations_client_test.go +++ /dev/null @@ -1,66 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/ze_generated_example_networkinterfaceloadbalancers_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkinterfaceloadbalancers_client_test.go deleted file mode 100644 index 442acb3a37c9..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkinterfaceloadbalancers_client_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/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/ze_generated_example_networkinterfaces_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkinterfaces_client_test.go deleted file mode 100644 index dc511bf46915..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkinterfaces_client_test.go +++ /dev/null @@ -1,391 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-01/examples/NetworkInterfaceCreate.json -func ExampleInterfacesClient_BeginCreateOrUpdate() { - 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{ - 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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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 -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkinterfacetapconfigurations_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkinterfacetapconfigurations_client_test.go deleted file mode 100644 index c08ffafdcf24..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkinterfacetapconfigurations_client_test.go +++ /dev/null @@ -1,126 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_networkmanagementclient_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkmanagementclient_client_test.go deleted file mode 100644 index c2a62f30784e..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkmanagementclient_client_test.go +++ /dev/null @@ -1,254 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_networkprofiles_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkprofiles_client_test.go deleted file mode 100644 index 05202f8d389c..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkprofiles_client_test.go +++ /dev/null @@ -1,183 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-01/examples/NetworkProfileGetConfigOnly.json -func ExampleProfilesClient_Get() { - 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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_networksecuritygroups_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_networksecuritygroups_client_test.go deleted file mode 100644 index fc0368eae613..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_networksecuritygroups_client_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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-01/examples/NetworkSecurityGroupCreate.json -func ExampleSecurityGroupsClient_BeginCreateOrUpdate() { - 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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_networkvirtualappliances_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkvirtualappliances_client_test.go deleted file mode 100644 index d5c8deed1bf9..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkvirtualappliances_client_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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-01/examples/NetworkVirtualAppliancePut.json -func ExampleVirtualAppliancesClient_BeginCreateOrUpdate() { - 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/2021-08-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/2021-08-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/ze_generated_example_networkwatchers_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkwatchers_client_test.go deleted file mode 100644 index 25a324f9d6b5..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkwatchers_client_test.go +++ /dev/null @@ -1,558 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_operations_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_operations_client_test.go deleted file mode 100644 index 3f169a7580bb..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_operations_client_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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/ze_generated_example_p2svpngateways_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_p2svpngateways_client_test.go deleted file mode 100644 index 59eec7c9b177..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_p2svpngateways_client_test.go +++ /dev/null @@ -1,250 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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 -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_packetcaptures_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_packetcaptures_client_test.go deleted file mode 100644 index fed44dd6dcdb..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_packetcaptures_client_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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_peerexpressroutecircuitconnections_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_peerexpressroutecircuitconnections_client_test.go deleted file mode 100644 index e2c5d25e9735..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_peerexpressroutecircuitconnections_client_test.go +++ /dev/null @@ -1,68 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/ze_generated_example_privatednszonegroups_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_privatednszonegroups_client_test.go deleted file mode 100644 index 30e857f2ac8e..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_privatednszonegroups_client_test.go +++ /dev/null @@ -1,129 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_privateendpoints_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_privateendpoints_client_test.go deleted file mode 100644 index 7201526c509d..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_privateendpoints_client_test.go +++ /dev/null @@ -1,166 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-01/examples/PrivateEndpointGet.json -func ExamplePrivateEndpointsClient_Get() { - 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/2021-08-01/examples/PrivateEndpointCreate.json -func ExamplePrivateEndpointsClient_BeginCreateOrUpdate() { - 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/2021-08-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/2021-08-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/ze_generated_example_privatelinkservices_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_privatelinkservices_client_test.go deleted file mode 100644 index f07b76bd8a78..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_privatelinkservices_client_test.go +++ /dev/null @@ -1,392 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_publicipaddresses_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_publicipaddresses_client_test.go deleted file mode 100644 index 08dcc22d6319..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_publicipaddresses_client_test.go +++ /dev/null @@ -1,337 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-01/examples/PublicIpAddressCreateDns.json -func ExamplePublicIPAddressesClient_BeginCreateOrUpdate() { - 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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_publicipprefixes_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_publicipprefixes_client_test.go deleted file mode 100644 index 559e4b4cae5f..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_publicipprefixes_client_test.go +++ /dev/null @@ -1,178 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-01/examples/PublicIpPrefixCreateCustomizedValues.json -func ExamplePublicIPPrefixesClient_BeginCreateOrUpdate() { - 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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_resourcenavigationlinks_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_resourcenavigationlinks_client_test.go deleted file mode 100644 index 839bec70363f..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_resourcenavigationlinks_client_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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/ze_generated_example_routefilterrules_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_routefilterrules_client_test.go deleted file mode 100644 index c30a641d57c2..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_routefilterrules_client_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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_routefilters_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_routefilters_client_test.go deleted file mode 100644 index 787b31e22617..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_routefilters_client_test.go +++ /dev/null @@ -1,185 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_routes_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_routes_client_test.go deleted file mode 100644 index 34dc55eb9428..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_routes_client_test.go +++ /dev/null @@ -1,125 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_routetables_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_routetables_client_test.go deleted file mode 100644 index d63aaf1f3605..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_routetables_client_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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-01/examples/RouteTableCreate.json -func ExampleRouteTablesClient_BeginCreateOrUpdate() { - 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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_routingintent_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_routingintent_client_test.go deleted file mode 100644 index cfc88b95b2a7..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_routingintent_client_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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_securitypartnerproviders_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_securitypartnerproviders_client_test.go deleted file mode 100644 index a02d52e4e051..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_securitypartnerproviders_client_test.go +++ /dev/null @@ -1,179 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_securityrules_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_securityrules_client_test.go deleted file mode 100644 index 8899e1675101..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_securityrules_client_test.go +++ /dev/null @@ -1,131 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_serviceassociationlinks_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_serviceassociationlinks_client_test.go deleted file mode 100644 index 473cf0a56c0b..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_serviceassociationlinks_client_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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/ze_generated_example_serviceendpointpolicies_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_serviceendpointpolicies_client_test.go deleted file mode 100644 index 58651180c0ca..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_serviceendpointpolicies_client_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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-01/examples/ServiceEndpointPolicyCreate.json -func ExampleServiceEndpointPoliciesClient_BeginCreateOrUpdate() { - 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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_serviceendpointpolicydefinitions_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_serviceendpointpolicydefinitions_client_test.go deleted file mode 100644 index 611b75a0418d..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_serviceendpointpolicydefinitions_client_test.go +++ /dev/null @@ -1,129 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_servicetaginformation_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_servicetaginformation_client_test.go deleted file mode 100644 index 279457c231d8..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_servicetaginformation_client_test.go +++ /dev/null @@ -1,44 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-01/examples/ServiceTagInformationListResult.json -func ExampleServiceTagInformationClient_NewListPager() { - 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 - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_servicetags_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_servicetags_client_test.go deleted file mode 100644 index 7c5f5cab9c4c..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_servicetags_client_test.go +++ /dev/null @@ -1,38 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/ze_generated_example_subnets_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_subnets_client_test.go deleted file mode 100644 index 0ffe5157dcf9..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_subnets_client_test.go +++ /dev/null @@ -1,180 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-01/examples/SubnetGet.json -func ExampleSubnetsClient_Get() { - 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/2021-08-01/examples/SubnetCreate.json -func ExampleSubnetsClient_BeginCreateOrUpdate() { - 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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_usages_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_usages_client_test.go deleted file mode 100644 index 149525b8a4a0..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_usages_client_test.go +++ /dev/null @@ -1,42 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-01/examples/UsageList.json -func ExampleUsagesClient_NewListPager() { - 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 - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualappliancesites_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualappliancesites_client_test.go deleted file mode 100644 index 8bee1ea8b6d0..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualappliancesites_client_test.go +++ /dev/null @@ -1,131 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_virtualapplianceskus_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualapplianceskus_client_test.go deleted file mode 100644 index 55711c924a5a..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualapplianceskus_client_test.go +++ /dev/null @@ -1,62 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/ze_generated_example_virtualhubbgpconnection_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualhubbgpconnection_client_test.go deleted file mode 100644 index da90cde60475..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualhubbgpconnection_client_test.go +++ /dev/null @@ -1,102 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_virtualhubbgpconnections_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualhubbgpconnections_client_test.go deleted file mode 100644 index a19bb7af1578..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualhubbgpconnections_client_test.go +++ /dev/null @@ -1,97 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_virtualhubipconfiguration_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualhubipconfiguration_client_test.go deleted file mode 100644 index 98bb0a5673e8..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualhubipconfiguration_client_test.go +++ /dev/null @@ -1,126 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_virtualhubroutetablev2s_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualhubroutetablev2s_client_test.go deleted file mode 100644 index 733b1048ac3d..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualhubroutetablev2s_client_test.go +++ /dev/null @@ -1,143 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_virtualhubs_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualhubs_client_test.go deleted file mode 100644 index 83b8e080d653..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualhubs_client_test.go +++ /dev/null @@ -1,208 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-01/examples/EffectiveRoutesListForConnection.json -func ExampleVirtualHubsClient_BeginGetEffectiveVirtualHubRoutes() { - 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) - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworkgatewayconnections_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworkgatewayconnections_client_test.go deleted file mode 100644 index 09edfba0a8d1..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworkgatewayconnections_client_test.go +++ /dev/null @@ -1,413 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-01/examples/VirtualNetworkGatewayConnectionStartPacketCaptureFilterData.json -func ExampleVirtualNetworkGatewayConnectionsClient_BeginStartPacketCapture() { - 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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_virtualnetworkgatewaynatrules_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworkgatewaynatrules_client_test.go deleted file mode 100644 index 850826f37878..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworkgatewaynatrules_client_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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_virtualnetworkgateways_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworkgateways_client_test.go deleted file mode 100644 index 05546587eae1..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworkgateways_client_test.go +++ /dev/null @@ -1,474 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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), - 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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-01/examples/VirtualNetworkGatewayStartPacketCaptureFilterData.json -func ExampleVirtualNetworkGatewaysClient_BeginStartPacketCapture() { - 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/2021-08-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/2021-08-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 -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworkpeerings_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworkpeerings_client_test.go deleted file mode 100644 index 6c822a76395c..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworkpeerings_client_test.go +++ /dev/null @@ -1,130 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-01/examples/VirtualNetworkPeeringGet.json -func ExampleVirtualNetworkPeeringsClient_Get() { - 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/2021-08-01/examples/VirtualNetworkPeeringCreate.json -func ExampleVirtualNetworkPeeringsClient_BeginCreateOrUpdate() { - 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/2021-08-01/examples/VirtualNetworkPeeringList.json -func ExampleVirtualNetworkPeeringsClient_NewListPager() { - 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/ze_generated_example_virtualnetworks_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworks_client_test.go deleted file mode 100644 index 89001114ade1..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworks_client_test.go +++ /dev/null @@ -1,226 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-01/examples/VirtualNetworkGet.json -func ExampleVirtualNetworksClient_Get() { - 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/2021-08-01/examples/VirtualNetworkCreate.json -func ExampleVirtualNetworksClient_BeginCreateOrUpdate() { - 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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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 - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworktaps_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworktaps_client_test.go deleted file mode 100644 index f1ee86b36478..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworktaps_client_test.go +++ /dev/null @@ -1,175 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_virtualrouterpeerings_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualrouterpeerings_client_test.go deleted file mode 100644 index 8af3767a1b25..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualrouterpeerings_client_test.go +++ /dev/null @@ -1,125 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_virtualrouters_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualrouters_client_test.go deleted file mode 100644 index 8cf0a0b14af7..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualrouters_client_test.go +++ /dev/null @@ -1,150 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_virtualwans_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualwans_client_test.go deleted file mode 100644 index 546ac0284097..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualwans_client_test.go +++ /dev/null @@ -1,177 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_vpnconnections_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnconnections_client_test.go deleted file mode 100644 index 351db70ec257..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnconnections_client_test.go +++ /dev/null @@ -1,181 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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"), - }, - 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/2021-08-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/2021-08-01/examples/VpnConnectionStartPacketCaptureFilterData.json -func ExampleVPNConnectionsClient_BeginStartPacketCapture() { - 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/2021-08-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 -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpngateways_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpngateways_client_test.go deleted file mode 100644 index 82ea7e6a0bda..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpngateways_client_test.go +++ /dev/null @@ -1,325 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-01/examples/VpnGatewayStartPacketCaptureFilterData.json -func ExampleVPNGatewaysClient_BeginStartPacketCapture() { - 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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_vpnlinkconnections_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnlinkconnections_client_test.go deleted file mode 100644 index f7798dd07271..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnlinkconnections_client_test.go +++ /dev/null @@ -1,71 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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 -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnserverconfigurations_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnserverconfigurations_client_test.go deleted file mode 100644 index 4a93267ffbaf..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnserverconfigurations_client_test.go +++ /dev/null @@ -1,243 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_vpnserverconfigurationsassociatedwithvirtualwan_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnserverconfigurationsassociatedwithvirtualwan_client_test.go deleted file mode 100644 index 8f4a3af91c19..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnserverconfigurationsassociatedwithvirtualwan_client_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/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/ze_generated_example_vpnsitelinkconnections_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnsitelinkconnections_client_test.go deleted file mode 100644 index 08f89c844a05..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnsitelinkconnections_client_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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/ze_generated_example_vpnsitelinks_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnsitelinks_client_test.go deleted file mode 100644 index 1f42dd683808..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnsitelinks_client_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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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 -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnsites_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnsites_client_test.go deleted file mode 100644 index afeef134881f..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnsites_client_test.go +++ /dev/null @@ -1,206 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/2021-08-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/ze_generated_example_vpnsitesconfiguration_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnsitesconfiguration_client_test.go deleted file mode 100644 index 36442c09513b..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnsitesconfiguration_client_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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/ze_generated_example_webapplicationfirewallpolicies_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_webapplicationfirewallpolicies_client_test.go deleted file mode 100644 index d8b6802915f1..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_webapplicationfirewallpolicies_client_test.go +++ /dev/null @@ -1,234 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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/2021-08-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/2021-08-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{ - { - 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/2021-08-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/ze_generated_example_webcategories_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_webcategories_client_test.go deleted file mode 100644 index 42d4db338430..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_webcategories_client_test.go +++ /dev/null @@ -1,62 +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" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager/Microsoft.Network/stable/2021-08-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/2021-08-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 - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_applicationgatewayprivateendpointconnections_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_applicationgatewayprivateendpointconnections_client.go index e4186f3f1f6f..8a511bff0564 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_applicationgatewayprivateendpointconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_applicationgatewayprivateendpointconnections_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -119,7 +119,7 @@ func (client *ApplicationGatewayPrivateEndpointConnectionsClient) deleteCreateRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -127,7 +127,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -172,7 +172,7 @@ func (client *ApplicationGatewayPrivateEndpointConnectionsClient) getCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -189,7 +189,7 @@ func (client *ApplicationGatewayPrivateEndpointConnectionsClient) getHandleRespo // NewListPager - Lists all private endpoint connections on an application gateway. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -242,7 +242,7 @@ func (client *ApplicationGatewayPrivateEndpointConnectionsClient) listCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -259,7 +259,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -282,7 +282,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -322,7 +322,7 @@ func (client *ApplicationGatewayPrivateEndpointConnectionsClient) updateCreateRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_applicationgatewayprivatelinkresources_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_applicationgatewayprivatelinkresources_client.go index 516be0222072..57025bb911b2 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_applicationgatewayprivatelinkresources_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_applicationgatewayprivatelinkresources_client.go @@ -57,7 +57,7 @@ func NewApplicationGatewayPrivateLinkResourcesClient(subscriptionID string, cred // NewListPager - Lists all private link resources on an application gateway. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -110,7 +110,7 @@ func (client *ApplicationGatewayPrivateLinkResourcesClient) listCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_applicationgateways_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_applicationgateways_client.go index 6eb3ba11b032..0646f55fc93c 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_applicationgateways_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_applicationgateways_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -78,7 +78,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -114,7 +114,7 @@ func (client *ApplicationGatewaysClient) backendHealthCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -126,7 +126,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // applicationGatewayName - The name of the application gateway. // probeRequest - Request body for on-demand test probe operation. @@ -149,7 +149,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -185,7 +185,7 @@ func (client *ApplicationGatewaysClient) backendHealthOnDemandCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -196,7 +196,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -218,7 +218,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -254,7 +254,7 @@ func (client *ApplicationGatewaysClient) createOrUpdateCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -262,7 +262,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -283,7 +283,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -319,7 +319,7 @@ func (client *ApplicationGatewaysClient) deleteCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -327,7 +327,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -366,7 +366,7 @@ func (client *ApplicationGatewaysClient) getCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -383,7 +383,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // predefinedPolicyName - Name of Ssl predefined policy. // options - ApplicationGatewaysClientGetSSLPredefinedPolicyOptions contains the optional parameters for the ApplicationGatewaysClient.GetSSLPredefinedPolicy // method. @@ -418,7 +418,7 @@ func (client *ApplicationGatewaysClient) getSSLPredefinedPolicyCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -435,7 +435,7 @@ func (client *ApplicationGatewaysClient) getSSLPredefinedPolicyHandleResponse(re // NewListPager - Lists all application gateways in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - ApplicationGatewaysClientListOptions contains the optional parameters for the ApplicationGatewaysClient.List // method. @@ -483,7 +483,7 @@ func (client *ApplicationGatewaysClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -500,7 +500,7 @@ func (client *ApplicationGatewaysClient) listHandleResponse(resp *http.Response) // NewListAllPager - Gets all the application gateways in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - ApplicationGatewaysClientListAllOptions contains the optional parameters for the ApplicationGatewaysClient.ListAll // method. func (client *ApplicationGatewaysClient) NewListAllPager(options *ApplicationGatewaysClientListAllOptions) *runtime.Pager[ApplicationGatewaysClientListAllResponse] { @@ -543,7 +543,7 @@ func (client *ApplicationGatewaysClient) listAllCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -560,7 +560,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // options - ApplicationGatewaysClientListAvailableRequestHeadersOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableRequestHeaders // method. func (client *ApplicationGatewaysClient) ListAvailableRequestHeaders(ctx context.Context, options *ApplicationGatewaysClientListAvailableRequestHeadersOptions) (ApplicationGatewaysClientListAvailableRequestHeadersResponse, error) { @@ -590,7 +590,7 @@ func (client *ApplicationGatewaysClient) listAvailableRequestHeadersCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -607,7 +607,7 @@ func (client *ApplicationGatewaysClient) listAvailableRequestHeadersHandleRespon // ListAvailableResponseHeaders - Lists all available response headers. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - ApplicationGatewaysClientListAvailableResponseHeadersOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableResponseHeaders // method. func (client *ApplicationGatewaysClient) ListAvailableResponseHeaders(ctx context.Context, options *ApplicationGatewaysClientListAvailableResponseHeadersOptions) (ApplicationGatewaysClientListAvailableResponseHeadersResponse, error) { @@ -637,7 +637,7 @@ func (client *ApplicationGatewaysClient) listAvailableResponseHeadersCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -654,7 +654,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // options - ApplicationGatewaysClientListAvailableSSLOptionsOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableSSLOptions // method. func (client *ApplicationGatewaysClient) ListAvailableSSLOptions(ctx context.Context, options *ApplicationGatewaysClientListAvailableSSLOptionsOptions) (ApplicationGatewaysClientListAvailableSSLOptionsResponse, error) { @@ -684,7 +684,7 @@ func (client *ApplicationGatewaysClient) listAvailableSSLOptionsCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -701,7 +701,7 @@ func (client *ApplicationGatewaysClient) listAvailableSSLOptionsHandleResponse(r // NewListAvailableSSLPredefinedPoliciesPager - Lists all SSL predefined policies for configuring Ssl policy. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableSSLPredefinedPolicies // method. func (client *ApplicationGatewaysClient) NewListAvailableSSLPredefinedPoliciesPager(options *ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesOptions) *runtime.Pager[ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse] { @@ -744,7 +744,7 @@ func (client *ApplicationGatewaysClient) listAvailableSSLPredefinedPoliciesCreat return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -761,7 +761,7 @@ func (client *ApplicationGatewaysClient) listAvailableSSLPredefinedPoliciesHandl // ListAvailableServerVariables - Lists all available server variables. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - ApplicationGatewaysClientListAvailableServerVariablesOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableServerVariables // method. func (client *ApplicationGatewaysClient) ListAvailableServerVariables(ctx context.Context, options *ApplicationGatewaysClientListAvailableServerVariablesOptions) (ApplicationGatewaysClientListAvailableServerVariablesResponse, error) { @@ -791,7 +791,7 @@ func (client *ApplicationGatewaysClient) listAvailableServerVariablesCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -808,7 +808,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // options - ApplicationGatewaysClientListAvailableWafRuleSetsOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableWafRuleSets // method. func (client *ApplicationGatewaysClient) ListAvailableWafRuleSets(ctx context.Context, options *ApplicationGatewaysClientListAvailableWafRuleSetsOptions) (ApplicationGatewaysClientListAvailableWafRuleSetsResponse, error) { @@ -838,7 +838,7 @@ func (client *ApplicationGatewaysClient) listAvailableWafRuleSetsCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -855,7 +855,7 @@ func (client *ApplicationGatewaysClient) listAvailableWafRuleSetsHandleResponse( // BeginStart - Starts the specified application gateway. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -876,7 +876,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -912,7 +912,7 @@ func (client *ApplicationGatewaysClient) startCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -920,7 +920,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -941,7 +941,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -977,7 +977,7 @@ func (client *ApplicationGatewaysClient) stopCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -985,7 +985,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // applicationGatewayName - The name of the application gateway. // parameters - Parameters supplied to update application gateway tags. @@ -1026,7 +1026,7 @@ func (client *ApplicationGatewaysClient) updateTagsCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_applicationsecuritygroups_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_applicationsecuritygroups_client.go index 639d0eb6a7b3..5ff73bb3ae9e 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_applicationsecuritygroups_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_applicationsecuritygroups_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *ApplicationSecurityGroupsClient) createOrUpdateCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -144,7 +144,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -180,7 +180,7 @@ func (client *ApplicationSecurityGroupsClient) deleteCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -228,7 +228,7 @@ func (client *ApplicationSecurityGroupsClient) getCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -245,7 +245,7 @@ func (client *ApplicationSecurityGroupsClient) getHandleResponse(resp *http.Resp // NewListPager - Gets all the application security groups in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - ApplicationSecurityGroupsClientListOptions contains the optional parameters for the ApplicationSecurityGroupsClient.List // method. @@ -293,7 +293,7 @@ func (client *ApplicationSecurityGroupsClient) listCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -310,7 +310,7 @@ func (client *ApplicationSecurityGroupsClient) listHandleResponse(resp *http.Res // NewListAllPager - Gets all application security groups in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - ApplicationSecurityGroupsClientListAllOptions contains the optional parameters for the ApplicationSecurityGroupsClient.ListAll // method. func (client *ApplicationSecurityGroupsClient) NewListAllPager(options *ApplicationSecurityGroupsClientListAllOptions) *runtime.Pager[ApplicationSecurityGroupsClientListAllResponse] { @@ -353,7 +353,7 @@ func (client *ApplicationSecurityGroupsClient) listAllCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -370,7 +370,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -411,7 +411,7 @@ func (client *ApplicationSecurityGroupsClient) updateTagsCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_availabledelegations_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_availabledelegations_client.go index 4516478c342c..66bec8b39366 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_availabledelegations_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_availabledelegations_client.go @@ -57,7 +57,7 @@ func NewAvailableDelegationsClient(subscriptionID string, credential azcore.Toke // NewListPager - Gets all of the available subnet delegations for this subscription in this region. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // location - The location of the subnet. // options - AvailableDelegationsClientListOptions contains the optional parameters for the AvailableDelegationsClient.List // method. @@ -105,7 +105,7 @@ func (client *AvailableDelegationsClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_availableendpointservices_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_availableendpointservices_client.go index c8b580734da7..8cd704e1846a 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_availableendpointservices_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_availableendpointservices_client.go @@ -57,7 +57,7 @@ func NewAvailableEndpointServicesClient(subscriptionID string, credential azcore // NewListPager - List what values of endpoint services are available for use. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // location - The location to check available endpoint services. // options - AvailableEndpointServicesClientListOptions contains the optional parameters for the AvailableEndpointServicesClient.List // method. @@ -105,7 +105,7 @@ func (client *AvailableEndpointServicesClient) listCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_availableprivateendpointtypes_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_availableprivateendpointtypes_client.go index a6d74b85305c..35d22c41b661 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_availableprivateendpointtypes_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_availableprivateendpointtypes_client.go @@ -58,7 +58,7 @@ 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. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // location - The location of the domain name. // options - AvailablePrivateEndpointTypesClientListOptions contains the optional parameters for the AvailablePrivateEndpointTypesClient.List // method. @@ -106,7 +106,7 @@ func (client *AvailablePrivateEndpointTypesClient) listCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -124,7 +124,7 @@ 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. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -177,7 +177,7 @@ func (client *AvailablePrivateEndpointTypesClient) listByResourceGroupCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_availableresourcegroupdelegations_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_availableresourcegroupdelegations_client.go index 98db65fc0318..25b501ed0c3d 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_availableresourcegroupdelegations_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_availableresourcegroupdelegations_client.go @@ -57,7 +57,7 @@ func NewAvailableResourceGroupDelegationsClient(subscriptionID string, credentia // NewListPager - Gets all of the available subnet delegations for this resource group in this region. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -110,7 +110,7 @@ func (client *AvailableResourceGroupDelegationsClient) listCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_availableservicealiases_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_availableservicealiases_client.go index 17621cf68152..c30a065e1f65 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_availableservicealiases_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_availableservicealiases_client.go @@ -57,7 +57,7 @@ func NewAvailableServiceAliasesClient(subscriptionID string, credential azcore.T // NewListPager - Gets all available service aliases for this subscription in this region. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // location - The location. // options - AvailableServiceAliasesClientListOptions contains the optional parameters for the AvailableServiceAliasesClient.List // method. @@ -105,7 +105,7 @@ func (client *AvailableServiceAliasesClient) listCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -122,7 +122,7 @@ func (client *AvailableServiceAliasesClient) listHandleResponse(resp *http.Respo // NewListByResourceGroupPager - Gets all available service aliases for this resource group in this region. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // location - The location. // options - AvailableServiceAliasesClientListByResourceGroupOptions contains the optional parameters for the AvailableServiceAliasesClient.ListByResourceGroup @@ -175,7 +175,7 @@ func (client *AvailableServiceAliasesClient) listByResourceGroupCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_azurefirewallfqdntags_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_azurefirewallfqdntags_client.go index ebbd858d93c3..9edd4220c2cf 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_azurefirewallfqdntags_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_azurefirewallfqdntags_client.go @@ -57,7 +57,7 @@ func NewAzureFirewallFqdnTagsClient(subscriptionID string, credential azcore.Tok // NewListAllPager - Gets all the Azure Firewall FQDN Tags in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - AzureFirewallFqdnTagsClientListAllOptions contains the optional parameters for the AzureFirewallFqdnTagsClient.ListAll // method. func (client *AzureFirewallFqdnTagsClient) NewListAllPager(options *AzureFirewallFqdnTagsClientListAllOptions) *runtime.Pager[AzureFirewallFqdnTagsClientListAllResponse] { @@ -100,7 +100,7 @@ func (client *AzureFirewallFqdnTagsClient) listAllCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_azurefirewalls_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_azurefirewalls_client.go index 1c5acb35c330..4257474f9458 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_azurefirewalls_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_azurefirewalls_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *AzureFirewallsClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -144,7 +144,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -180,7 +180,7 @@ func (client *AzureFirewallsClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -227,7 +227,7 @@ func (client *AzureFirewallsClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -244,7 +244,7 @@ func (client *AzureFirewallsClient) getHandleResponse(resp *http.Response) (Azur // NewListPager - Lists all Azure Firewalls in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - AzureFirewallsClientListOptions contains the optional parameters for the AzureFirewallsClient.List method. func (client *AzureFirewallsClient) NewListPager(resourceGroupName string, options *AzureFirewallsClientListOptions) *runtime.Pager[AzureFirewallsClientListResponse] { @@ -291,7 +291,7 @@ func (client *AzureFirewallsClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -308,7 +308,7 @@ func (client *AzureFirewallsClient) listHandleResponse(resp *http.Response) (Azu // NewListAllPager - Gets all the Azure Firewalls in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - AzureFirewallsClientListAllOptions contains the optional parameters for the AzureFirewallsClient.ListAll method. func (client *AzureFirewallsClient) NewListAllPager(options *AzureFirewallsClientListAllOptions) *runtime.Pager[AzureFirewallsClientListAllResponse] { return runtime.NewPager(runtime.PagingHandler[AzureFirewallsClientListAllResponse]{ @@ -350,7 +350,7 @@ func (client *AzureFirewallsClient) listAllCreateRequest(ctx context.Context, op return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -367,7 +367,7 @@ func (client *AzureFirewallsClient) listAllHandleResponse(resp *http.Response) ( // BeginUpdateTags - Updates tags of an Azure Firewall resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // azureFirewallName - The name of the Azure Firewall. // parameters - Parameters supplied to update azure firewall tags. @@ -389,7 +389,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -425,7 +425,7 @@ func (client *AzureFirewallsClient) updateTagsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_bastionhosts_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_bastionhosts_client.go index 11d0bf37e603..7681fa581e2b 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_bastionhosts_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_bastionhosts_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *BastionHostsClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -144,7 +144,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -180,7 +180,7 @@ func (client *BastionHostsClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -227,7 +227,7 @@ func (client *BastionHostsClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -244,7 +244,7 @@ func (client *BastionHostsClient) getHandleResponse(resp *http.Response) (Bastio // NewListPager - Lists all Bastion Hosts in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - BastionHostsClientListOptions contains the optional parameters for the BastionHostsClient.List method. func (client *BastionHostsClient) NewListPager(options *BastionHostsClientListOptions) *runtime.Pager[BastionHostsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[BastionHostsClientListResponse]{ @@ -286,7 +286,7 @@ func (client *BastionHostsClient) listCreateRequest(ctx context.Context, options return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -303,7 +303,7 @@ func (client *BastionHostsClient) listHandleResponse(resp *http.Response) (Basti // NewListByResourceGroupPager - Lists all Bastion Hosts in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - BastionHostsClientListByResourceGroupOptions contains the optional parameters for the BastionHostsClient.ListByResourceGroup // method. @@ -351,7 +351,7 @@ func (client *BastionHostsClient) listByResourceGroupCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -368,7 +368,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // bastionHostName - The name of the Bastion Host. // parameters - Parameters supplied to update BastionHost tags. @@ -390,7 +390,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -426,7 +426,7 @@ func (client *BastionHostsClient) updateTagsCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_bgpservicecommunities_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_bgpservicecommunities_client.go index e761cfa4ec42..81576a3047a8 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_bgpservicecommunities_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_bgpservicecommunities_client.go @@ -57,7 +57,7 @@ func NewBgpServiceCommunitiesClient(subscriptionID string, credential azcore.Tok // NewListPager - Gets all the available bgp service communities. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - BgpServiceCommunitiesClientListOptions contains the optional parameters for the BgpServiceCommunitiesClient.List // method. func (client *BgpServiceCommunitiesClient) NewListPager(options *BgpServiceCommunitiesClientListOptions) *runtime.Pager[BgpServiceCommunitiesClientListResponse] { @@ -100,7 +100,7 @@ func (client *BgpServiceCommunitiesClient) listCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_configurationpolicygroups_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_configurationpolicygroups_client.go index 56d0cb6cb609..66e5b174b66f 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_configurationpolicygroups_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_configurationpolicygroups_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the ConfigurationPolicyGroup. // vpnServerConfigurationName - The name of the VpnServerConfiguration. // configurationPolicyGroupName - The name of the ConfigurationPolicyGroup. @@ -80,7 +80,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -120,7 +120,7 @@ func (client *ConfigurationPolicyGroupsClient) createOrUpdateCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, vpnServerConfigurationPolicyGroupParameters) @@ -128,7 +128,7 @@ func (client *ConfigurationPolicyGroupsClient) createOrUpdateCreateRequest(ctx c // BeginDelete - Deletes a ConfigurationPolicyGroup. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the ConfigurationPolicyGroup. // vpnServerConfigurationName - The name of the VpnServerConfiguration. // configurationPolicyGroupName - The name of the ConfigurationPolicyGroup. @@ -150,7 +150,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -190,7 +190,7 @@ func (client *ConfigurationPolicyGroupsClient) deleteCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -198,7 +198,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the VpnServerConfiguration. // vpnServerConfigurationName - The name of the VpnServerConfiguration. // configurationPolicyGroupName - The name of the ConfigurationPolicyGroup being retrieved. @@ -243,7 +243,7 @@ func (client *ConfigurationPolicyGroupsClient) getCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -260,7 +260,7 @@ func (client *ConfigurationPolicyGroupsClient) getHandleResponse(resp *http.Resp // NewListByVPNServerConfigurationPager - Lists all the configurationPolicyGroups in a resource group for a vpnServerConfiguration. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -313,7 +313,7 @@ func (client *ConfigurationPolicyGroupsClient) listByVPNServerConfigurationCreat return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_connectionmonitors_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_connectionmonitors_client.go index 023d2f3419ed..9466c0b030ff 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_connectionmonitors_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_connectionmonitors_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -80,7 +80,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -120,7 +120,7 @@ func (client *ConnectionMonitorsClient) createOrUpdateCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") if options != nil && options.Migrate != nil { reqQP.Set("migrate", *options.Migrate) } @@ -131,7 +131,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -153,7 +153,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -193,7 +193,7 @@ func (client *ConnectionMonitorsClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -201,7 +201,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -245,7 +245,7 @@ func (client *ConnectionMonitorsClient) getCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -262,7 +262,7 @@ func (client *ConnectionMonitorsClient) getHandleResponse(resp *http.Response) ( // NewListPager - Lists all connection monitors for the specified Network Watcher. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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. @@ -308,7 +308,7 @@ func (client *ConnectionMonitorsClient) listCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -325,7 +325,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -347,7 +347,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -387,7 +387,7 @@ func (client *ConnectionMonitorsClient) queryCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -395,7 +395,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -417,7 +417,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -457,7 +457,7 @@ func (client *ConnectionMonitorsClient) startCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -465,7 +465,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -487,7 +487,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -527,7 +527,7 @@ func (client *ConnectionMonitorsClient) stopCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -535,7 +535,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // networkWatcherName - The name of the network watcher. // connectionMonitorName - The name of the connection monitor. @@ -581,7 +581,7 @@ func (client *ConnectionMonitorsClient) updateTagsCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_constants.go b/sdk/resourcemanager/network/armnetwork/zz_generated_constants.go index 511bfc6578b3..4af69b0618ee 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_constants.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_constants.go @@ -10,7 +10,7 @@ package armnetwork const ( moduleName = "armnetwork" - moduleVersion = "v1.0.0" + moduleVersion = "v1.1.0" ) // Access - Access to be allowed or denied. @@ -294,6 +294,8 @@ const ( ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20150501 ApplicationGatewaySSLPolicyName = "AppGwSslPolicy20150501" ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20170401 ApplicationGatewaySSLPolicyName = "AppGwSslPolicy20170401" ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20170401S ApplicationGatewaySSLPolicyName = "AppGwSslPolicy20170401S" + ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20220101 ApplicationGatewaySSLPolicyName = "AppGwSslPolicy20220101" + ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20220101S ApplicationGatewaySSLPolicyName = "AppGwSslPolicy20220101S" ) // PossibleApplicationGatewaySSLPolicyNameValues returns the possible values for the ApplicationGatewaySSLPolicyName const type. @@ -302,6 +304,8 @@ func PossibleApplicationGatewaySSLPolicyNameValues() []ApplicationGatewaySSLPoli ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20150501, ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20170401, ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20170401S, + ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20220101, + ApplicationGatewaySSLPolicyNameAppGwSSLPolicy20220101S, } } @@ -310,6 +314,7 @@ type ApplicationGatewaySSLPolicyType string const ( ApplicationGatewaySSLPolicyTypeCustom ApplicationGatewaySSLPolicyType = "Custom" + ApplicationGatewaySSLPolicyTypeCustomV2 ApplicationGatewaySSLPolicyType = "CustomV2" ApplicationGatewaySSLPolicyTypePredefined ApplicationGatewaySSLPolicyType = "Predefined" ) @@ -317,6 +322,7 @@ const ( func PossibleApplicationGatewaySSLPolicyTypeValues() []ApplicationGatewaySSLPolicyType { return []ApplicationGatewaySSLPolicyType{ ApplicationGatewaySSLPolicyTypeCustom, + ApplicationGatewaySSLPolicyTypeCustomV2, ApplicationGatewaySSLPolicyTypePredefined, } } @@ -328,6 +334,7 @@ const ( ApplicationGatewaySSLProtocolTLSv10 ApplicationGatewaySSLProtocol = "TLSv1_0" ApplicationGatewaySSLProtocolTLSv11 ApplicationGatewaySSLProtocol = "TLSv1_1" ApplicationGatewaySSLProtocolTLSv12 ApplicationGatewaySSLProtocol = "TLSv1_2" + ApplicationGatewaySSLProtocolTLSv13 ApplicationGatewaySSLProtocol = "TLSv1_3" ) // PossibleApplicationGatewaySSLProtocolValues returns the possible values for the ApplicationGatewaySSLProtocol const type. @@ -336,6 +343,7 @@ func PossibleApplicationGatewaySSLProtocolValues() []ApplicationGatewaySSLProtoc ApplicationGatewaySSLProtocolTLSv10, ApplicationGatewaySSLProtocolTLSv11, ApplicationGatewaySSLProtocolTLSv12, + ApplicationGatewaySSLProtocolTLSv13, } } @@ -3270,6 +3278,7 @@ func PossibleWebApplicationFirewallModeValues() []WebApplicationFirewallMode { type WebApplicationFirewallOperator string const ( + WebApplicationFirewallOperatorAny WebApplicationFirewallOperator = "Any" WebApplicationFirewallOperatorBeginsWith WebApplicationFirewallOperator = "BeginsWith" WebApplicationFirewallOperatorContains WebApplicationFirewallOperator = "Contains" WebApplicationFirewallOperatorEndsWith WebApplicationFirewallOperator = "EndsWith" @@ -3286,6 +3295,7 @@ const ( // PossibleWebApplicationFirewallOperatorValues returns the possible values for the WebApplicationFirewallOperator const type. func PossibleWebApplicationFirewallOperatorValues() []WebApplicationFirewallOperator { return []WebApplicationFirewallOperator{ + WebApplicationFirewallOperatorAny, WebApplicationFirewallOperatorBeginsWith, WebApplicationFirewallOperatorContains, WebApplicationFirewallOperatorEndsWith, diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_customipprefixes_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_customipprefixes_client.go index 73f0a91eef3c..3c8d4143d92e 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_customipprefixes_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_customipprefixes_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *CustomIPPrefixesClient) createOrUpdateCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // customIPPrefixName - The name of the CustomIpPrefix. // options - CustomIPPrefixesClientBeginDeleteOptions contains the optional parameters for the CustomIPPrefixesClient.BeginDelete @@ -144,7 +144,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -180,7 +180,7 @@ func (client *CustomIPPrefixesClient) deleteCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -227,7 +227,7 @@ func (client *CustomIPPrefixesClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -247,7 +247,7 @@ func (client *CustomIPPrefixesClient) getHandleResponse(resp *http.Response) (Cu // NewListPager - Gets all custom IP prefixes in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - CustomIPPrefixesClientListOptions contains the optional parameters for the CustomIPPrefixesClient.List method. func (client *CustomIPPrefixesClient) NewListPager(resourceGroupName string, options *CustomIPPrefixesClientListOptions) *runtime.Pager[CustomIPPrefixesClientListResponse] { @@ -294,7 +294,7 @@ func (client *CustomIPPrefixesClient) listCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -311,7 +311,7 @@ func (client *CustomIPPrefixesClient) listHandleResponse(resp *http.Response) (C // NewListAllPager - Gets all the custom IP prefixes in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - CustomIPPrefixesClientListAllOptions contains the optional parameters for the CustomIPPrefixesClient.ListAll // method. func (client *CustomIPPrefixesClient) NewListAllPager(options *CustomIPPrefixesClientListAllOptions) *runtime.Pager[CustomIPPrefixesClientListAllResponse] { @@ -354,7 +354,7 @@ func (client *CustomIPPrefixesClient) listAllCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -371,7 +371,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -412,7 +412,7 @@ func (client *CustomIPPrefixesClient) updateTagsCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_ddoscustompolicies_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_ddoscustompolicies_client.go index df75aa1f83d8..516b5418b9e2 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_ddoscustompolicies_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_ddoscustompolicies_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *DdosCustomPoliciesClient) createOrUpdateCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -144,7 +144,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -180,7 +180,7 @@ func (client *DdosCustomPoliciesClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -227,7 +227,7 @@ func (client *DdosCustomPoliciesClient) getCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -244,7 +244,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -285,7 +285,7 @@ func (client *DdosCustomPoliciesClient) updateTagsCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_ddosprotectionplans_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_ddosprotectionplans_client.go index 14a6e0a58a53..7fbd4fc8598e 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_ddosprotectionplans_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_ddosprotectionplans_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *DdosProtectionPlansClient) createOrUpdateCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -144,7 +144,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -180,7 +180,7 @@ func (client *DdosProtectionPlansClient) deleteCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -227,7 +227,7 @@ func (client *DdosProtectionPlansClient) getCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -244,7 +244,7 @@ func (client *DdosProtectionPlansClient) getHandleResponse(resp *http.Response) // NewListPager - Gets all DDoS protection plans in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - DdosProtectionPlansClientListOptions contains the optional parameters for the DdosProtectionPlansClient.List // method. func (client *DdosProtectionPlansClient) NewListPager(options *DdosProtectionPlansClientListOptions) *runtime.Pager[DdosProtectionPlansClientListResponse] { @@ -287,7 +287,7 @@ func (client *DdosProtectionPlansClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -304,7 +304,7 @@ func (client *DdosProtectionPlansClient) listHandleResponse(resp *http.Response) // NewListByResourceGroupPager - Gets all the DDoS protection plans in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - DdosProtectionPlansClientListByResourceGroupOptions contains the optional parameters for the DdosProtectionPlansClient.ListByResourceGroup // method. @@ -352,7 +352,7 @@ func (client *DdosProtectionPlansClient) listByResourceGroupCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -369,7 +369,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -410,7 +410,7 @@ func (client *DdosProtectionPlansClient) updateTagsCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_defaultsecurityrules_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_defaultsecurityrules_client.go index 8cba2609a62d..2081d28b67de 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_defaultsecurityrules_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_defaultsecurityrules_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // networkSecurityGroupName - The name of the network security group. // defaultSecurityRuleName - The name of the default security rule. @@ -102,7 +102,7 @@ func (client *DefaultSecurityRulesClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -119,7 +119,7 @@ func (client *DefaultSecurityRulesClient) getHandleResponse(resp *http.Response) // NewListPager - Gets all default security rules in a network security group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -172,7 +172,7 @@ func (client *DefaultSecurityRulesClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_dscpconfiguration_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_dscpconfiguration_client.go index 763c7ee8cd8c..5b2d9e13948f 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_dscpconfiguration_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_dscpconfiguration_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *DscpConfigurationClient) createOrUpdateCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // dscpConfigurationName - The name of the resource. // options - DscpConfigurationClientBeginDeleteOptions contains the optional parameters for the DscpConfigurationClient.BeginDelete @@ -144,7 +144,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -180,7 +180,7 @@ func (client *DscpConfigurationClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -227,7 +227,7 @@ func (client *DscpConfigurationClient) getCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -244,7 +244,7 @@ func (client *DscpConfigurationClient) getHandleResponse(resp *http.Response) (D // NewListPager - Gets a DSCP Configuration. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - DscpConfigurationClientListOptions contains the optional parameters for the DscpConfigurationClient.List method. func (client *DscpConfigurationClient) NewListPager(resourceGroupName string, options *DscpConfigurationClientListOptions) *runtime.Pager[DscpConfigurationClientListResponse] { @@ -291,7 +291,7 @@ func (client *DscpConfigurationClient) listCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -308,7 +308,7 @@ func (client *DscpConfigurationClient) listHandleResponse(resp *http.Response) ( // NewListAllPager - Gets all dscp configurations in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - DscpConfigurationClientListAllOptions contains the optional parameters for the DscpConfigurationClient.ListAll // method. func (client *DscpConfigurationClient) NewListAllPager(options *DscpConfigurationClientListAllOptions) *runtime.Pager[DscpConfigurationClientListAllResponse] { @@ -351,7 +351,7 @@ func (client *DscpConfigurationClient) listAllCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecircuitauthorizations_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecircuitauthorizations_client.go index 8cffbb2e1b36..4ee2c4f1b03d 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecircuitauthorizations_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecircuitauthorizations_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // circuitName - The name of the express route circuit. // authorizationName - The name of the authorization. @@ -80,7 +80,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -120,7 +120,7 @@ func (client *ExpressRouteCircuitAuthorizationsClient) createOrUpdateCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, authorizationParameters) @@ -128,7 +128,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // circuitName - The name of the express route circuit. // authorizationName - The name of the authorization. @@ -150,7 +150,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -190,7 +190,7 @@ func (client *ExpressRouteCircuitAuthorizationsClient) deleteCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -198,7 +198,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // circuitName - The name of the express route circuit. // authorizationName - The name of the authorization. @@ -243,7 +243,7 @@ func (client *ExpressRouteCircuitAuthorizationsClient) getCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -260,7 +260,7 @@ func (client *ExpressRouteCircuitAuthorizationsClient) getHandleResponse(resp *h // NewListPager - Gets all authorizations in an express route circuit. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // circuitName - The name of the circuit. // options - ExpressRouteCircuitAuthorizationsClientListOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.List @@ -313,7 +313,7 @@ func (client *ExpressRouteCircuitAuthorizationsClient) listCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecircuitconnections_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecircuitconnections_client.go index da2fd99bb7fa..b0e912a34e68 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecircuitconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecircuitconnections_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // circuitName - The name of the express route circuit. // peeringName - The name of the peering. @@ -82,7 +82,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -126,7 +126,7 @@ func (client *ExpressRouteCircuitConnectionsClient) createOrUpdateCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, expressRouteCircuitConnectionParameters) @@ -134,7 +134,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // circuitName - The name of the express route circuit. // peeringName - The name of the peering. @@ -157,7 +157,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -201,7 +201,7 @@ func (client *ExpressRouteCircuitConnectionsClient) deleteCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -209,7 +209,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // circuitName - The name of the express route circuit. // peeringName - The name of the peering. @@ -259,7 +259,7 @@ func (client *ExpressRouteCircuitConnectionsClient) getCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -276,7 +276,7 @@ func (client *ExpressRouteCircuitConnectionsClient) getHandleResponse(resp *http // NewListPager - Gets all global reach connections associated with a private peering in an express route circuit. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // circuitName - The name of the circuit. // peeringName - The name of the peering. @@ -334,7 +334,7 @@ func (client *ExpressRouteCircuitConnectionsClient) listCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecircuitpeerings_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecircuitpeerings_client.go index c60cad35edbd..6e71988a564f 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecircuitpeerings_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecircuitpeerings_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // circuitName - The name of the express route circuit. // peeringName - The name of the peering. @@ -80,7 +80,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -120,7 +120,7 @@ func (client *ExpressRouteCircuitPeeringsClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, peeringParameters) @@ -128,7 +128,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // circuitName - The name of the express route circuit. // peeringName - The name of the peering. @@ -150,7 +150,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -190,7 +190,7 @@ func (client *ExpressRouteCircuitPeeringsClient) deleteCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -198,7 +198,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // circuitName - The name of the express route circuit. // peeringName - The name of the peering. @@ -243,7 +243,7 @@ func (client *ExpressRouteCircuitPeeringsClient) getCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -260,7 +260,7 @@ func (client *ExpressRouteCircuitPeeringsClient) getHandleResponse(resp *http.Re // NewListPager - Gets all peerings in a specified express route circuit. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -313,7 +313,7 @@ func (client *ExpressRouteCircuitPeeringsClient) listCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecircuits_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecircuits_client.go index 45a40be2fabd..f2fe3061ee7b 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecircuits_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecircuits_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *ExpressRouteCircuitsClient) createOrUpdateCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -144,7 +144,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -180,7 +180,7 @@ func (client *ExpressRouteCircuitsClient) deleteCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -228,7 +228,7 @@ func (client *ExpressRouteCircuitsClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -245,7 +245,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // circuitName - The name of the express route circuit. // peeringName - The name of the peering. @@ -290,7 +290,7 @@ func (client *ExpressRouteCircuitsClient) getPeeringStatsCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -307,7 +307,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -347,7 +347,7 @@ func (client *ExpressRouteCircuitsClient) getStatsCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -364,7 +364,7 @@ func (client *ExpressRouteCircuitsClient) getStatsHandleResponse(resp *http.Resp // NewListPager - Gets all the express route circuits in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - ExpressRouteCircuitsClientListOptions contains the optional parameters for the ExpressRouteCircuitsClient.List // method. @@ -412,7 +412,7 @@ func (client *ExpressRouteCircuitsClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -429,7 +429,7 @@ func (client *ExpressRouteCircuitsClient) listHandleResponse(resp *http.Response // NewListAllPager - Gets all the express route circuits in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - ExpressRouteCircuitsClientListAllOptions contains the optional parameters for the ExpressRouteCircuitsClient.ListAll // method. func (client *ExpressRouteCircuitsClient) NewListAllPager(options *ExpressRouteCircuitsClientListAllOptions) *runtime.Pager[ExpressRouteCircuitsClientListAllResponse] { @@ -472,7 +472,7 @@ func (client *ExpressRouteCircuitsClient) listAllCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -489,7 +489,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // circuitName - The name of the express route circuit. // peeringName - The name of the peering. @@ -512,7 +512,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -556,7 +556,7 @@ func (client *ExpressRouteCircuitsClient) listArpTableCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -565,7 +565,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // circuitName - The name of the express route circuit. // peeringName - The name of the peering. @@ -588,7 +588,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -632,7 +632,7 @@ func (client *ExpressRouteCircuitsClient) listRoutesTableCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -641,7 +641,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // circuitName - The name of the express route circuit. // peeringName - The name of the peering. @@ -665,7 +665,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -709,7 +709,7 @@ func (client *ExpressRouteCircuitsClient) listRoutesTableSummaryCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -717,7 +717,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // circuitName - The name of the circuit. // parameters - Parameters supplied to update express route circuit tags. @@ -758,7 +758,7 @@ func (client *ExpressRouteCircuitsClient) updateTagsCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteconnections_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteconnections_client.go index bb79dadd812d..e79831309874 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteconnections_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // expressRouteGatewayName - The name of the ExpressRoute gateway. // connectionName - The name of the connection subresource. @@ -80,7 +80,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -120,7 +120,7 @@ func (client *ExpressRouteConnectionsClient) createOrUpdateCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, putExpressRouteConnectionParameters) @@ -128,7 +128,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // expressRouteGatewayName - The name of the ExpressRoute gateway. // connectionName - The name of the connection subresource. @@ -150,7 +150,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -190,7 +190,7 @@ func (client *ExpressRouteConnectionsClient) deleteCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -198,7 +198,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // expressRouteGatewayName - The name of the ExpressRoute gateway. // connectionName - The name of the ExpressRoute connection. @@ -243,7 +243,7 @@ func (client *ExpressRouteConnectionsClient) getCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -260,7 +260,7 @@ func (client *ExpressRouteConnectionsClient) getHandleResponse(resp *http.Respon // List - Lists ExpressRouteConnections. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -300,7 +300,7 @@ func (client *ExpressRouteConnectionsClient) listCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecrossconnectionpeerings_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecrossconnectionpeerings_client.go index e765c0519095..593e77fd04a9 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecrossconnectionpeerings_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecrossconnectionpeerings_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // crossConnectionName - The name of the ExpressRouteCrossConnection. // peeringName - The name of the peering. @@ -80,7 +80,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -120,7 +120,7 @@ func (client *ExpressRouteCrossConnectionPeeringsClient) createOrUpdateCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, peeringParameters) @@ -128,7 +128,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // crossConnectionName - The name of the ExpressRouteCrossConnection. // peeringName - The name of the peering. @@ -150,7 +150,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -190,7 +190,7 @@ func (client *ExpressRouteCrossConnectionPeeringsClient) deleteCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -198,7 +198,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // crossConnectionName - The name of the ExpressRouteCrossConnection. // peeringName - The name of the peering. @@ -243,7 +243,7 @@ func (client *ExpressRouteCrossConnectionPeeringsClient) getCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -260,7 +260,7 @@ func (client *ExpressRouteCrossConnectionPeeringsClient) getHandleResponse(resp // NewListPager - Gets all peerings in a specified ExpressRouteCrossConnection. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // crossConnectionName - The name of the ExpressRouteCrossConnection. // options - ExpressRouteCrossConnectionPeeringsClientListOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.List @@ -313,7 +313,7 @@ func (client *ExpressRouteCrossConnectionPeeringsClient) listCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecrossconnections_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecrossconnections_client.go index f2d9c365e5c5..619ecb1bfe0b 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecrossconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecrossconnections_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // crossConnectionName - The name of the ExpressRouteCrossConnection. // parameters - Parameters supplied to the update express route crossConnection operation. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *ExpressRouteCrossConnectionsClient) createOrUpdateCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -163,7 +163,7 @@ func (client *ExpressRouteCrossConnectionsClient) getCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,7 +180,7 @@ func (client *ExpressRouteCrossConnectionsClient) getHandleResponse(resp *http.R // NewListPager - Retrieves all the ExpressRouteCrossConnections in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - ExpressRouteCrossConnectionsClientListOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.List // method. func (client *ExpressRouteCrossConnectionsClient) NewListPager(options *ExpressRouteCrossConnectionsClientListOptions) *runtime.Pager[ExpressRouteCrossConnectionsClientListResponse] { @@ -223,7 +223,7 @@ func (client *ExpressRouteCrossConnectionsClient) listCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -241,7 +241,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // crossConnectionName - The name of the ExpressRouteCrossConnection. // peeringName - The name of the peering. @@ -265,7 +265,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -309,7 +309,7 @@ func (client *ExpressRouteCrossConnectionsClient) listArpTableCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -317,7 +317,7 @@ func (client *ExpressRouteCrossConnectionsClient) listArpTableCreateRequest(ctx // NewListByResourceGroupPager - Retrieves all the ExpressRouteCrossConnections in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - ExpressRouteCrossConnectionsClientListByResourceGroupOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.ListByResourceGroup // method. @@ -365,7 +365,7 @@ func (client *ExpressRouteCrossConnectionsClient) listByResourceGroupCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -383,7 +383,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // crossConnectionName - The name of the ExpressRouteCrossConnection. // peeringName - The name of the peering. @@ -407,7 +407,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -451,7 +451,7 @@ func (client *ExpressRouteCrossConnectionsClient) listRoutesTableCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -460,7 +460,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // crossConnectionName - The name of the ExpressRouteCrossConnection. // peeringName - The name of the peering. @@ -484,7 +484,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -528,7 +528,7 @@ func (client *ExpressRouteCrossConnectionsClient) listRoutesTableSummaryCreateRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -536,7 +536,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -577,7 +577,7 @@ func (client *ExpressRouteCrossConnectionsClient) updateTagsCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, crossConnectionParameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutegateways_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutegateways_client.go index 5186b0a80d7a..6011fbc5f968 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutegateways_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutegateways_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // expressRouteGatewayName - The name of the ExpressRoute gateway. // putExpressRouteGatewayParameters - Parameters required in an ExpressRoute gateway PUT operation. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *ExpressRouteGatewaysClient) createOrUpdateCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, putExpressRouteGatewayParameters) @@ -124,7 +124,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -146,7 +146,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -182,7 +182,7 @@ func (client *ExpressRouteGatewaysClient) deleteCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -190,7 +190,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -230,7 +230,7 @@ func (client *ExpressRouteGatewaysClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -247,7 +247,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - ExpressRouteGatewaysClientListByResourceGroupOptions contains the optional parameters for the ExpressRouteGatewaysClient.ListByResourceGroup // method. @@ -282,7 +282,7 @@ func (client *ExpressRouteGatewaysClient) listByResourceGroupCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -299,7 +299,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // options - ExpressRouteGatewaysClientListBySubscriptionOptions contains the optional parameters for the ExpressRouteGatewaysClient.ListBySubscription // method. func (client *ExpressRouteGatewaysClient) ListBySubscription(ctx context.Context, options *ExpressRouteGatewaysClientListBySubscriptionOptions) (ExpressRouteGatewaysClientListBySubscriptionResponse, error) { @@ -329,7 +329,7 @@ func (client *ExpressRouteGatewaysClient) listBySubscriptionCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -346,7 +346,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -368,7 +368,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -404,7 +404,7 @@ func (client *ExpressRouteGatewaysClient) updateTagsCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, expressRouteGatewayParameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutelinks_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutelinks_client.go index 2f25facb5565..446a613d5083 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutelinks_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutelinks_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // expressRoutePortName - The name of the ExpressRoutePort resource. // linkName - The name of the ExpressRouteLink resource. @@ -101,7 +101,7 @@ func (client *ExpressRouteLinksClient) getCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -118,7 +118,7 @@ func (client *ExpressRouteLinksClient) getHandleResponse(resp *http.Response) (E // NewListPager - Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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. @@ -170,7 +170,7 @@ func (client *ExpressRouteLinksClient) listCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteportauthorizations_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteportauthorizations_client.go index aab2fb0a3755..b655340e3b6b 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteportauthorizations_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteportauthorizations_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // expressRoutePortName - The name of the express route port. // authorizationName - The name of the authorization. @@ -80,7 +80,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -120,7 +120,7 @@ func (client *ExpressRoutePortAuthorizationsClient) createOrUpdateCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, authorizationParameters) @@ -128,7 +128,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // expressRoutePortName - The name of the express route port. // authorizationName - The name of the authorization. @@ -150,7 +150,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -190,7 +190,7 @@ func (client *ExpressRoutePortAuthorizationsClient) deleteCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -198,7 +198,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // expressRoutePortName - The name of the express route port. // authorizationName - The name of the authorization. @@ -243,7 +243,7 @@ func (client *ExpressRoutePortAuthorizationsClient) getCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -260,7 +260,7 @@ func (client *ExpressRoutePortAuthorizationsClient) getHandleResponse(resp *http // NewListPager - Gets all authorizations in an express route port. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -313,7 +313,7 @@ func (client *ExpressRoutePortAuthorizationsClient) listCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteports_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteports_client.go index a4c38e5da410..7ddb120d40ef 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteports_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteports_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // expressRoutePortName - The name of the ExpressRoutePort resource. // parameters - Parameters supplied to the create ExpressRoutePort operation. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *ExpressRoutePortsClient) createOrUpdateCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -144,7 +144,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -180,7 +180,7 @@ func (client *ExpressRoutePortsClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // expressRoutePortName - The name of ExpressRoutePort. // request - Request parameters supplied to generate a letter of authorization. @@ -229,7 +229,7 @@ func (client *ExpressRoutePortsClient) generateLOACreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, request) @@ -246,7 +246,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // expressRoutePortName - The name of ExpressRoutePort. // options - ExpressRoutePortsClientGetOptions contains the optional parameters for the ExpressRoutePortsClient.Get method. @@ -285,7 +285,7 @@ func (client *ExpressRoutePortsClient) getCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -302,7 +302,7 @@ func (client *ExpressRoutePortsClient) getHandleResponse(resp *http.Response) (E // NewListPager - List all the ExpressRoutePort resources in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - ExpressRoutePortsClientListOptions contains the optional parameters for the ExpressRoutePortsClient.List method. func (client *ExpressRoutePortsClient) NewListPager(options *ExpressRoutePortsClientListOptions) *runtime.Pager[ExpressRoutePortsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ExpressRoutePortsClientListResponse]{ @@ -344,7 +344,7 @@ func (client *ExpressRoutePortsClient) listCreateRequest(ctx context.Context, op return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -361,7 +361,7 @@ func (client *ExpressRoutePortsClient) listHandleResponse(resp *http.Response) ( // NewListByResourceGroupPager - List all the ExpressRoutePort resources in the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - ExpressRoutePortsClientListByResourceGroupOptions contains the optional parameters for the ExpressRoutePortsClient.ListByResourceGroup // method. @@ -409,7 +409,7 @@ func (client *ExpressRoutePortsClient) listByResourceGroupCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -426,7 +426,7 @@ func (client *ExpressRoutePortsClient) listByResourceGroupHandleResponse(resp *h // UpdateTags - Update ExpressRoutePort tags. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // expressRoutePortName - The name of the ExpressRoutePort resource. // parameters - Parameters supplied to update ExpressRoutePort resource tags. @@ -467,7 +467,7 @@ func (client *ExpressRoutePortsClient) updateTagsCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteportslocations_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteportslocations_client.go index e61475903780..f3e560bd7f87 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteportslocations_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteportslocations_client.go @@ -58,7 +58,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // locationName - Name of the requested ExpressRoutePort peering location. // options - ExpressRoutePortsLocationsClientGetOptions contains the optional parameters for the ExpressRoutePortsLocationsClient.Get // method. @@ -93,7 +93,7 @@ func (client *ExpressRoutePortsLocationsClient) getCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -111,7 +111,7 @@ 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. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - ExpressRoutePortsLocationsClientListOptions contains the optional parameters for the ExpressRoutePortsLocationsClient.List // method. func (client *ExpressRoutePortsLocationsClient) NewListPager(options *ExpressRoutePortsLocationsClientListOptions) *runtime.Pager[ExpressRoutePortsLocationsClientListResponse] { @@ -154,7 +154,7 @@ func (client *ExpressRoutePortsLocationsClient) listCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteproviderportslocation_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteproviderportslocation_client.go new file mode 100644 index 000000000000..8f6e0f91837f --- /dev/null +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteproviderportslocation_client.go @@ -0,0 +1,106 @@ +//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 + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ExpressRouteProviderPortsLocationClient contains the methods for the ExpressRouteProviderPortsLocation group. +// Don't use this type directly, use NewExpressRouteProviderPortsLocationClient() instead. +type ExpressRouteProviderPortsLocationClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// 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. +func NewExpressRouteProviderPortsLocationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteProviderPortsLocationClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &ExpressRouteProviderPortsLocationClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// List - Retrieves all the ExpressRouteProviderPorts in a subscription. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-01-01 +// 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 { + return ExpressRouteProviderPortsLocationClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ExpressRouteProviderPortsLocationClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ExpressRouteProviderPortsLocationClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) +} + +// listCreateRequest creates the List request. +func (client *ExpressRouteProviderPortsLocationClient) listCreateRequest(ctx context.Context, options *ExpressRouteProviderPortsLocationClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteProviderPorts" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-01-01") + if options != nil && options.Filter != nil { + reqQP.Set("$filter", *options.Filter) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ExpressRouteProviderPortsLocationClient) listHandleResponse(resp *http.Response) (ExpressRouteProviderPortsLocationClientListResponse, error) { + result := ExpressRouteProviderPortsLocationClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteProviderPortListResult); err != nil { + return ExpressRouteProviderPortsLocationClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteserviceproviders_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteserviceproviders_client.go index 65a47de2c3d4..7ff95713db67 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteserviceproviders_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteserviceproviders_client.go @@ -57,7 +57,7 @@ func NewExpressRouteServiceProvidersClient(subscriptionID string, credential azc // NewListPager - Gets all the available express route service providers. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - ExpressRouteServiceProvidersClientListOptions contains the optional parameters for the ExpressRouteServiceProvidersClient.List // method. func (client *ExpressRouteServiceProvidersClient) NewListPager(options *ExpressRouteServiceProvidersClientListOptions) *runtime.Pager[ExpressRouteServiceProvidersClientListResponse] { @@ -100,7 +100,7 @@ func (client *ExpressRouteServiceProvidersClient) listCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicies_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicies_client.go index cf663f29350b..2388b31e830d 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicies_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicies_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *FirewallPoliciesClient) createOrUpdateCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -144,7 +144,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -180,7 +180,7 @@ func (client *FirewallPoliciesClient) deleteCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -227,7 +227,7 @@ func (client *FirewallPoliciesClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -247,7 +247,7 @@ func (client *FirewallPoliciesClient) getHandleResponse(resp *http.Response) (Fi // NewListPager - Lists all Firewall Policies in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - FirewallPoliciesClientListOptions contains the optional parameters for the FirewallPoliciesClient.List method. func (client *FirewallPoliciesClient) NewListPager(resourceGroupName string, options *FirewallPoliciesClientListOptions) *runtime.Pager[FirewallPoliciesClientListResponse] { @@ -294,7 +294,7 @@ func (client *FirewallPoliciesClient) listCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -311,7 +311,7 @@ func (client *FirewallPoliciesClient) listHandleResponse(resp *http.Response) (F // NewListAllPager - Gets all the Firewall Policies in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - FirewallPoliciesClientListAllOptions contains the optional parameters for the FirewallPoliciesClient.ListAll // method. func (client *FirewallPoliciesClient) NewListAllPager(options *FirewallPoliciesClientListAllOptions) *runtime.Pager[FirewallPoliciesClientListAllResponse] { @@ -354,7 +354,7 @@ func (client *FirewallPoliciesClient) listAllCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -371,7 +371,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // firewallPolicyName - The name of the Firewall Policy. // parameters - Parameters supplied to update Azure Firewall Policy tags. @@ -412,7 +412,7 @@ func (client *FirewallPoliciesClient) updateTagsCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicyidpssignatures_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicyidpssignatures_client.go index 2272d89deef9..97783c681975 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicyidpssignatures_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicyidpssignatures_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -97,7 +97,7 @@ func (client *FirewallPolicyIdpsSignaturesClient) listCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicyidpssignaturesfiltervalues_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicyidpssignaturesfiltervalues_client.go index 6563103db6e9..203bba8ab22d 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicyidpssignaturesfiltervalues_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicyidpssignaturesfiltervalues_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -97,7 +97,7 @@ func (client *FirewallPolicyIdpsSignaturesFilterValuesClient) listCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicyidpssignaturesoverrides_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicyidpssignaturesoverrides_client.go index 8a10ae600603..260b1c511a91 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicyidpssignaturesoverrides_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicyidpssignaturesoverrides_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -97,7 +97,7 @@ func (client *FirewallPolicyIdpsSignaturesOverridesClient) getCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -114,7 +114,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -154,7 +154,7 @@ func (client *FirewallPolicyIdpsSignaturesOverridesClient) listCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -171,7 +171,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -212,7 +212,7 @@ func (client *FirewallPolicyIdpsSignaturesOverridesClient) patchCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -229,7 +229,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -270,7 +270,7 @@ func (client *FirewallPolicyIdpsSignaturesOverridesClient) putCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicyrulecollectiongroups_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicyrulecollectiongroups_client.go index c0ca1ffddd5d..c5ba7a10868e 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicyrulecollectiongroups_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicyrulecollectiongroups_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // firewallPolicyName - The name of the Firewall Policy. // ruleCollectionGroupName - The name of the FirewallPolicyRuleCollectionGroup. @@ -80,7 +80,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -120,7 +120,7 @@ func (client *FirewallPolicyRuleCollectionGroupsClient) createOrUpdateCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -128,7 +128,7 @@ func (client *FirewallPolicyRuleCollectionGroupsClient) createOrUpdateCreateRequ // BeginDelete - Deletes the specified FirewallPolicyRuleCollectionGroup. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // firewallPolicyName - The name of the Firewall Policy. // ruleCollectionGroupName - The name of the FirewallPolicyRuleCollectionGroup. @@ -150,7 +150,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -190,7 +190,7 @@ func (client *FirewallPolicyRuleCollectionGroupsClient) deleteCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -198,7 +198,7 @@ func (client *FirewallPolicyRuleCollectionGroupsClient) deleteCreateRequest(ctx // Get - Gets the specified FirewallPolicyRuleCollectionGroup. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // firewallPolicyName - The name of the Firewall Policy. // ruleCollectionGroupName - The name of the FirewallPolicyRuleCollectionGroup. @@ -243,7 +243,7 @@ func (client *FirewallPolicyRuleCollectionGroupsClient) getCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -260,7 +260,7 @@ func (client *FirewallPolicyRuleCollectionGroupsClient) getHandleResponse(resp * // NewListPager - Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -313,7 +313,7 @@ func (client *FirewallPolicyRuleCollectionGroupsClient) listCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_flowlogs_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_flowlogs_client.go index 768231c5e6c2..e9802087a2f7 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_flowlogs_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_flowlogs_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // networkWatcherName - The name of the network watcher. // flowLogName - The name of the flow log. @@ -80,7 +80,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -120,7 +120,7 @@ func (client *FlowLogsClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -128,7 +128,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // networkWatcherName - The name of the network watcher. // flowLogName - The name of the flow log resource. @@ -149,7 +149,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -189,7 +189,7 @@ func (client *FlowLogsClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -197,7 +197,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // networkWatcherName - The name of the network watcher. // flowLogName - The name of the flow log resource. @@ -241,7 +241,7 @@ func (client *FlowLogsClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -258,7 +258,7 @@ func (client *FlowLogsClient) getHandleResponse(resp *http.Response) (FlowLogsCl // NewListPager - Lists all flow log resources for the specified Network Watcher. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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. @@ -310,7 +310,7 @@ func (client *FlowLogsClient) listCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -327,7 +327,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // networkWatcherName - The name of the network watcher. // flowLogName - The name of the flow log. @@ -372,7 +372,7 @@ func (client *FlowLogsClient) updateTagsCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_hubroutetables_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_hubroutetables_client.go index 906c5bf3b39f..e054ab294c78 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_hubroutetables_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_hubroutetables_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the VirtualHub. // virtualHubName - The name of the VirtualHub. // routeTableName - The name of the RouteTable. @@ -80,7 +80,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -120,7 +120,7 @@ func (client *HubRouteTablesClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, routeTableParameters) @@ -128,7 +128,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the RouteTable. // virtualHubName - The name of the VirtualHub. // routeTableName - The name of the RouteTable. @@ -150,7 +150,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -190,7 +190,7 @@ func (client *HubRouteTablesClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -198,7 +198,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the VirtualHub. // virtualHubName - The name of the VirtualHub. // routeTableName - The name of the RouteTable. @@ -242,7 +242,7 @@ func (client *HubRouteTablesClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -259,7 +259,7 @@ func (client *HubRouteTablesClient) getHandleResponse(resp *http.Response) (HubR // NewListPager - Retrieves the details of all RouteTables. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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. @@ -311,7 +311,7 @@ func (client *HubRouteTablesClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_hubvirtualnetworkconnections_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_hubvirtualnetworkconnections_client.go index a11952bcaece..ed42895eeba2 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_hubvirtualnetworkconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_hubvirtualnetworkconnections_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the HubVirtualNetworkConnection. // virtualHubName - The name of the VirtualHub. // connectionName - The name of the HubVirtualNetworkConnection. @@ -80,7 +80,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -120,7 +120,7 @@ func (client *HubVirtualNetworkConnectionsClient) createOrUpdateCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, hubVirtualNetworkConnectionParameters) @@ -128,7 +128,7 @@ func (client *HubVirtualNetworkConnectionsClient) createOrUpdateCreateRequest(ct // BeginDelete - Deletes a HubVirtualNetworkConnection. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the VirtualHub. // virtualHubName - The name of the VirtualHub. // connectionName - The name of the HubVirtualNetworkConnection. @@ -150,7 +150,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -190,7 +190,7 @@ func (client *HubVirtualNetworkConnectionsClient) deleteCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -198,7 +198,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the VirtualHub. // virtualHubName - The name of the VirtualHub. // connectionName - The name of the vpn connection. @@ -243,7 +243,7 @@ func (client *HubVirtualNetworkConnectionsClient) getCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -260,7 +260,7 @@ func (client *HubVirtualNetworkConnectionsClient) getHandleResponse(resp *http.R // NewListPager - Retrieves the details of all HubVirtualNetworkConnections. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -313,7 +313,7 @@ func (client *HubVirtualNetworkConnectionsClient) listCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_inboundnatrules_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_inboundnatrules_client.go index 05b806f332e5..9c45167cbd7f 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_inboundnatrules_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_inboundnatrules_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // loadBalancerName - The name of the load balancer. // inboundNatRuleName - The name of the inbound NAT rule. @@ -80,7 +80,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -120,7 +120,7 @@ func (client *InboundNatRulesClient) createOrUpdateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, inboundNatRuleParameters) @@ -128,7 +128,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // loadBalancerName - The name of the load balancer. // inboundNatRuleName - The name of the inbound NAT rule. @@ -150,7 +150,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -190,7 +190,7 @@ func (client *InboundNatRulesClient) deleteCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -198,7 +198,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // loadBalancerName - The name of the load balancer. // inboundNatRuleName - The name of the inbound NAT rule. @@ -242,7 +242,7 @@ func (client *InboundNatRulesClient) getCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -262,7 +262,7 @@ func (client *InboundNatRulesClient) getHandleResponse(resp *http.Response) (Inb // NewListPager - Gets all the inbound NAT rules in a load balancer. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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. @@ -314,7 +314,7 @@ func (client *InboundNatRulesClient) listCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_inboundsecurityrule_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_inboundsecurityrule_client.go index 8443a7c26edf..f719391b0485 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_inboundsecurityrule_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_inboundsecurityrule_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // networkVirtualApplianceName - The name of the Network Virtual Appliance. // ruleCollectionName - The name of security rule collection. @@ -80,7 +80,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -120,7 +120,7 @@ func (client *InboundSecurityRuleClient) createOrUpdateCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_interfaceipconfigurations_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_interfaceipconfigurations_client.go index f6d3b9a8250d..159063eddc3c 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_interfaceipconfigurations_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_interfaceipconfigurations_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // networkInterfaceName - The name of the network interface. // ipConfigurationName - The name of the ip configuration name. @@ -102,7 +102,7 @@ func (client *InterfaceIPConfigurationsClient) getCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -119,7 +119,7 @@ func (client *InterfaceIPConfigurationsClient) getHandleResponse(resp *http.Resp // NewListPager - Get all ip configurations in a network interface. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -172,7 +172,7 @@ func (client *InterfaceIPConfigurationsClient) listCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_interfaceloadbalancers_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_interfaceloadbalancers_client.go index 55b9dc259eec..13a54013bdec 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_interfaceloadbalancers_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_interfaceloadbalancers_client.go @@ -57,7 +57,7 @@ func NewInterfaceLoadBalancersClient(subscriptionID string, credential azcore.To // NewListPager - List all load balancers in a network interface. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -110,7 +110,7 @@ func (client *InterfaceLoadBalancersClient) listCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_interfaces_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_interfaces_client.go index 866c044d8794..bcd5a869d5a9 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_interfaces_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_interfaces_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *InterfacesClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -143,7 +143,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -179,7 +179,7 @@ func (client *InterfacesClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -187,7 +187,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -226,7 +226,7 @@ func (client *InterfacesClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -246,7 +246,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // cloudServiceName - The name of the cloud service. // roleInstanceName - The name of role instance. @@ -296,7 +296,7 @@ func (client *InterfacesClient) getCloudServiceNetworkInterfaceCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -316,7 +316,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -337,7 +337,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -373,7 +373,7 @@ func (client *InterfacesClient) getEffectiveRouteTableCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -382,7 +382,7 @@ 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 2021-08-01 +// 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. @@ -437,7 +437,7 @@ func (client *InterfacesClient) getVirtualMachineScaleSetIPConfigurationCreateRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2018-10-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -457,7 +457,7 @@ 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 2021-08-01 +// 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. @@ -507,7 +507,7 @@ func (client *InterfacesClient) getVirtualMachineScaleSetNetworkInterfaceCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2018-10-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -527,7 +527,7 @@ func (client *InterfacesClient) getVirtualMachineScaleSetNetworkInterfaceHandleR // NewListPager - Gets all network interfaces in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - InterfacesClientListOptions contains the optional parameters for the InterfacesClient.List method. func (client *InterfacesClient) NewListPager(resourceGroupName string, options *InterfacesClientListOptions) *runtime.Pager[InterfacesClientListResponse] { @@ -574,7 +574,7 @@ func (client *InterfacesClient) listCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -591,7 +591,7 @@ func (client *InterfacesClient) listHandleResponse(resp *http.Response) (Interfa // NewListAllPager - Gets all network interfaces in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - InterfacesClientListAllOptions contains the optional parameters for the InterfacesClient.ListAll method. func (client *InterfacesClient) NewListAllPager(options *InterfacesClientListAllOptions) *runtime.Pager[InterfacesClientListAllResponse] { return runtime.NewPager(runtime.PagingHandler[InterfacesClientListAllResponse]{ @@ -633,7 +633,7 @@ func (client *InterfacesClient) listAllCreateRequest(ctx context.Context, option return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -650,7 +650,7 @@ func (client *InterfacesClient) listAllHandleResponse(resp *http.Response) (Inte // NewListCloudServiceNetworkInterfacesPager - Gets all network interfaces in a cloud service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -703,7 +703,7 @@ func (client *InterfacesClient) listCloudServiceNetworkInterfacesCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -721,7 +721,7 @@ func (client *InterfacesClient) listCloudServiceNetworkInterfacesHandleResponse( // NewListCloudServiceRoleInstanceNetworkInterfacesPager - Gets information about all network interfaces in a role instance // in a cloud service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // cloudServiceName - The name of the cloud service. // roleInstanceName - The name of role instance. @@ -779,7 +779,7 @@ func (client *InterfacesClient) listCloudServiceRoleInstanceNetworkInterfacesCre return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -796,7 +796,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -817,7 +817,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -853,7 +853,7 @@ func (client *InterfacesClient) listEffectiveNetworkSecurityGroupsCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -862,7 +862,7 @@ func (client *InterfacesClient) listEffectiveNetworkSecurityGroupsCreateRequest( // NewListVirtualMachineScaleSetIPConfigurationsPager - 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 2021-08-01 +// 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. @@ -925,7 +925,7 @@ func (client *InterfacesClient) listVirtualMachineScaleSetIPConfigurationsCreate return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2018-10-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -945,7 +945,7 @@ func (client *InterfacesClient) listVirtualMachineScaleSetIPConfigurationsHandle // NewListVirtualMachineScaleSetNetworkInterfacesPager - Gets all network interfaces in a virtual machine scale set. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// 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 @@ -998,7 +998,7 @@ func (client *InterfacesClient) listVirtualMachineScaleSetNetworkInterfacesCreat return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2018-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1016,7 +1016,7 @@ func (client *InterfacesClient) listVirtualMachineScaleSetNetworkInterfacesHandl // NewListVirtualMachineScaleSetVMNetworkInterfacesPager - Gets information about all network interfaces in a virtual machine // in a virtual machine scale set. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// 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. @@ -1074,7 +1074,7 @@ func (client *InterfacesClient) listVirtualMachineScaleSetVMNetworkInterfacesCre return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2018-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1091,7 +1091,7 @@ func (client *InterfacesClient) listVirtualMachineScaleSetVMNetworkInterfacesHan // UpdateTags - Updates a network interface tags. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // networkInterfaceName - The name of the network interface. // parameters - Parameters supplied to update network interface tags. @@ -1131,7 +1131,7 @@ func (client *InterfacesClient) updateTagsCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_interfacetapconfigurations_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_interfacetapconfigurations_client.go index b2db47951bdf..84bae5e4caad 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_interfacetapconfigurations_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_interfacetapconfigurations_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // networkInterfaceName - The name of the network interface. // tapConfigurationName - The name of the tap configuration. @@ -80,7 +80,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -120,7 +120,7 @@ func (client *InterfaceTapConfigurationsClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, tapConfigurationParameters) @@ -128,7 +128,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // networkInterfaceName - The name of the network interface. // tapConfigurationName - The name of the tap configuration. @@ -150,7 +150,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -190,7 +190,7 @@ func (client *InterfaceTapConfigurationsClient) deleteCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -198,7 +198,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // networkInterfaceName - The name of the network interface. // tapConfigurationName - The name of the tap configuration. @@ -243,7 +243,7 @@ func (client *InterfaceTapConfigurationsClient) getCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -260,7 +260,7 @@ func (client *InterfaceTapConfigurationsClient) getHandleResponse(resp *http.Res // NewListPager - Get all Tap configurations in a network interface. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -313,7 +313,7 @@ func (client *InterfaceTapConfigurationsClient) listCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_ipallocations_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_ipallocations_client.go index fd05936721ce..685b4f593ae2 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_ipallocations_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_ipallocations_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *IPAllocationsClient) createOrUpdateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // ipAllocationName - The name of the IpAllocation. // options - IPAllocationsClientBeginDeleteOptions contains the optional parameters for the IPAllocationsClient.BeginDelete @@ -144,7 +144,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -180,7 +180,7 @@ func (client *IPAllocationsClient) deleteCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -227,7 +227,7 @@ func (client *IPAllocationsClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -247,7 +247,7 @@ func (client *IPAllocationsClient) getHandleResponse(resp *http.Response) (IPAll // NewListPager - Gets all IpAllocations in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - IPAllocationsClientListOptions contains the optional parameters for the IPAllocationsClient.List method. func (client *IPAllocationsClient) NewListPager(options *IPAllocationsClientListOptions) *runtime.Pager[IPAllocationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[IPAllocationsClientListResponse]{ @@ -289,7 +289,7 @@ func (client *IPAllocationsClient) listCreateRequest(ctx context.Context, option return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -306,7 +306,7 @@ func (client *IPAllocationsClient) listHandleResponse(resp *http.Response) (IPAl // NewListByResourceGroupPager - Gets all IpAllocations in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - IPAllocationsClientListByResourceGroupOptions contains the optional parameters for the IPAllocationsClient.ListByResourceGroup // method. @@ -354,7 +354,7 @@ func (client *IPAllocationsClient) listByResourceGroupCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -371,7 +371,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // ipAllocationName - The name of the IpAllocation. // parameters - Parameters supplied to update IpAllocation tags. @@ -412,7 +412,7 @@ func (client *IPAllocationsClient) updateTagsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_ipgroups_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_ipgroups_client.go index 3d0031f896a9..95ee2fbf014b 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_ipgroups_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_ipgroups_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // ipGroupsName - The name of the ipGroups. // parameters - Parameters supplied to the create or update IpGroups operation. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *IPGroupsClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -143,7 +143,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -179,7 +179,7 @@ func (client *IPGroupsClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -187,7 +187,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -226,7 +226,7 @@ func (client *IPGroupsClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -246,7 +246,7 @@ func (client *IPGroupsClient) getHandleResponse(resp *http.Response) (IPGroupsCl // NewListPager - Gets all IpGroups in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - IPGroupsClientListOptions contains the optional parameters for the IPGroupsClient.List method. func (client *IPGroupsClient) NewListPager(options *IPGroupsClientListOptions) *runtime.Pager[IPGroupsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[IPGroupsClientListResponse]{ @@ -288,7 +288,7 @@ func (client *IPGroupsClient) listCreateRequest(ctx context.Context, options *IP return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -305,7 +305,7 @@ func (client *IPGroupsClient) listHandleResponse(resp *http.Response) (IPGroupsC // NewListByResourceGroupPager - Gets all IpGroups in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - IPGroupsClientListByResourceGroupOptions contains the optional parameters for the IPGroupsClient.ListByResourceGroup // method. @@ -353,7 +353,7 @@ func (client *IPGroupsClient) listByResourceGroupCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -370,7 +370,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // ipGroupsName - The name of the ipGroups. // parameters - Parameters supplied to the update ipGroups operation. @@ -410,7 +410,7 @@ func (client *IPGroupsClient) updateGroupsCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancerbackendaddresspools_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancerbackendaddresspools_client.go index 250965803200..eddc234b363f 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancerbackendaddresspools_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancerbackendaddresspools_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // loadBalancerName - The name of the load balancer. // backendAddressPoolName - The name of the backend address pool. @@ -80,7 +80,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -120,7 +120,7 @@ func (client *LoadBalancerBackendAddressPoolsClient) createOrUpdateCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -128,7 +128,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // loadBalancerName - The name of the load balancer. // backendAddressPoolName - The name of the backend address pool. @@ -150,7 +150,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -190,7 +190,7 @@ func (client *LoadBalancerBackendAddressPoolsClient) deleteCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -198,7 +198,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // loadBalancerName - The name of the load balancer. // backendAddressPoolName - The name of the backend address pool. @@ -243,7 +243,7 @@ func (client *LoadBalancerBackendAddressPoolsClient) getCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -260,7 +260,7 @@ func (client *LoadBalancerBackendAddressPoolsClient) getHandleResponse(resp *htt // NewListPager - Gets all the load balancer backed address pools. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -313,7 +313,7 @@ func (client *LoadBalancerBackendAddressPoolsClient) listCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancerfrontendipconfigurations_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancerfrontendipconfigurations_client.go index fdba548410a9..3dab68a61831 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancerfrontendipconfigurations_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancerfrontendipconfigurations_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // loadBalancerName - The name of the load balancer. // frontendIPConfigurationName - The name of the frontend IP configuration. @@ -102,7 +102,7 @@ func (client *LoadBalancerFrontendIPConfigurationsClient) getCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -119,7 +119,7 @@ func (client *LoadBalancerFrontendIPConfigurationsClient) getHandleResponse(resp // NewListPager - Gets all the load balancer frontend IP configurations. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -172,7 +172,7 @@ func (client *LoadBalancerFrontendIPConfigurationsClient) listCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancerloadbalancingrules_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancerloadbalancingrules_client.go index e2b52960db8e..c50d7faee1dc 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancerloadbalancingrules_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancerloadbalancingrules_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // loadBalancerName - The name of the load balancer. // loadBalancingRuleName - The name of the load balancing rule. @@ -102,7 +102,7 @@ func (client *LoadBalancerLoadBalancingRulesClient) getCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -119,7 +119,7 @@ func (client *LoadBalancerLoadBalancingRulesClient) getHandleResponse(resp *http // NewListPager - Gets all the load balancing rules in a load balancer. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -172,7 +172,7 @@ func (client *LoadBalancerLoadBalancingRulesClient) listCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancernetworkinterfaces_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancernetworkinterfaces_client.go index c2106def76c5..777b858ac6a7 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancernetworkinterfaces_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancernetworkinterfaces_client.go @@ -57,7 +57,7 @@ func NewLoadBalancerNetworkInterfacesClient(subscriptionID string, credential az // NewListPager - Gets associated load balancer network interfaces. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -110,7 +110,7 @@ func (client *LoadBalancerNetworkInterfacesClient) listCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalanceroutboundrules_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalanceroutboundrules_client.go index 2e50b27711c5..4322636f097c 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalanceroutboundrules_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalanceroutboundrules_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // loadBalancerName - The name of the load balancer. // outboundRuleName - The name of the outbound rule. @@ -102,7 +102,7 @@ func (client *LoadBalancerOutboundRulesClient) getCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -119,7 +119,7 @@ func (client *LoadBalancerOutboundRulesClient) getHandleResponse(resp *http.Resp // NewListPager - Gets all the outbound rules in a load balancer. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -172,7 +172,7 @@ func (client *LoadBalancerOutboundRulesClient) listCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancerprobes_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancerprobes_client.go index 38737fef59a8..037e84e439f7 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancerprobes_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancerprobes_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // loadBalancerName - The name of the load balancer. // probeName - The name of the probe. @@ -101,7 +101,7 @@ func (client *LoadBalancerProbesClient) getCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -118,7 +118,7 @@ func (client *LoadBalancerProbesClient) getHandleResponse(resp *http.Response) ( // NewListPager - Gets all the load balancer probes. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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. @@ -170,7 +170,7 @@ func (client *LoadBalancerProbesClient) listCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancers_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancers_client.go index e0510adcf580..4948fa720835 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancers_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancers_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *LoadBalancersClient) createOrUpdateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -144,7 +144,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -180,7 +180,7 @@ func (client *LoadBalancersClient) deleteCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -227,7 +227,7 @@ func (client *LoadBalancersClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -247,7 +247,7 @@ func (client *LoadBalancersClient) getHandleResponse(resp *http.Response) (LoadB // NewListPager - Gets all the load balancers in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - LoadBalancersClientListOptions contains the optional parameters for the LoadBalancersClient.List method. func (client *LoadBalancersClient) NewListPager(resourceGroupName string, options *LoadBalancersClientListOptions) *runtime.Pager[LoadBalancersClientListResponse] { @@ -294,7 +294,7 @@ func (client *LoadBalancersClient) listCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -311,7 +311,7 @@ func (client *LoadBalancersClient) listHandleResponse(resp *http.Response) (Load // NewListAllPager - Gets all the load balancers in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - LoadBalancersClientListAllOptions contains the optional parameters for the LoadBalancersClient.ListAll method. func (client *LoadBalancersClient) NewListAllPager(options *LoadBalancersClientListAllOptions) *runtime.Pager[LoadBalancersClientListAllResponse] { return runtime.NewPager(runtime.PagingHandler[LoadBalancersClientListAllResponse]{ @@ -353,7 +353,7 @@ func (client *LoadBalancersClient) listAllCreateRequest(ctx context.Context, opt return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -370,7 +370,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -393,7 +393,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -433,7 +433,7 @@ func (client *LoadBalancersClient) listInboundNatRulePortMappingsCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -441,7 +441,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -462,7 +462,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -494,7 +494,7 @@ func (client *LoadBalancersClient) swapPublicIPAddressesCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -502,7 +502,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // loadBalancerName - The name of the load balancer. // parameters - Parameters supplied to update load balancer tags. @@ -543,7 +543,7 @@ func (client *LoadBalancersClient) updateTagsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_localnetworkgateways_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_localnetworkgateways_client.go index 958c8d837372..85a77912ff36 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_localnetworkgateways_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_localnetworkgateways_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *LocalNetworkGatewaysClient) createOrUpdateCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -144,7 +144,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -180,7 +180,7 @@ func (client *LocalNetworkGatewaysClient) deleteCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -228,7 +228,7 @@ func (client *LocalNetworkGatewaysClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -245,7 +245,7 @@ func (client *LocalNetworkGatewaysClient) getHandleResponse(resp *http.Response) // NewListPager - Gets all the local network gateways in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - LocalNetworkGatewaysClientListOptions contains the optional parameters for the LocalNetworkGatewaysClient.List // method. @@ -293,7 +293,7 @@ func (client *LocalNetworkGatewaysClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -310,7 +310,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -351,7 +351,7 @@ func (client *LocalNetworkGatewaysClient) updateTagsCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_management_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_management_client.go index d21e0355a897..7fcdb1acc06d 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_management_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_management_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -94,7 +94,7 @@ func (client *ManagementClient) checkDNSNameAvailabilityCreateRequest(ctx contex } reqQP := req.Raw().URL.Query() reqQP.Set("domainNameLabel", domainNameLabel) - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -111,7 +111,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -133,7 +133,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -169,7 +169,7 @@ func (client *ManagementClient) deleteBastionShareableLinkCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, bslRequest) @@ -177,7 +177,7 @@ func (client *ManagementClient) deleteBastionShareableLinkCreateRequest(ctx cont // NewDisconnectActiveSessionsPager - Returns the list of currently active sessions on the Bastion. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // bastionHostName - The name of the Bastion Host. // sessionIDs - The list of sessionids to disconnect. @@ -231,7 +231,7 @@ func (client *ManagementClient) disconnectActiveSessionsCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, sessionIDs) @@ -246,10 +246,62 @@ func (client *ManagementClient) disconnectActiveSessionsHandleResponse(resp *htt return result, nil } +// ExpressRouteProviderPort - Retrieves detail of a provider port. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-01-01 +// 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 { + return ManagementClientExpressRouteProviderPortResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ManagementClientExpressRouteProviderPortResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ManagementClientExpressRouteProviderPortResponse{}, runtime.NewResponseError(resp) + } + return client.expressRouteProviderPortHandleResponse(resp) +} + +// expressRouteProviderPortCreateRequest creates the ExpressRouteProviderPort request. +func (client *ManagementClient) expressRouteProviderPortCreateRequest(ctx context.Context, providerport string, options *ManagementClientExpressRouteProviderPortOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteProviderPorts/{providerport}" + if providerport == "" { + return nil, errors.New("parameter providerport cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{providerport}", url.PathEscape(providerport)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// expressRouteProviderPortHandleResponse handles the ExpressRouteProviderPort response. +func (client *ManagementClient) expressRouteProviderPortHandleResponse(resp *http.Response) (ManagementClientExpressRouteProviderPortResponse, error) { + result := ManagementClientExpressRouteProviderPortResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteProviderPort); err != nil { + return ManagementClientExpressRouteProviderPortResponse{}, err + } + return result, nil +} + // 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -272,7 +324,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -308,7 +360,7 @@ func (client *ManagementClient) generatevirtualwanvpnserverconfigurationvpnprofi return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, vpnClientParams) @@ -316,7 +368,7 @@ func (client *ManagementClient) generatevirtualwanvpnserverconfigurationvpnprofi // BeginGetActiveSessions - Returns the list of currently active sessions on the Bastion. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -359,7 +411,7 @@ func (client *ManagementClient) BeginGetActiveSessions(ctx context.Context, reso // GetActiveSessions - Returns the list of currently active sessions on the Bastion. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -395,7 +447,7 @@ func (client *ManagementClient) getActiveSessionsCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -412,7 +464,7 @@ func (client *ManagementClient) getActiveSessionsHandleResponse(resp *http.Respo // NewGetBastionShareableLinkPager - Return 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -466,7 +518,7 @@ func (client *ManagementClient) getBastionShareableLinkCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, bslRequest) @@ -483,7 +535,7 @@ func (client *ManagementClient) getBastionShareableLinkHandleResponse(resp *http // BeginPutBastionShareableLink - Creates a 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -527,7 +579,7 @@ func (client *ManagementClient) BeginPutBastionShareableLink(ctx context.Context // PutBastionShareableLink - Creates a 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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -563,7 +615,7 @@ func (client *ManagementClient) putBastionShareableLinkCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, bslRequest) @@ -580,7 +632,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -620,7 +672,7 @@ func (client *ManagementClient) supportedSecurityProvidersCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_models.go b/sdk/resourcemanager/network/armnetwork/zz_generated_models.go index ae82cd512bb5..1e6d25fff0ac 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_models.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_models.go @@ -1339,6 +1339,9 @@ type ApplicationGatewayRoutingRule struct { // ApplicationGatewayRoutingRulePropertiesFormat - Properties of routing rule of the application gateway. type ApplicationGatewayRoutingRulePropertiesFormat struct { + // REQUIRED; Priority of the routing rule. + Priority *int32 `json:"priority,omitempty"` + // Backend address pool resource of the application gateway. BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` @@ -4461,6 +4464,9 @@ type ExplicitProxySettings struct { // When set to true, explicit proxy mode is enabled. EnableExplicitProxy *bool `json:"enableExplicitProxy,omitempty"` + // When set to true, pac file port and url needs to be provided. + EnablePacFile *bool `json:"enablePacFile,omitempty"` + // Port number for explicit proxy http protocol, cannot be greater than 64000. HTTPPort *int32 `json:"httpPort,omitempty"` @@ -5753,6 +5759,73 @@ type ExpressRoutePortsLocationsClientListOptions struct { // placeholder for future optional parameters } +// ExpressRouteProviderPort resource. +type ExpressRouteProviderPort struct { + // Resource ID. + ID *string `json:"id,omitempty"` + + // Resource location. + Location *string `json:"location,omitempty"` + + // Properties of the express route Service Provider Port. + Properties *ExpressRouteProviderPortProperties `json:"properties,omitempty"` + + // Resource tags. + Tags map[string]*string `json:"tags,omitempty"` + + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty" azure:"ro"` + + // READ-ONLY; Resource name. + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Resource type. + Type *string `json:"type,omitempty" azure:"ro"` +} + +// ExpressRouteProviderPortListResult - Response for ListExpressRouteProviderPort API service call. +type ExpressRouteProviderPortListResult struct { + // A list of ExpressRouteProviderPort resources. + Value []*ExpressRouteProviderPort `json:"value,omitempty"` + + // READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty" azure:"ro"` +} + +// ExpressRouteProviderPortProperties - Properties of ExpressRouteProviderPort. +type ExpressRouteProviderPortProperties struct { + // Overprovisioning factor for the port pair. + OverprovisionFactor *int32 `json:"overprovisionFactor,omitempty"` + + // The peering location of the port pair. + PeeringLocation *string `json:"peeringLocation,omitempty"` + + // Bandwidth of the port in Mbps + PortBandwidthInMbps *int32 `json:"portBandwidthInMbps,omitempty"` + + // Remaining Bandwidth of the port in Mbps + RemainingBandwidthInMbps *int32 `json:"remainingBandwidthInMbps,omitempty"` + + // Used Bandwidth of the port in Mbps + UsedBandwidthInMbps *int32 `json:"usedBandwidthInMbps,omitempty"` + + // READ-ONLY; The name of the port pair. + PortPairDescriptor *string `json:"portPairDescriptor,omitempty" azure:"ro"` + + // READ-ONLY; The name of the primary port. + PrimaryAzurePort *string `json:"primaryAzurePort,omitempty" azure:"ro"` + + // READ-ONLY; The name of the secondary port. + SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty" azure:"ro"` +} + +// ExpressRouteProviderPortsLocationClientListOptions contains the optional parameters for the ExpressRouteProviderPortsLocationClient.List +// method. +type ExpressRouteProviderPortsLocationClientListOptions struct { + // The filter to apply on the operation. For example, you can use $filter=location eq '{state}'. + Filter *string +} + // ExpressRouteServiceProvider - A ExpressRouteResourceProvider object. type ExpressRouteServiceProvider struct { // Resource ID. @@ -8563,6 +8636,12 @@ type ManagementClientDisconnectActiveSessionsOptions struct { // placeholder for future optional parameters } +// ManagementClientExpressRouteProviderPortOptions contains the optional parameters for the ManagementClient.ExpressRouteProviderPort +// method. +type ManagementClientExpressRouteProviderPortOptions struct { + // placeholder for future optional parameters +} + // ManagementClientGetBastionShareableLinkOptions contains the optional parameters for the ManagementClient.GetBastionShareableLink // method. type ManagementClientGetBastionShareableLinkOptions struct { @@ -13737,6 +13816,9 @@ type VirtualHubProperties struct { // VirtualRouter ASN. VirtualRouterAsn *int64 `json:"virtualRouterAsn,omitempty"` + // The VirtualHub Router autoscale configuration. + VirtualRouterAutoScaleConfiguration *VirtualRouterAutoScaleConfiguration `json:"virtualRouterAutoScaleConfiguration,omitempty"` + // VirtualRouter IPs. VirtualRouterIPs []*string `json:"virtualRouterIps,omitempty"` @@ -14947,6 +15029,12 @@ type VirtualRouter struct { Type *string `json:"type,omitempty" azure:"ro"` } +// VirtualRouterAutoScaleConfiguration - The VirtualHub Router autoscale configuration. +type VirtualRouterAutoScaleConfiguration struct { + // The minimum number of scale units for VirtualHub Router. + MinCapacity *int32 `json:"minCapacity,omitempty"` +} + // VirtualRouterListResult - Response for ListVirtualRouters API service call. type VirtualRouterListResult struct { // URL to get the next set of results. diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_models_serde.go b/sdk/resourcemanager/network/armnetwork/zz_generated_models_serde.go index b18c1cd72d03..845a349ea729 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_models_serde.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_models_serde.go @@ -1258,6 +1258,19 @@ func (e ExpressRoutePortsLocationPropertiesFormat) MarshalJSON() ([]byte, error) return json.Marshal(objectMap) } +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteProviderPort. +func (e ExpressRouteProviderPort) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", e.Etag) + populate(objectMap, "id", e.ID) + populate(objectMap, "location", e.Location) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "tags", e.Tags) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + // MarshalJSON implements the json.Marshaller interface for type ExpressRouteServiceProvider. func (e ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) @@ -3099,6 +3112,7 @@ func (v VirtualHubProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "vpnGateway", v.VPNGateway) populate(objectMap, "virtualHubRouteTableV2s", v.VirtualHubRouteTableV2S) populate(objectMap, "virtualRouterAsn", v.VirtualRouterAsn) + populate(objectMap, "virtualRouterAutoScaleConfiguration", v.VirtualRouterAutoScaleConfiguration) populate(objectMap, "virtualRouterIps", v.VirtualRouterIPs) populate(objectMap, "virtualWan", v.VirtualWan) return json.Marshal(objectMap) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_natgateways_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_natgateways_client.go index b3eb68d46745..6a8c99c11cbd 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_natgateways_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_natgateways_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *NatGatewaysClient) createOrUpdateCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -143,7 +143,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -179,7 +179,7 @@ func (client *NatGatewaysClient) deleteCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -187,7 +187,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -226,7 +226,7 @@ func (client *NatGatewaysClient) getCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -246,7 +246,7 @@ func (client *NatGatewaysClient) getHandleResponse(resp *http.Response) (NatGate // NewListPager - Gets all nat gateways in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - NatGatewaysClientListOptions contains the optional parameters for the NatGatewaysClient.List method. func (client *NatGatewaysClient) NewListPager(resourceGroupName string, options *NatGatewaysClientListOptions) *runtime.Pager[NatGatewaysClientListResponse] { @@ -293,7 +293,7 @@ func (client *NatGatewaysClient) listCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -310,7 +310,7 @@ func (client *NatGatewaysClient) listHandleResponse(resp *http.Response) (NatGat // NewListAllPager - Gets all the Nat Gateways in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - NatGatewaysClientListAllOptions contains the optional parameters for the NatGatewaysClient.ListAll method. func (client *NatGatewaysClient) NewListAllPager(options *NatGatewaysClientListAllOptions) *runtime.Pager[NatGatewaysClientListAllResponse] { return runtime.NewPager(runtime.PagingHandler[NatGatewaysClientListAllResponse]{ @@ -352,7 +352,7 @@ func (client *NatGatewaysClient) listAllCreateRequest(ctx context.Context, optio return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -369,7 +369,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // natGatewayName - The name of the nat gateway. // parameters - Parameters supplied to update nat gateway tags. @@ -409,7 +409,7 @@ func (client *NatGatewaysClient) updateTagsCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_natrules_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_natrules_client.go index d0c35ee30181..3d138894655d 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_natrules_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_natrules_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the VpnGateway. // gatewayName - The name of the gateway. // natRuleName - The name of the nat rule. @@ -80,7 +80,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -120,7 +120,7 @@ func (client *NatRulesClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, natRuleParameters) @@ -128,7 +128,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the VpnGateway. // gatewayName - The name of the gateway. // natRuleName - The name of the nat rule. @@ -149,7 +149,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -189,7 +189,7 @@ func (client *NatRulesClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -197,7 +197,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the VpnGateway. // gatewayName - The name of the gateway. // natRuleName - The name of the nat rule. @@ -241,7 +241,7 @@ func (client *NatRulesClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -258,7 +258,7 @@ func (client *NatRulesClient) getHandleResponse(resp *http.Response) (NatRulesCl // NewListByVPNGatewayPager - Retrieves all nat rules for a particular virtual wan vpn gateway. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -311,7 +311,7 @@ func (client *NatRulesClient) listByVPNGatewayCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_operations_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_operations_client.go index 1e2a96a7bce8..0507db265566 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_operations_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_operations_client.go @@ -50,7 +50,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists all of the available Network Rest API operations. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ @@ -88,7 +88,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_p2svpngateways_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_p2svpngateways_client.go index 6670746fb137..fbcfa4316bcf 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_p2svpngateways_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_p2svpngateways_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *P2SVPNGatewaysClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, p2SVPNGatewayParameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -144,7 +144,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -180,7 +180,7 @@ func (client *P2SVPNGatewaysClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -189,7 +189,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -212,7 +212,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -248,7 +248,7 @@ func (client *P2SVPNGatewaysClient) disconnectP2SVPNConnectionsCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, request) @@ -256,7 +256,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -278,7 +278,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -314,7 +314,7 @@ func (client *P2SVPNGatewaysClient) generateVPNProfileCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -322,7 +322,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -361,7 +361,7 @@ func (client *P2SVPNGatewaysClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -379,7 +379,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // gatewayName - The name of the P2SVpnGateway. // options - P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginGetP2SVPNConnectionHealth @@ -401,7 +401,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -437,7 +437,7 @@ func (client *P2SVPNGatewaysClient) getP2SVPNConnectionHealthCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -446,7 +446,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -469,7 +469,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -505,7 +505,7 @@ func (client *P2SVPNGatewaysClient) getP2SVPNConnectionHealthDetailedCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, request) @@ -513,7 +513,7 @@ func (client *P2SVPNGatewaysClient) getP2SVPNConnectionHealthDetailedCreateReque // NewListPager - Lists all the P2SVpnGateways in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - P2SVPNGatewaysClientListOptions contains the optional parameters for the P2SVPNGatewaysClient.List method. func (client *P2SVPNGatewaysClient) NewListPager(options *P2SVPNGatewaysClientListOptions) *runtime.Pager[P2SVPNGatewaysClientListResponse] { return runtime.NewPager(runtime.PagingHandler[P2SVPNGatewaysClientListResponse]{ @@ -555,7 +555,7 @@ func (client *P2SVPNGatewaysClient) listCreateRequest(ctx context.Context, optio return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -572,7 +572,7 @@ func (client *P2SVPNGatewaysClient) listHandleResponse(resp *http.Response) (P2S // NewListByResourceGroupPager - Lists all the P2SVpnGateways in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the P2SVpnGateway. // options - P2SVPNGatewaysClientListByResourceGroupOptions contains the optional parameters for the P2SVPNGatewaysClient.ListByResourceGroup // method. @@ -620,7 +620,7 @@ func (client *P2SVPNGatewaysClient) listByResourceGroupCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -637,7 +637,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -658,7 +658,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -694,7 +694,7 @@ func (client *P2SVPNGatewaysClient) resetCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -702,7 +702,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -724,7 +724,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -760,7 +760,7 @@ func (client *P2SVPNGatewaysClient) updateTagsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, p2SVPNGatewayParameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_packetcaptures_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_packetcaptures_client.go index 3ff62f07a5fa..8f9187fc8ef7 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_packetcaptures_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_packetcaptures_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // networkWatcherName - The name of the network watcher. // packetCaptureName - The name of the packet capture session. @@ -80,7 +80,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -120,7 +120,7 @@ func (client *PacketCapturesClient) createCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -128,7 +128,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // networkWatcherName - The name of the network watcher. // packetCaptureName - The name of the packet capture session. @@ -150,7 +150,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -190,7 +190,7 @@ func (client *PacketCapturesClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -198,7 +198,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // networkWatcherName - The name of the network watcher. // packetCaptureName - The name of the packet capture session. @@ -242,7 +242,7 @@ func (client *PacketCapturesClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -259,7 +259,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -281,7 +281,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -321,7 +321,7 @@ func (client *PacketCapturesClient) getStatusCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -329,7 +329,7 @@ func (client *PacketCapturesClient) getStatusCreateRequest(ctx context.Context, // NewListPager - Lists all packet capture sessions within the specified resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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. @@ -375,7 +375,7 @@ func (client *PacketCapturesClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -392,7 +392,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // networkWatcherName - The name of the network watcher. // packetCaptureName - The name of the packet capture session. @@ -414,7 +414,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -454,7 +454,7 @@ func (client *PacketCapturesClient) stopCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_peerexpressroutecircuitconnections_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_peerexpressroutecircuitconnections_client.go index c37c56d70530..e84aaff2d53f 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_peerexpressroutecircuitconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_peerexpressroutecircuitconnections_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // circuitName - The name of the express route circuit. // peeringName - The name of the peering. @@ -107,7 +107,7 @@ func (client *PeerExpressRouteCircuitConnectionsClient) getCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -124,7 +124,7 @@ func (client *PeerExpressRouteCircuitConnectionsClient) getHandleResponse(resp * // NewListPager - Gets all global reach peer connections associated with a private peering in an express route circuit. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // circuitName - The name of the circuit. // peeringName - The name of the peering. @@ -182,7 +182,7 @@ func (client *PeerExpressRouteCircuitConnectionsClient) listCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_privatednszonegroups_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_privatednszonegroups_client.go index 98e796592717..2aeaa93b9143 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_privatednszonegroups_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_privatednszonegroups_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // privateEndpointName - The name of the private endpoint. // privateDNSZoneGroupName - The name of the private dns zone group. @@ -80,7 +80,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -120,7 +120,7 @@ func (client *PrivateDNSZoneGroupsClient) createOrUpdateCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -128,7 +128,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // privateEndpointName - The name of the private endpoint. // privateDNSZoneGroupName - The name of the private dns zone group. @@ -150,7 +150,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -190,7 +190,7 @@ func (client *PrivateDNSZoneGroupsClient) deleteCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -198,7 +198,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // privateEndpointName - The name of the private endpoint. // privateDNSZoneGroupName - The name of the private dns zone group. @@ -243,7 +243,7 @@ func (client *PrivateDNSZoneGroupsClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -260,7 +260,7 @@ func (client *PrivateDNSZoneGroupsClient) getHandleResponse(resp *http.Response) // NewListPager - Gets all private dns zone groups in a private endpoint. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -313,7 +313,7 @@ func (client *PrivateDNSZoneGroupsClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_privateendpoints_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_privateendpoints_client.go index 951efeebc3bd..ae145858c2ad 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_privateendpoints_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_privateendpoints_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *PrivateEndpointsClient) createOrUpdateCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -144,7 +144,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -180,7 +180,7 @@ func (client *PrivateEndpointsClient) deleteCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -227,7 +227,7 @@ func (client *PrivateEndpointsClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -247,7 +247,7 @@ func (client *PrivateEndpointsClient) getHandleResponse(resp *http.Response) (Pr // NewListPager - Gets all private endpoints in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - PrivateEndpointsClientListOptions contains the optional parameters for the PrivateEndpointsClient.List method. func (client *PrivateEndpointsClient) NewListPager(resourceGroupName string, options *PrivateEndpointsClientListOptions) *runtime.Pager[PrivateEndpointsClientListResponse] { @@ -294,7 +294,7 @@ func (client *PrivateEndpointsClient) listCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -311,7 +311,7 @@ func (client *PrivateEndpointsClient) listHandleResponse(resp *http.Response) (P // NewListBySubscriptionPager - Gets all private endpoints in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - PrivateEndpointsClientListBySubscriptionOptions contains the optional parameters for the PrivateEndpointsClient.ListBySubscription // method. func (client *PrivateEndpointsClient) NewListBySubscriptionPager(options *PrivateEndpointsClientListBySubscriptionOptions) *runtime.Pager[PrivateEndpointsClientListBySubscriptionResponse] { @@ -354,7 +354,7 @@ func (client *PrivateEndpointsClient) listBySubscriptionCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_privatelinkservices_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_privatelinkservices_client.go index 11f8b25461bf..a32ee791061e 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_privatelinkservices_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_privatelinkservices_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // location - The location of the domain name. // parameters - The request body of CheckPrivateLinkService API call. // options - PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityOptions contains the optional parameters for the @@ -78,7 +78,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -110,7 +110,7 @@ func (client *PrivateLinkServicesClient) checkPrivateLinkServiceVisibilityCreate return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -119,7 +119,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // location - The location of the domain name. // resourceGroupName - The name of the resource group. // parameters - The request body of CheckPrivateLinkService API call. @@ -142,7 +142,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -178,7 +178,7 @@ func (client *PrivateLinkServicesClient) checkPrivateLinkServiceVisibilityByReso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -186,7 +186,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -208,7 +208,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -244,7 +244,7 @@ func (client *PrivateLinkServicesClient) createOrUpdateCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -252,7 +252,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -273,7 +273,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -309,7 +309,7 @@ func (client *PrivateLinkServicesClient) deleteCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -317,7 +317,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -339,7 +339,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -379,7 +379,7 @@ func (client *PrivateLinkServicesClient) deletePrivateEndpointConnectionCreateRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -387,7 +387,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -426,7 +426,7 @@ func (client *PrivateLinkServicesClient) getCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -447,7 +447,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -492,7 +492,7 @@ func (client *PrivateLinkServicesClient) getPrivateEndpointConnectionCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -512,7 +512,7 @@ func (client *PrivateLinkServicesClient) getPrivateEndpointConnectionHandleRespo // NewListPager - Gets all private link services in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - PrivateLinkServicesClientListOptions contains the optional parameters for the PrivateLinkServicesClient.List // method. @@ -560,7 +560,7 @@ func (client *PrivateLinkServicesClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -578,7 +578,7 @@ 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. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // location - The location of the domain name. // options - PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesOptions contains the optional parameters for the // PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServices method. @@ -626,7 +626,7 @@ func (client *PrivateLinkServicesClient) listAutoApprovedPrivateLinkServicesCrea return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -644,7 +644,7 @@ 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. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // location - The location of the domain name. // resourceGroupName - The name of the resource group. // options - PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupOptions contains the optional parameters @@ -697,7 +697,7 @@ func (client *PrivateLinkServicesClient) listAutoApprovedPrivateLinkServicesByRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -714,7 +714,7 @@ func (client *PrivateLinkServicesClient) listAutoApprovedPrivateLinkServicesByRe // NewListBySubscriptionPager - Gets all private link service in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - PrivateLinkServicesClientListBySubscriptionOptions contains the optional parameters for the PrivateLinkServicesClient.ListBySubscription // method. func (client *PrivateLinkServicesClient) NewListBySubscriptionPager(options *PrivateLinkServicesClientListBySubscriptionOptions) *runtime.Pager[PrivateLinkServicesClientListBySubscriptionResponse] { @@ -757,7 +757,7 @@ func (client *PrivateLinkServicesClient) listBySubscriptionCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -774,7 +774,7 @@ func (client *PrivateLinkServicesClient) listBySubscriptionHandleResponse(resp * // NewListPrivateEndpointConnectionsPager - Gets all private end point connections for a specific private link service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -827,7 +827,7 @@ func (client *PrivateLinkServicesClient) listPrivateEndpointConnectionsCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -844,7 +844,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -890,7 +890,7 @@ func (client *PrivateLinkServicesClient) updatePrivateEndpointConnectionCreateRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_profiles_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_profiles_client.go index 308053aa2e4b..6ad37733977d 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_profiles_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_profiles_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -97,7 +97,7 @@ func (client *ProfilesClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -114,7 +114,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -134,7 +134,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -170,7 +170,7 @@ func (client *ProfilesClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -178,7 +178,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -217,7 +217,7 @@ func (client *ProfilesClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -237,7 +237,7 @@ func (client *ProfilesClient) getHandleResponse(resp *http.Response) (ProfilesCl // NewListPager - Gets all network profiles in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - ProfilesClientListOptions contains the optional parameters for the ProfilesClient.List method. func (client *ProfilesClient) NewListPager(resourceGroupName string, options *ProfilesClientListOptions) *runtime.Pager[ProfilesClientListResponse] { @@ -284,7 +284,7 @@ func (client *ProfilesClient) listCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -301,7 +301,7 @@ func (client *ProfilesClient) listHandleResponse(resp *http.Response) (ProfilesC // NewListAllPager - Gets all the network profiles in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - ProfilesClientListAllOptions contains the optional parameters for the ProfilesClient.ListAll method. func (client *ProfilesClient) NewListAllPager(options *ProfilesClientListAllOptions) *runtime.Pager[ProfilesClientListAllResponse] { return runtime.NewPager(runtime.PagingHandler[ProfilesClientListAllResponse]{ @@ -343,7 +343,7 @@ func (client *ProfilesClient) listAllCreateRequest(ctx context.Context, options return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -360,7 +360,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // networkProfileName - The name of the network profile. // parameters - Parameters supplied to update network profile tags. @@ -400,7 +400,7 @@ func (client *ProfilesClient) updateTagsCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_publicipaddresses_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_publicipaddresses_client.go index af68da9ea38e..2a1d0ff989bf 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_publicipaddresses_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_publicipaddresses_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *PublicIPAddressesClient) createOrUpdateCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -123,7 +123,7 @@ func (client *PublicIPAddressesClient) createOrUpdateCreateRequest(ctx context.C // BeginDelete - Deletes the specified public IP address. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -144,7 +144,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -180,7 +180,7 @@ func (client *PublicIPAddressesClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -227,7 +227,7 @@ func (client *PublicIPAddressesClient) getCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -247,7 +247,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // cloudServiceName - The name of the cloud service. // roleInstanceName - The role instance name. @@ -307,7 +307,7 @@ func (client *PublicIPAddressesClient) getCloudServicePublicIPAddressCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -327,7 +327,7 @@ 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 2021-08-01 +// 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. @@ -387,7 +387,7 @@ func (client *PublicIPAddressesClient) getVirtualMachineScaleSetPublicIPAddressC return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2018-10-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -407,7 +407,7 @@ func (client *PublicIPAddressesClient) getVirtualMachineScaleSetPublicIPAddressH // NewListPager - Gets all public IP addresses in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - PublicIPAddressesClientListOptions contains the optional parameters for the PublicIPAddressesClient.List method. func (client *PublicIPAddressesClient) NewListPager(resourceGroupName string, options *PublicIPAddressesClientListOptions) *runtime.Pager[PublicIPAddressesClientListResponse] { @@ -454,7 +454,7 @@ func (client *PublicIPAddressesClient) listCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -471,7 +471,7 @@ func (client *PublicIPAddressesClient) listHandleResponse(resp *http.Response) ( // NewListAllPager - Gets all the public IP addresses in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - PublicIPAddressesClientListAllOptions contains the optional parameters for the PublicIPAddressesClient.ListAll // method. func (client *PublicIPAddressesClient) NewListAllPager(options *PublicIPAddressesClientListAllOptions) *runtime.Pager[PublicIPAddressesClientListAllResponse] { @@ -514,7 +514,7 @@ func (client *PublicIPAddressesClient) listAllCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -531,7 +531,7 @@ func (client *PublicIPAddressesClient) listAllHandleResponse(resp *http.Response // NewListCloudServicePublicIPAddressesPager - Gets information about all public IP addresses on a cloud service level. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -584,7 +584,7 @@ func (client *PublicIPAddressesClient) listCloudServicePublicIPAddressesCreateRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -602,7 +602,7 @@ func (client *PublicIPAddressesClient) listCloudServicePublicIPAddressesHandleRe // NewListCloudServiceRoleInstancePublicIPAddressesPager - Gets information about all public IP addresses in a role instance // IP configuration in a cloud service. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // cloudServiceName - The name of the cloud service. // roleInstanceName - The name of role instance. @@ -670,7 +670,7 @@ func (client *PublicIPAddressesClient) listCloudServiceRoleInstancePublicIPAddre return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -688,7 +688,7 @@ func (client *PublicIPAddressesClient) listCloudServiceRoleInstancePublicIPAddre // NewListVirtualMachineScaleSetPublicIPAddressesPager - Gets information about all public IP addresses on a virtual machine // scale set level. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// 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 @@ -741,7 +741,7 @@ func (client *PublicIPAddressesClient) listVirtualMachineScaleSetPublicIPAddress return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2018-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -759,7 +759,7 @@ func (client *PublicIPAddressesClient) listVirtualMachineScaleSetPublicIPAddress // NewListVirtualMachineScaleSetVMPublicIPAddressesPager - Gets information about all public IP addresses in a virtual machine // IP configuration in a virtual machine scale set. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// 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. @@ -827,7 +827,7 @@ func (client *PublicIPAddressesClient) listVirtualMachineScaleSetVMPublicIPAddre return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2018-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -844,7 +844,7 @@ func (client *PublicIPAddressesClient) listVirtualMachineScaleSetVMPublicIPAddre // UpdateTags - Updates public IP address tags. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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. @@ -885,7 +885,7 @@ func (client *PublicIPAddressesClient) updateTagsCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_publicipprefixes_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_publicipprefixes_client.go index e7aef074a3a4..3ad9318bd698 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_publicipprefixes_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_publicipprefixes_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *PublicIPPrefixesClient) createOrUpdateCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // publicIPPrefixName - The name of the PublicIpPrefix. // options - PublicIPPrefixesClientBeginDeleteOptions contains the optional parameters for the PublicIPPrefixesClient.BeginDelete @@ -144,7 +144,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -180,7 +180,7 @@ func (client *PublicIPPrefixesClient) deleteCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -227,7 +227,7 @@ func (client *PublicIPPrefixesClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -247,7 +247,7 @@ func (client *PublicIPPrefixesClient) getHandleResponse(resp *http.Response) (Pu // NewListPager - Gets all public IP prefixes in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - PublicIPPrefixesClientListOptions contains the optional parameters for the PublicIPPrefixesClient.List method. func (client *PublicIPPrefixesClient) NewListPager(resourceGroupName string, options *PublicIPPrefixesClientListOptions) *runtime.Pager[PublicIPPrefixesClientListResponse] { @@ -294,7 +294,7 @@ func (client *PublicIPPrefixesClient) listCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -311,7 +311,7 @@ func (client *PublicIPPrefixesClient) listHandleResponse(resp *http.Response) (P // NewListAllPager - Gets all the public IP prefixes in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - PublicIPPrefixesClientListAllOptions contains the optional parameters for the PublicIPPrefixesClient.ListAll // method. func (client *PublicIPPrefixesClient) NewListAllPager(options *PublicIPPrefixesClientListAllOptions) *runtime.Pager[PublicIPPrefixesClientListAllResponse] { @@ -354,7 +354,7 @@ func (client *PublicIPPrefixesClient) listAllCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -371,7 +371,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -412,7 +412,7 @@ func (client *PublicIPPrefixesClient) updateTagsCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_resourcenavigationlinks_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_resourcenavigationlinks_client.go index 0c229e7ae370..f20c3cabb680 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_resourcenavigationlinks_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_resourcenavigationlinks_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // virtualNetworkName - The name of the virtual network. // subnetName - The name of the subnet. @@ -102,7 +102,7 @@ func (client *ResourceNavigationLinksClient) listCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_response_types.go b/sdk/resourcemanager/network/armnetwork/zz_generated_response_types.go index 20758ab2dcbe..86667ecd2348 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_response_types.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_response_types.go @@ -733,6 +733,11 @@ type ExpressRoutePortsLocationsClientListResponse struct { ExpressRoutePortsLocationListResult } +// ExpressRouteProviderPortsLocationClientListResponse contains the response from method ExpressRouteProviderPortsLocationClient.List. +type ExpressRouteProviderPortsLocationClientListResponse struct { + ExpressRouteProviderPortListResult +} + // ExpressRouteServiceProvidersClientListResponse contains the response from method ExpressRouteServiceProvidersClient.List. type ExpressRouteServiceProvidersClientListResponse struct { ExpressRouteServiceProviderListResult @@ -1228,6 +1233,11 @@ type ManagementClientDisconnectActiveSessionsResponse struct { BastionSessionDeleteResult } +// ManagementClientExpressRouteProviderPortResponse contains the response from method ManagementClient.ExpressRouteProviderPort. +type ManagementClientExpressRouteProviderPortResponse struct { + ExpressRouteProviderPort +} + // ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse contains the response from method ManagementClient.Generatevirtualwanvpnserverconfigurationvpnprofile. type ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse struct { VPNProfileResponse diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_routefilterrules_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_routefilterrules_client.go index ee5142cd381a..93dc5c71d17b 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_routefilterrules_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_routefilterrules_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // routeFilterName - The name of the route filter. // ruleName - The name of the route filter rule. @@ -80,7 +80,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -120,7 +120,7 @@ func (client *RouteFilterRulesClient) createOrUpdateCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, routeFilterRuleParameters) @@ -128,7 +128,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // routeFilterName - The name of the route filter. // ruleName - The name of the rule. @@ -150,7 +150,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -190,7 +190,7 @@ func (client *RouteFilterRulesClient) deleteCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -198,7 +198,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // routeFilterName - The name of the route filter. // ruleName - The name of the rule. @@ -242,7 +242,7 @@ func (client *RouteFilterRulesClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -259,7 +259,7 @@ func (client *RouteFilterRulesClient) getHandleResponse(resp *http.Response) (Ro // NewListByRouteFilterPager - Gets all RouteFilterRules in a route filter. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -312,7 +312,7 @@ func (client *RouteFilterRulesClient) listByRouteFilterCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_routefilters_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_routefilters_client.go index 6e131dc64b50..cf89eabad4c9 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_routefilters_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_routefilters_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *RouteFiltersClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, routeFilterParameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -144,7 +144,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -180,7 +180,7 @@ func (client *RouteFiltersClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -227,7 +227,7 @@ func (client *RouteFiltersClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -247,7 +247,7 @@ func (client *RouteFiltersClient) getHandleResponse(resp *http.Response) (RouteF // NewListPager - Gets all route filters in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - RouteFiltersClientListOptions contains the optional parameters for the RouteFiltersClient.List method. func (client *RouteFiltersClient) NewListPager(options *RouteFiltersClientListOptions) *runtime.Pager[RouteFiltersClientListResponse] { return runtime.NewPager(runtime.PagingHandler[RouteFiltersClientListResponse]{ @@ -289,7 +289,7 @@ func (client *RouteFiltersClient) listCreateRequest(ctx context.Context, options return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -306,7 +306,7 @@ func (client *RouteFiltersClient) listHandleResponse(resp *http.Response) (Route // NewListByResourceGroupPager - Gets all route filters in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - RouteFiltersClientListByResourceGroupOptions contains the optional parameters for the RouteFiltersClient.ListByResourceGroup // method. @@ -354,7 +354,7 @@ func (client *RouteFiltersClient) listByResourceGroupCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -371,7 +371,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // routeFilterName - The name of the route filter. // parameters - Parameters supplied to update route filter tags. @@ -411,7 +411,7 @@ func (client *RouteFiltersClient) updateTagsCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_routes_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_routes_client.go index 3236cf164743..e79f9fb22726 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_routes_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_routes_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // routeTableName - The name of the route table. // routeName - The name of the route. @@ -80,7 +80,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -120,7 +120,7 @@ func (client *RoutesClient) createOrUpdateCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, routeParameters) @@ -128,7 +128,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // routeTableName - The name of the route table. // routeName - The name of the route. @@ -149,7 +149,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -189,7 +189,7 @@ func (client *RoutesClient) deleteCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -197,7 +197,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // routeTableName - The name of the route table. // routeName - The name of the route. @@ -241,7 +241,7 @@ func (client *RoutesClient) getCreateRequest(ctx context.Context, resourceGroupN return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -258,7 +258,7 @@ func (client *RoutesClient) getHandleResponse(resp *http.Response) (RoutesClient // NewListPager - Gets all routes in a route table. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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. @@ -310,7 +310,7 @@ func (client *RoutesClient) listCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_routetables_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_routetables_client.go index b847f669659b..c745a3a88b29 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_routetables_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_routetables_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *RouteTablesClient) createOrUpdateCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -143,7 +143,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -179,7 +179,7 @@ func (client *RouteTablesClient) deleteCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -187,7 +187,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -226,7 +226,7 @@ func (client *RouteTablesClient) getCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -246,7 +246,7 @@ func (client *RouteTablesClient) getHandleResponse(resp *http.Response) (RouteTa // NewListPager - Gets all route tables in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - RouteTablesClientListOptions contains the optional parameters for the RouteTablesClient.List method. func (client *RouteTablesClient) NewListPager(resourceGroupName string, options *RouteTablesClientListOptions) *runtime.Pager[RouteTablesClientListResponse] { @@ -293,7 +293,7 @@ func (client *RouteTablesClient) listCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -310,7 +310,7 @@ func (client *RouteTablesClient) listHandleResponse(resp *http.Response) (RouteT // NewListAllPager - Gets all route tables in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - RouteTablesClientListAllOptions contains the optional parameters for the RouteTablesClient.ListAll method. func (client *RouteTablesClient) NewListAllPager(options *RouteTablesClientListAllOptions) *runtime.Pager[RouteTablesClientListAllResponse] { return runtime.NewPager(runtime.PagingHandler[RouteTablesClientListAllResponse]{ @@ -352,7 +352,7 @@ func (client *RouteTablesClient) listAllCreateRequest(ctx context.Context, optio return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -369,7 +369,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // routeTableName - The name of the route table. // parameters - Parameters supplied to update route table tags. @@ -409,7 +409,7 @@ func (client *RouteTablesClient) updateTagsCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_routingintent_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_routingintent_client.go index 67b1dab9065c..de0639f664e8 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_routingintent_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_routingintent_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -80,7 +80,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -120,7 +120,7 @@ func (client *RoutingIntentClient) createOrUpdateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, routingIntentParameters) @@ -128,7 +128,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the RoutingIntent. // virtualHubName - The name of the VirtualHub. // routingIntentName - The name of the RoutingIntent. @@ -150,7 +150,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -190,7 +190,7 @@ func (client *RoutingIntentClient) deleteCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -198,7 +198,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the RoutingIntent. // virtualHubName - The name of the VirtualHub. // routingIntentName - The name of the RoutingIntent. @@ -242,7 +242,7 @@ func (client *RoutingIntentClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -259,7 +259,7 @@ func (client *RoutingIntentClient) getHandleResponse(resp *http.Response) (Routi // NewListPager - Retrieves the details of all RoutingIntent child resources of the VirtualHub. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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. @@ -311,7 +311,7 @@ func (client *RoutingIntentClient) listCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_securitygroups_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_securitygroups_client.go index 97a8b55ce91e..cec5cd1c4f0a 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_securitygroups_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_securitygroups_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *SecurityGroupsClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -144,7 +144,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -180,7 +180,7 @@ func (client *SecurityGroupsClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -227,7 +227,7 @@ func (client *SecurityGroupsClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -247,7 +247,7 @@ func (client *SecurityGroupsClient) getHandleResponse(resp *http.Response) (Secu // NewListPager - Gets all network security groups in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - SecurityGroupsClientListOptions contains the optional parameters for the SecurityGroupsClient.List method. func (client *SecurityGroupsClient) NewListPager(resourceGroupName string, options *SecurityGroupsClientListOptions) *runtime.Pager[SecurityGroupsClientListResponse] { @@ -294,7 +294,7 @@ func (client *SecurityGroupsClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -311,7 +311,7 @@ func (client *SecurityGroupsClient) listHandleResponse(resp *http.Response) (Sec // NewListAllPager - Gets all network security groups in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - SecurityGroupsClientListAllOptions contains the optional parameters for the SecurityGroupsClient.ListAll method. func (client *SecurityGroupsClient) NewListAllPager(options *SecurityGroupsClientListAllOptions) *runtime.Pager[SecurityGroupsClientListAllResponse] { return runtime.NewPager(runtime.PagingHandler[SecurityGroupsClientListAllResponse]{ @@ -353,7 +353,7 @@ func (client *SecurityGroupsClient) listAllCreateRequest(ctx context.Context, op return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -370,7 +370,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -411,7 +411,7 @@ func (client *SecurityGroupsClient) updateTagsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_securitypartnerproviders_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_securitypartnerproviders_client.go index 32671772096d..b74796bd2257 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_securitypartnerproviders_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_securitypartnerproviders_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *SecurityPartnerProvidersClient) createOrUpdateCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -144,7 +144,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -180,7 +180,7 @@ func (client *SecurityPartnerProvidersClient) deleteCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -228,7 +228,7 @@ func (client *SecurityPartnerProvidersClient) getCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -245,7 +245,7 @@ func (client *SecurityPartnerProvidersClient) getHandleResponse(resp *http.Respo // NewListPager - Gets all the Security Partner Providers in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - SecurityPartnerProvidersClientListOptions contains the optional parameters for the SecurityPartnerProvidersClient.List // method. func (client *SecurityPartnerProvidersClient) NewListPager(options *SecurityPartnerProvidersClientListOptions) *runtime.Pager[SecurityPartnerProvidersClientListResponse] { @@ -288,7 +288,7 @@ func (client *SecurityPartnerProvidersClient) listCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -305,7 +305,7 @@ func (client *SecurityPartnerProvidersClient) listHandleResponse(resp *http.Resp // NewListByResourceGroupPager - Lists all Security Partner Providers in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - SecurityPartnerProvidersClientListByResourceGroupOptions contains the optional parameters for the SecurityPartnerProvidersClient.ListByResourceGroup // method. @@ -353,7 +353,7 @@ func (client *SecurityPartnerProvidersClient) listByResourceGroupCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -370,7 +370,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -411,7 +411,7 @@ func (client *SecurityPartnerProvidersClient) updateTagsCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_securityrules_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_securityrules_client.go index 1108b968ec45..15eace598ca3 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_securityrules_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_securityrules_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // networkSecurityGroupName - The name of the network security group. // securityRuleName - The name of the security rule. @@ -80,7 +80,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -120,7 +120,7 @@ func (client *SecurityRulesClient) createOrUpdateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, securityRuleParameters) @@ -128,7 +128,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // networkSecurityGroupName - The name of the network security group. // securityRuleName - The name of the security rule. @@ -150,7 +150,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -190,7 +190,7 @@ func (client *SecurityRulesClient) deleteCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -198,7 +198,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // networkSecurityGroupName - The name of the network security group. // securityRuleName - The name of the security rule. @@ -242,7 +242,7 @@ func (client *SecurityRulesClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -259,7 +259,7 @@ func (client *SecurityRulesClient) getHandleResponse(resp *http.Response) (Secur // NewListPager - Gets all security rules in a network security group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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. @@ -311,7 +311,7 @@ func (client *SecurityRulesClient) listCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_serviceassociationlinks_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_serviceassociationlinks_client.go index 7b4730d7d5c7..ac59717626e3 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_serviceassociationlinks_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_serviceassociationlinks_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // virtualNetworkName - The name of the virtual network. // subnetName - The name of the subnet. @@ -102,7 +102,7 @@ func (client *ServiceAssociationLinksClient) listCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_serviceendpointpolicies_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_serviceendpointpolicies_client.go index 56a6b1df0e4a..ca36a5d4914f 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_serviceendpointpolicies_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_serviceendpointpolicies_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *ServiceEndpointPoliciesClient) createOrUpdateCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -144,7 +144,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -180,7 +180,7 @@ func (client *ServiceEndpointPoliciesClient) deleteCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -228,7 +228,7 @@ func (client *ServiceEndpointPoliciesClient) getCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -248,7 +248,7 @@ func (client *ServiceEndpointPoliciesClient) getHandleResponse(resp *http.Respon // NewListPager - Gets all the service endpoint policies in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - ServiceEndpointPoliciesClientListOptions contains the optional parameters for the ServiceEndpointPoliciesClient.List // method. func (client *ServiceEndpointPoliciesClient) NewListPager(options *ServiceEndpointPoliciesClientListOptions) *runtime.Pager[ServiceEndpointPoliciesClientListResponse] { @@ -291,7 +291,7 @@ func (client *ServiceEndpointPoliciesClient) listCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -308,7 +308,7 @@ func (client *ServiceEndpointPoliciesClient) listHandleResponse(resp *http.Respo // NewListByResourceGroupPager - Gets all service endpoint Policies in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - ServiceEndpointPoliciesClientListByResourceGroupOptions contains the optional parameters for the ServiceEndpointPoliciesClient.ListByResourceGroup // method. @@ -356,7 +356,7 @@ func (client *ServiceEndpointPoliciesClient) listByResourceGroupCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -373,7 +373,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -414,7 +414,7 @@ func (client *ServiceEndpointPoliciesClient) updateTagsCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_serviceendpointpolicydefinitions_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_serviceendpointpolicydefinitions_client.go index 6fd6584f4043..72fc797a6b69 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_serviceendpointpolicydefinitions_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_serviceendpointpolicydefinitions_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -80,7 +80,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -120,7 +120,7 @@ func (client *ServiceEndpointPolicyDefinitionsClient) createOrUpdateCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, serviceEndpointPolicyDefinitions) @@ -128,7 +128,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -150,7 +150,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -190,7 +190,7 @@ func (client *ServiceEndpointPolicyDefinitionsClient) deleteCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -198,7 +198,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -243,7 +243,7 @@ func (client *ServiceEndpointPolicyDefinitionsClient) getCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -260,7 +260,7 @@ func (client *ServiceEndpointPolicyDefinitionsClient) getHandleResponse(resp *ht // NewListByResourceGroupPager - Gets all service endpoint policy definitions in a service end point policy. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -313,7 +313,7 @@ func (client *ServiceEndpointPolicyDefinitionsClient) listByResourceGroupCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_servicetaginformation_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_servicetaginformation_client.go index 7530492f3fed..9b6770a29cef 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_servicetaginformation_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_servicetaginformation_client.go @@ -58,7 +58,7 @@ func NewServiceTagInformationClient(subscriptionID string, credential azcore.Tok // NewListPager - Gets a list of service tag information resources with pagination. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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). @@ -108,7 +108,7 @@ func (client *ServiceTagInformationClient) listCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") if options != nil && options.NoAddressPrefixes != nil { reqQP.Set("noAddressPrefixes", strconv.FormatBool(*options.NoAddressPrefixes)) } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_servicetags_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_servicetags_client.go index e02d3f546596..83a97f6753ea 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_servicetags_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_servicetags_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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). @@ -93,7 +93,7 @@ func (client *ServiceTagsClient) listCreateRequest(ctx context.Context, location return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_subnets_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_subnets_client.go index b26c0f68d0d6..ba24cae9c67f 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_subnets_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_subnets_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // virtualNetworkName - The name of the virtual network. // subnetName - The name of the subnet. @@ -80,7 +80,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -120,7 +120,7 @@ func (client *SubnetsClient) createOrUpdateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, subnetParameters) @@ -128,7 +128,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // virtualNetworkName - The name of the virtual network. // subnetName - The name of the subnet. @@ -149,7 +149,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -189,7 +189,7 @@ func (client *SubnetsClient) deleteCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -197,7 +197,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // virtualNetworkName - The name of the virtual network. // subnetName - The name of the subnet. @@ -241,7 +241,7 @@ func (client *SubnetsClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -261,7 +261,7 @@ func (client *SubnetsClient) getHandleResponse(resp *http.Response) (SubnetsClie // NewListPager - Gets all subnets in a virtual network. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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. @@ -313,7 +313,7 @@ func (client *SubnetsClient) listCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -330,7 +330,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // virtualNetworkName - The name of the virtual network. // subnetName - The name of the subnet. @@ -353,7 +353,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -393,7 +393,7 @@ func (client *SubnetsClient) prepareNetworkPoliciesCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, prepareNetworkPoliciesRequestParameters) @@ -401,7 +401,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // virtualNetworkName - The name of the virtual network. // subnetName - The name of the subnet. @@ -424,7 +424,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -464,7 +464,7 @@ func (client *SubnetsClient) unprepareNetworkPoliciesCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, unprepareNetworkPoliciesRequestParameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_usages_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_usages_client.go index 2b25139cbc4c..35bed3b1d7c1 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_usages_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_usages_client.go @@ -57,7 +57,7 @@ func NewUsagesClient(subscriptionID string, credential azcore.TokenCredential, o // NewListPager - List network usages for a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // location - The location where resource usage is queried. // options - UsagesClientListOptions contains the optional parameters for the UsagesClient.List method. func (client *UsagesClient) NewListPager(location string, options *UsagesClientListOptions) *runtime.Pager[UsagesClientListResponse] { @@ -104,7 +104,7 @@ func (client *UsagesClient) listCreateRequest(ctx context.Context, location stri return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualappliances_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualappliances_client.go index 84e4dd70369a..a24815ddb3c1 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualappliances_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualappliances_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *VirtualAppliancesClient) createOrUpdateCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -144,7 +144,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -180,7 +180,7 @@ func (client *VirtualAppliancesClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -227,7 +227,7 @@ func (client *VirtualAppliancesClient) getCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -247,7 +247,7 @@ func (client *VirtualAppliancesClient) getHandleResponse(resp *http.Response) (V // NewListPager - Gets all Network Virtual Appliances in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - VirtualAppliancesClientListOptions contains the optional parameters for the VirtualAppliancesClient.List method. func (client *VirtualAppliancesClient) NewListPager(options *VirtualAppliancesClientListOptions) *runtime.Pager[VirtualAppliancesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[VirtualAppliancesClientListResponse]{ @@ -289,7 +289,7 @@ func (client *VirtualAppliancesClient) listCreateRequest(ctx context.Context, op return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -306,7 +306,7 @@ func (client *VirtualAppliancesClient) listHandleResponse(resp *http.Response) ( // NewListByResourceGroupPager - Lists all Network Virtual Appliances in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - VirtualAppliancesClientListByResourceGroupOptions contains the optional parameters for the VirtualAppliancesClient.ListByResourceGroup // method. @@ -354,7 +354,7 @@ func (client *VirtualAppliancesClient) listByResourceGroupCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -371,7 +371,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -412,7 +412,7 @@ func (client *VirtualAppliancesClient) updateTagsCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualappliancesites_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualappliancesites_client.go index cc26c568ee49..abb543c10d45 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualappliancesites_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualappliancesites_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // networkVirtualApplianceName - The name of the Network Virtual Appliance. // siteName - The name of the site. @@ -80,7 +80,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -120,7 +120,7 @@ func (client *VirtualApplianceSitesClient) createOrUpdateCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -128,7 +128,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // networkVirtualApplianceName - The name of the Network Virtual Appliance. // siteName - The name of the site. @@ -150,7 +150,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -190,7 +190,7 @@ func (client *VirtualApplianceSitesClient) deleteCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -198,7 +198,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // networkVirtualApplianceName - The name of the Network Virtual Appliance. // siteName - The name of the site. @@ -243,7 +243,7 @@ func (client *VirtualApplianceSitesClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -260,7 +260,7 @@ func (client *VirtualApplianceSitesClient) getHandleResponse(resp *http.Response // NewListPager - Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -313,7 +313,7 @@ func (client *VirtualApplianceSitesClient) listCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualapplianceskus_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualapplianceskus_client.go index 5b42bdb95fef..70f2ad780e0b 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualapplianceskus_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualapplianceskus_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // skuName - Name of the Sku. // options - VirtualApplianceSKUsClientGetOptions contains the optional parameters for the VirtualApplianceSKUsClient.Get // method. @@ -92,7 +92,7 @@ func (client *VirtualApplianceSKUsClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -109,7 +109,7 @@ func (client *VirtualApplianceSKUsClient) getHandleResponse(resp *http.Response) // NewListPager - List all SKUs available for a virtual appliance. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - VirtualApplianceSKUsClientListOptions contains the optional parameters for the VirtualApplianceSKUsClient.List // method. func (client *VirtualApplianceSKUsClient) NewListPager(options *VirtualApplianceSKUsClientListOptions) *runtime.Pager[VirtualApplianceSKUsClientListResponse] { @@ -152,7 +152,7 @@ func (client *VirtualApplianceSKUsClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubbgpconnection_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubbgpconnection_client.go index ad48df950e5e..dd4ad25e25d4 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubbgpconnection_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubbgpconnection_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the VirtualHub. // virtualHubName - The name of the VirtualHub. // connectionName - The name of the connection. @@ -80,7 +80,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -120,7 +120,7 @@ func (client *VirtualHubBgpConnectionClient) createOrUpdateCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -128,7 +128,7 @@ func (client *VirtualHubBgpConnectionClient) createOrUpdateCreateRequest(ctx con // BeginDelete - Deletes a VirtualHubBgpConnection. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the VirtualHubBgpConnection. // virtualHubName - The name of the VirtualHub. // connectionName - The name of the connection. @@ -150,7 +150,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -190,7 +190,7 @@ func (client *VirtualHubBgpConnectionClient) deleteCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -198,7 +198,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the VirtualHub. // virtualHubName - The name of the VirtualHub. // connectionName - The name of the connection. @@ -243,7 +243,7 @@ func (client *VirtualHubBgpConnectionClient) getCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubbgpconnections_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubbgpconnections_client.go index 3d3c9d37dfc8..e94f83fea6e1 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubbgpconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubbgpconnections_client.go @@ -57,7 +57,7 @@ func NewVirtualHubBgpConnectionsClient(subscriptionID string, credential azcore. // NewListPager - Retrieves the details of all VirtualHubBgpConnections. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -110,7 +110,7 @@ func (client *VirtualHubBgpConnectionsClient) listCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -127,7 +127,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // hubName - The name of the virtual hub. // connectionName - The name of the virtual hub bgp connection. @@ -149,7 +149,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -189,7 +189,7 @@ func (client *VirtualHubBgpConnectionsClient) listAdvertisedRoutesCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -197,7 +197,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // hubName - The name of the virtual hub. // connectionName - The name of the virtual hub bgp connection. @@ -219,7 +219,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -259,7 +259,7 @@ func (client *VirtualHubBgpConnectionsClient) listLearnedRoutesCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubipconfiguration_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubipconfiguration_client.go index 7147e69639ae..f396735247f6 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubipconfiguration_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubipconfiguration_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the VirtualHub. // virtualHubName - The name of the VirtualHub. // ipConfigName - The name of the ipconfig. @@ -80,7 +80,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -120,7 +120,7 @@ func (client *VirtualHubIPConfigurationClient) createOrUpdateCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -128,7 +128,7 @@ func (client *VirtualHubIPConfigurationClient) createOrUpdateCreateRequest(ctx c // BeginDelete - Deletes a VirtualHubIpConfiguration. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the VirtualHubBgpConnection. // virtualHubName - The name of the VirtualHub. // ipConfigName - The name of the ipconfig. @@ -150,7 +150,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -190,7 +190,7 @@ func (client *VirtualHubIPConfigurationClient) deleteCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -198,7 +198,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the VirtualHub. // virtualHubName - The name of the VirtualHub. // ipConfigName - The name of the ipconfig. @@ -243,7 +243,7 @@ func (client *VirtualHubIPConfigurationClient) getCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -260,7 +260,7 @@ func (client *VirtualHubIPConfigurationClient) getHandleResponse(resp *http.Resp // NewListPager - Retrieves the details of all VirtualHubIpConfigurations. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -313,7 +313,7 @@ func (client *VirtualHubIPConfigurationClient) listCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubroutetablev2s_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubroutetablev2s_client.go index d10b73c09f67..e11918e54b11 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubroutetablev2s_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubroutetablev2s_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the VirtualHub. // virtualHubName - The name of the VirtualHub. // routeTableName - The name of the VirtualHubRouteTableV2. @@ -80,7 +80,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -120,7 +120,7 @@ func (client *VirtualHubRouteTableV2SClient) createOrUpdateCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, virtualHubRouteTableV2Parameters) @@ -128,7 +128,7 @@ func (client *VirtualHubRouteTableV2SClient) createOrUpdateCreateRequest(ctx con // BeginDelete - Deletes a VirtualHubRouteTableV2. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the VirtualHubRouteTableV2. // virtualHubName - The name of the VirtualHub. // routeTableName - The name of the VirtualHubRouteTableV2. @@ -150,7 +150,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -190,7 +190,7 @@ func (client *VirtualHubRouteTableV2SClient) deleteCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -198,7 +198,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the VirtualHubRouteTableV2. // virtualHubName - The name of the VirtualHub. // routeTableName - The name of the VirtualHubRouteTableV2. @@ -243,7 +243,7 @@ func (client *VirtualHubRouteTableV2SClient) getCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -260,7 +260,7 @@ func (client *VirtualHubRouteTableV2SClient) getHandleResponse(resp *http.Respon // NewListPager - Retrieves the details of all VirtualHubRouteTableV2s. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -313,7 +313,7 @@ func (client *VirtualHubRouteTableV2SClient) listCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubs_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubs_client.go index 902dc2d6784c..85b52da59bb8 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubs_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubs_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the VirtualHub. // virtualHubName - The name of the VirtualHub. // virtualHubParameters - Parameters supplied to create or update VirtualHub. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *VirtualHubsClient) createOrUpdateCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, virtualHubParameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -143,7 +143,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -179,7 +179,7 @@ func (client *VirtualHubsClient) deleteCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -187,7 +187,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -226,7 +226,7 @@ func (client *VirtualHubsClient) getCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -244,7 +244,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -266,7 +266,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -302,7 +302,7 @@ func (client *VirtualHubsClient) getEffectiveVirtualHubRoutesCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.EffectiveRoutesParameters != nil { @@ -313,7 +313,7 @@ func (client *VirtualHubsClient) getEffectiveVirtualHubRoutesCreateRequest(ctx c // NewListPager - Lists all the VirtualHubs in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - VirtualHubsClientListOptions contains the optional parameters for the VirtualHubsClient.List method. func (client *VirtualHubsClient) NewListPager(options *VirtualHubsClientListOptions) *runtime.Pager[VirtualHubsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[VirtualHubsClientListResponse]{ @@ -355,7 +355,7 @@ func (client *VirtualHubsClient) listCreateRequest(ctx context.Context, options return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -372,7 +372,7 @@ func (client *VirtualHubsClient) listHandleResponse(resp *http.Response) (Virtua // NewListByResourceGroupPager - Lists all the VirtualHubs in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the VirtualHub. // options - VirtualHubsClientListByResourceGroupOptions contains the optional parameters for the VirtualHubsClient.ListByResourceGroup // method. @@ -420,7 +420,7 @@ func (client *VirtualHubsClient) listByResourceGroupCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -437,7 +437,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the VirtualHub. // virtualHubName - The name of the VirtualHub. // virtualHubParameters - Parameters supplied to update VirtualHub tags. @@ -477,7 +477,7 @@ func (client *VirtualHubsClient) updateTagsCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, virtualHubParameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworkgatewayconnections_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworkgatewayconnections_client.go index 3d7f80b7e913..e97a38933f5c 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworkgatewayconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworkgatewayconnections_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *VirtualNetworkGatewayConnectionsClient) createOrUpdateCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -144,7 +144,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -180,7 +180,7 @@ func (client *VirtualNetworkGatewayConnectionsClient) deleteCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -228,7 +228,7 @@ func (client *VirtualNetworkGatewayConnectionsClient) getCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -245,7 +245,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -266,7 +266,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -302,7 +302,7 @@ func (client *VirtualNetworkGatewayConnectionsClient) getIkeSasCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -311,7 +311,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -351,7 +351,7 @@ func (client *VirtualNetworkGatewayConnectionsClient) getSharedKeyCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -369,7 +369,7 @@ func (client *VirtualNetworkGatewayConnectionsClient) getSharedKeyHandleResponse // NewListPager - The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections // created. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - VirtualNetworkGatewayConnectionsClientListOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.List // method. @@ -417,7 +417,7 @@ func (client *VirtualNetworkGatewayConnectionsClient) listCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -434,7 +434,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -455,7 +455,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -491,7 +491,7 @@ func (client *VirtualNetworkGatewayConnectionsClient) resetConnectionCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -501,7 +501,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -526,7 +526,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -562,7 +562,7 @@ func (client *VirtualNetworkGatewayConnectionsClient) resetSharedKeyCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -572,7 +572,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -597,7 +597,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -633,7 +633,7 @@ func (client *VirtualNetworkGatewayConnectionsClient) setSharedKeyCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -641,7 +641,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -662,7 +662,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -698,7 +698,7 @@ func (client *VirtualNetworkGatewayConnectionsClient) startPacketCaptureCreateRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Parameters != nil { @@ -709,7 +709,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -731,7 +731,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -767,7 +767,7 @@ func (client *VirtualNetworkGatewayConnectionsClient) stopPacketCaptureCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -775,7 +775,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -797,7 +797,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -833,7 +833,7 @@ func (client *VirtualNetworkGatewayConnectionsClient) updateTagsCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworkgatewaynatrules_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworkgatewaynatrules_client.go index 3443bce91782..8c0444bae3bf 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworkgatewaynatrules_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworkgatewaynatrules_client.go @@ -58,7 +58,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the Virtual Network Gateway. // virtualNetworkGatewayName - The name of the gateway. // natRuleName - The name of the nat rule. @@ -82,7 +82,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -122,7 +122,7 @@ func (client *VirtualNetworkGatewayNatRulesClient) createOrUpdateCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, natRuleParameters) @@ -130,7 +130,7 @@ func (client *VirtualNetworkGatewayNatRulesClient) createOrUpdateCreateRequest(c // BeginDelete - Deletes a nat rule. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the Virtual Network Gateway. // virtualNetworkGatewayName - The name of the gateway. // natRuleName - The name of the nat rule. @@ -152,7 +152,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -192,7 +192,7 @@ func (client *VirtualNetworkGatewayNatRulesClient) deleteCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -200,7 +200,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the Virtual Network Gateway. // virtualNetworkGatewayName - The name of the gateway. // natRuleName - The name of the nat rule. @@ -245,7 +245,7 @@ func (client *VirtualNetworkGatewayNatRulesClient) getCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -262,7 +262,7 @@ func (client *VirtualNetworkGatewayNatRulesClient) getHandleResponse(resp *http. // NewListByVirtualNetworkGatewayPager - Retrieves all nat rules for a particular virtual network gateway. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -315,7 +315,7 @@ func (client *VirtualNetworkGatewayNatRulesClient) listByVirtualNetworkGatewayCr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworkgateways_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworkgateways_client.go index cf53c7cc7747..7c481adce25a 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworkgateways_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworkgateways_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *VirtualNetworkGatewaysClient) createOrUpdateCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -144,7 +144,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -180,7 +180,7 @@ func (client *VirtualNetworkGatewaysClient) deleteCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -189,7 +189,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -212,7 +212,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -248,7 +248,7 @@ func (client *VirtualNetworkGatewaysClient) disconnectVirtualNetworkGatewayVPNCo return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, request) @@ -257,7 +257,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -280,7 +280,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -316,7 +316,7 @@ func (client *VirtualNetworkGatewaysClient) generateVPNProfileCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -325,7 +325,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -348,7 +348,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -384,7 +384,7 @@ func (client *VirtualNetworkGatewaysClient) generatevpnclientpackageCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -392,7 +392,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -432,7 +432,7 @@ func (client *VirtualNetworkGatewaysClient) getCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -450,7 +450,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // virtualNetworkGatewayName - The name of the virtual network gateway. // peer - The IP address of the peer. @@ -473,7 +473,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -510,7 +510,7 @@ func (client *VirtualNetworkGatewaysClient) getAdvertisedRoutesCreateRequest(ctx } reqQP := req.Raw().URL.Query() reqQP.Set("peer", peer) - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -518,7 +518,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -539,7 +539,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -578,7 +578,7 @@ func (client *VirtualNetworkGatewaysClient) getBgpPeerStatusCreateRequest(ctx co if options != nil && options.Peer != nil { reqQP.Set("peer", *options.Peer) } - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -587,7 +587,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -609,7 +609,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -645,7 +645,7 @@ func (client *VirtualNetworkGatewaysClient) getLearnedRoutesCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -654,7 +654,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -676,7 +676,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -712,7 +712,7 @@ func (client *VirtualNetworkGatewaysClient) getVPNProfilePackageURLCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -721,7 +721,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // virtualNetworkGatewayName - The name of the virtual network gateway. // options - VirtualNetworkGatewaysClientBeginGetVpnclientConnectionHealthOptions contains the optional parameters for the @@ -743,7 +743,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -779,7 +779,7 @@ func (client *VirtualNetworkGatewaysClient) getVpnclientConnectionHealthCreateRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -789,7 +789,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // virtualNetworkGatewayName - The virtual network gateway name. // options - VirtualNetworkGatewaysClientBeginGetVpnclientIPSecParametersOptions contains the optional parameters for the @@ -812,7 +812,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -848,7 +848,7 @@ func (client *VirtualNetworkGatewaysClient) getVpnclientIPSecParametersCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -856,7 +856,7 @@ func (client *VirtualNetworkGatewaysClient) getVpnclientIPSecParametersCreateReq // NewListPager - Gets all virtual network gateways by resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - VirtualNetworkGatewaysClientListOptions contains the optional parameters for the VirtualNetworkGatewaysClient.List // method. @@ -904,7 +904,7 @@ func (client *VirtualNetworkGatewaysClient) listCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -921,7 +921,7 @@ func (client *VirtualNetworkGatewaysClient) listHandleResponse(resp *http.Respon // NewListConnectionsPager - Gets all the connections in a virtual network gateway. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -974,7 +974,7 @@ func (client *VirtualNetworkGatewaysClient) listConnectionsCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -991,7 +991,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -1012,7 +1012,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -1051,7 +1051,7 @@ func (client *VirtualNetworkGatewaysClient) resetCreateRequest(ctx context.Conte if options != nil && options.GatewayVip != nil { reqQP.Set("gatewayVip", *options.GatewayVip) } - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1060,7 +1060,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -1081,7 +1081,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -1117,7 +1117,7 @@ func (client *VirtualNetworkGatewaysClient) resetVPNClientSharedKeyCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1126,7 +1126,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -1150,7 +1150,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -1186,7 +1186,7 @@ func (client *VirtualNetworkGatewaysClient) setVpnclientIPSecParametersCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, vpnclientIPSecParams) @@ -1194,7 +1194,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -1215,7 +1215,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -1251,7 +1251,7 @@ func (client *VirtualNetworkGatewaysClient) startPacketCaptureCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Parameters != nil { @@ -1262,7 +1262,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -1284,7 +1284,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -1320,7 +1320,7 @@ func (client *VirtualNetworkGatewaysClient) stopPacketCaptureCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -1328,7 +1328,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -1368,7 +1368,7 @@ func (client *VirtualNetworkGatewaysClient) supportedVPNDevicesCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1385,7 +1385,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -1407,7 +1407,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -1443,7 +1443,7 @@ func (client *VirtualNetworkGatewaysClient) updateTagsCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -1451,7 +1451,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // virtualNetworkGatewayConnectionName - The name of the virtual network gateway connection for which the configuration script // is generated. @@ -1493,7 +1493,7 @@ func (client *VirtualNetworkGatewaysClient) vpnDeviceConfigurationScriptCreateRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworkpeerings_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworkpeerings_client.go index 7815fc496339..fa2a1d1e156a 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworkpeerings_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworkpeerings_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // virtualNetworkName - The name of the virtual network. // virtualNetworkPeeringName - The name of the peering. @@ -80,7 +80,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -123,7 +123,7 @@ func (client *VirtualNetworkPeeringsClient) createOrUpdateCreateRequest(ctx cont if options != nil && options.SyncRemoteAddressSpace != nil { reqQP.Set("syncRemoteAddressSpace", string(*options.SyncRemoteAddressSpace)) } - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, virtualNetworkPeeringParameters) @@ -131,7 +131,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // virtualNetworkName - The name of the virtual network. // virtualNetworkPeeringName - The name of the virtual network peering. @@ -153,7 +153,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -193,7 +193,7 @@ func (client *VirtualNetworkPeeringsClient) deleteCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -201,7 +201,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // virtualNetworkName - The name of the virtual network. // virtualNetworkPeeringName - The name of the virtual network peering. @@ -246,7 +246,7 @@ func (client *VirtualNetworkPeeringsClient) getCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -263,7 +263,7 @@ func (client *VirtualNetworkPeeringsClient) getHandleResponse(resp *http.Respons // NewListPager - Gets all virtual network peerings in a virtual network. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -316,7 +316,7 @@ func (client *VirtualNetworkPeeringsClient) listCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworks_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworks_client.go index 593eec3836b6..410d3ed57ec5 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworks_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworks_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // virtualNetworkName - The name of the virtual network. // ipAddress - The private IP address to be verified. @@ -99,7 +99,7 @@ func (client *VirtualNetworksClient) checkIPAddressAvailabilityCreateRequest(ctx } reqQP := req.Raw().URL.Query() reqQP.Set("ipAddress", ipAddress) - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -116,7 +116,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -138,7 +138,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -174,7 +174,7 @@ func (client *VirtualNetworksClient) createOrUpdateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -182,7 +182,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -203,7 +203,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -239,7 +239,7 @@ func (client *VirtualNetworksClient) deleteCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -247,7 +247,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -286,7 +286,7 @@ func (client *VirtualNetworksClient) getCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -306,7 +306,7 @@ func (client *VirtualNetworksClient) getHandleResponse(resp *http.Response) (Vir // NewListPager - Gets all virtual networks in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - VirtualNetworksClientListOptions contains the optional parameters for the VirtualNetworksClient.List method. func (client *VirtualNetworksClient) NewListPager(resourceGroupName string, options *VirtualNetworksClientListOptions) *runtime.Pager[VirtualNetworksClientListResponse] { @@ -353,7 +353,7 @@ func (client *VirtualNetworksClient) listCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -370,7 +370,7 @@ func (client *VirtualNetworksClient) listHandleResponse(resp *http.Response) (Vi // NewListAllPager - Gets all virtual networks in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - VirtualNetworksClientListAllOptions contains the optional parameters for the VirtualNetworksClient.ListAll method. func (client *VirtualNetworksClient) NewListAllPager(options *VirtualNetworksClientListAllOptions) *runtime.Pager[VirtualNetworksClientListAllResponse] { return runtime.NewPager(runtime.PagingHandler[VirtualNetworksClientListAllResponse]{ @@ -412,7 +412,7 @@ func (client *VirtualNetworksClient) listAllCreateRequest(ctx context.Context, o return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -429,7 +429,7 @@ func (client *VirtualNetworksClient) listAllHandleResponse(resp *http.Response) // NewListUsagePager - Lists usage stats. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -482,7 +482,7 @@ func (client *VirtualNetworksClient) listUsageCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -499,7 +499,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // virtualNetworkName - The name of the virtual network. // parameters - Parameters supplied to update virtual network tags. @@ -540,7 +540,7 @@ func (client *VirtualNetworksClient) updateTagsCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworktaps_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworktaps_client.go index 5f0991c8fb1e..c7c8147e17b3 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworktaps_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworktaps_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *VirtualNetworkTapsClient) createOrUpdateCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -144,7 +144,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -180,7 +180,7 @@ func (client *VirtualNetworkTapsClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -227,7 +227,7 @@ func (client *VirtualNetworkTapsClient) getCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -244,7 +244,7 @@ func (client *VirtualNetworkTapsClient) getHandleResponse(resp *http.Response) ( // NewListAllPager - Gets all the VirtualNetworkTaps in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - VirtualNetworkTapsClientListAllOptions contains the optional parameters for the VirtualNetworkTapsClient.ListAll // method. func (client *VirtualNetworkTapsClient) NewListAllPager(options *VirtualNetworkTapsClientListAllOptions) *runtime.Pager[VirtualNetworkTapsClientListAllResponse] { @@ -287,7 +287,7 @@ func (client *VirtualNetworkTapsClient) listAllCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -304,7 +304,7 @@ func (client *VirtualNetworkTapsClient) listAllHandleResponse(resp *http.Respons // NewListByResourceGroupPager - Gets all the VirtualNetworkTaps in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - VirtualNetworkTapsClientListByResourceGroupOptions contains the optional parameters for the VirtualNetworkTapsClient.ListByResourceGroup // method. @@ -352,7 +352,7 @@ func (client *VirtualNetworkTapsClient) listByResourceGroupCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -369,7 +369,7 @@ func (client *VirtualNetworkTapsClient) listByResourceGroupHandleResponse(resp * // UpdateTags - Updates an VirtualNetworkTap tags. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // tapName - The name of the tap. // tapParameters - Parameters supplied to update VirtualNetworkTap tags. @@ -410,7 +410,7 @@ func (client *VirtualNetworkTapsClient) updateTagsCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, tapParameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualrouterpeerings_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualrouterpeerings_client.go index 9b22f84bf8e1..41c618c24d31 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualrouterpeerings_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualrouterpeerings_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // virtualRouterName - The name of the Virtual Router. // peeringName - The name of the Virtual Router Peering. @@ -80,7 +80,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -120,7 +120,7 @@ func (client *VirtualRouterPeeringsClient) createOrUpdateCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -128,7 +128,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // virtualRouterName - The name of the Virtual Router. // peeringName - The name of the peering. @@ -150,7 +150,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -190,7 +190,7 @@ func (client *VirtualRouterPeeringsClient) deleteCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -198,7 +198,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // virtualRouterName - The name of the Virtual Router. // peeringName - The name of the Virtual Router Peering. @@ -243,7 +243,7 @@ func (client *VirtualRouterPeeringsClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -260,7 +260,7 @@ func (client *VirtualRouterPeeringsClient) getHandleResponse(resp *http.Response // NewListPager - Lists all Virtual Router Peerings in a Virtual Router resource. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -313,7 +313,7 @@ func (client *VirtualRouterPeeringsClient) listCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualrouters_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualrouters_client.go index f5c557e6d7fb..73a531440169 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualrouters_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualrouters_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *VirtualRoutersClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -144,7 +144,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -180,7 +180,7 @@ func (client *VirtualRoutersClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -227,7 +227,7 @@ func (client *VirtualRoutersClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -247,7 +247,7 @@ func (client *VirtualRoutersClient) getHandleResponse(resp *http.Response) (Virt // NewListPager - Gets all the Virtual Routers in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - VirtualRoutersClientListOptions contains the optional parameters for the VirtualRoutersClient.List method. func (client *VirtualRoutersClient) NewListPager(options *VirtualRoutersClientListOptions) *runtime.Pager[VirtualRoutersClientListResponse] { return runtime.NewPager(runtime.PagingHandler[VirtualRoutersClientListResponse]{ @@ -289,7 +289,7 @@ func (client *VirtualRoutersClient) listCreateRequest(ctx context.Context, optio return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -306,7 +306,7 @@ func (client *VirtualRoutersClient) listHandleResponse(resp *http.Response) (Vir // NewListByResourceGroupPager - Lists all Virtual Routers in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - VirtualRoutersClientListByResourceGroupOptions contains the optional parameters for the VirtualRoutersClient.ListByResourceGroup // method. @@ -354,7 +354,7 @@ func (client *VirtualRoutersClient) listByResourceGroupCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualwans_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualwans_client.go index c0f3bd62f6e8..b027c2e94b82 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualwans_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualwans_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *VirtualWansClient) createOrUpdateCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, wanParameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -143,7 +143,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -179,7 +179,7 @@ func (client *VirtualWansClient) deleteCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -187,7 +187,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -226,7 +226,7 @@ func (client *VirtualWansClient) getCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -243,7 +243,7 @@ func (client *VirtualWansClient) getHandleResponse(resp *http.Response) (Virtual // NewListPager - Lists all the VirtualWANs in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - VirtualWansClientListOptions contains the optional parameters for the VirtualWansClient.List method. func (client *VirtualWansClient) NewListPager(options *VirtualWansClientListOptions) *runtime.Pager[VirtualWansClientListResponse] { return runtime.NewPager(runtime.PagingHandler[VirtualWansClientListResponse]{ @@ -285,7 +285,7 @@ func (client *VirtualWansClient) listCreateRequest(ctx context.Context, options return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -302,7 +302,7 @@ func (client *VirtualWansClient) listHandleResponse(resp *http.Response) (Virtua // NewListByResourceGroupPager - Lists all the VirtualWANs in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the VirtualWan. // options - VirtualWansClientListByResourceGroupOptions contains the optional parameters for the VirtualWansClient.ListByResourceGroup // method. @@ -350,7 +350,7 @@ func (client *VirtualWansClient) listByResourceGroupCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -367,7 +367,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the VirtualWan. // virtualWANName - The name of the VirtualWAN being updated. // wanParameters - Parameters supplied to Update VirtualWAN tags. @@ -407,7 +407,7 @@ func (client *VirtualWansClient) updateTagsCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, wanParameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_vpnconnections_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_vpnconnections_client.go index 8a10e058123e..59b32e6d5ada 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_vpnconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_vpnconnections_client.go @@ -58,7 +58,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the VpnGateway. // gatewayName - The name of the gateway. // connectionName - The name of the connection. @@ -81,7 +81,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -121,7 +121,7 @@ func (client *VPNConnectionsClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, vpnConnectionParameters) @@ -129,7 +129,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the VpnGateway. // gatewayName - The name of the gateway. // connectionName - The name of the connection. @@ -151,7 +151,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -191,7 +191,7 @@ func (client *VPNConnectionsClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -199,7 +199,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the VpnGateway. // gatewayName - The name of the gateway. // connectionName - The name of the vpn connection. @@ -243,7 +243,7 @@ func (client *VPNConnectionsClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -260,7 +260,7 @@ func (client *VPNConnectionsClient) getHandleResponse(resp *http.Response) (VPNC // NewListByVPNGatewayPager - Retrieves all vpn connections for a particular virtual wan vpn gateway. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -313,7 +313,7 @@ func (client *VPNConnectionsClient) listByVPNGatewayCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -330,7 +330,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // gatewayName - The name of the gateway. // vpnConnectionName - The name of the vpn connection. @@ -352,7 +352,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -392,7 +392,7 @@ func (client *VPNConnectionsClient) startPacketCaptureCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Parameters != nil { @@ -403,7 +403,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // gatewayName - The name of the gateway. // vpnConnectionName - The name of the vpn connection. @@ -425,7 +425,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -465,7 +465,7 @@ func (client *VPNConnectionsClient) stopPacketCaptureCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Parameters != nil { diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_vpngateways_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_vpngateways_client.go index 4e9acb5a08d3..2c6220d1852d 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_vpngateways_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_vpngateways_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *VPNGatewaysClient) createOrUpdateCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, vpnGatewayParameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -143,7 +143,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -179,7 +179,7 @@ func (client *VPNGatewaysClient) deleteCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -187,7 +187,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -226,7 +226,7 @@ func (client *VPNGatewaysClient) getCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -243,7 +243,7 @@ func (client *VPNGatewaysClient) getHandleResponse(resp *http.Response) (VPNGate // NewListPager - Lists all the VpnGateways in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - VPNGatewaysClientListOptions contains the optional parameters for the VPNGatewaysClient.List method. func (client *VPNGatewaysClient) NewListPager(options *VPNGatewaysClientListOptions) *runtime.Pager[VPNGatewaysClientListResponse] { return runtime.NewPager(runtime.PagingHandler[VPNGatewaysClientListResponse]{ @@ -285,7 +285,7 @@ func (client *VPNGatewaysClient) listCreateRequest(ctx context.Context, options return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -302,7 +302,7 @@ func (client *VPNGatewaysClient) listHandleResponse(resp *http.Response) (VPNGat // NewListByResourceGroupPager - Lists all the VpnGateways in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the VpnGateway. // options - VPNGatewaysClientListByResourceGroupOptions contains the optional parameters for the VPNGatewaysClient.ListByResourceGroup // method. @@ -350,7 +350,7 @@ func (client *VPNGatewaysClient) listByResourceGroupCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -367,7 +367,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -387,7 +387,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -423,7 +423,7 @@ func (client *VPNGatewaysClient) resetCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -431,7 +431,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -452,7 +452,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -488,7 +488,7 @@ func (client *VPNGatewaysClient) startPacketCaptureCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Parameters != nil { @@ -499,7 +499,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -520,7 +520,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -556,7 +556,7 @@ func (client *VPNGatewaysClient) stopPacketCaptureCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Parameters != nil { @@ -567,7 +567,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -589,7 +589,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -625,7 +625,7 @@ func (client *VPNGatewaysClient) updateTagsCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, vpnGatewayParameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_vpnlinkconnections_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_vpnlinkconnections_client.go index 25720bb241e5..bb50e3f4806a 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_vpnlinkconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_vpnlinkconnections_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // gatewayName - The name of the gateway. // connectionName - The name of the vpn connection. @@ -80,7 +80,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -124,7 +124,7 @@ func (client *VPNLinkConnectionsClient) getIkeSasCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -132,7 +132,7 @@ func (client *VPNLinkConnectionsClient) getIkeSasCreateRequest(ctx context.Conte // NewListByVPNConnectionPager - Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the vpn gateway. // gatewayName - The name of the gateway. // connectionName - The name of the vpn connection. @@ -190,7 +190,7 @@ func (client *VPNLinkConnectionsClient) listByVPNConnectionCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -207,7 +207,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // gatewayName - The name of the gateway. // connectionName - The name of the vpn connection. @@ -230,7 +230,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -274,7 +274,7 @@ func (client *VPNLinkConnectionsClient) resetConnectionCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_vpnserverconfigurations_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_vpnserverconfigurations_client.go index 80b264f9e37d..34d6fc5d6a42 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_vpnserverconfigurations_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_vpnserverconfigurations_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *VPNServerConfigurationsClient) createOrUpdateCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, vpnServerConfigurationParameters) @@ -123,7 +123,7 @@ func (client *VPNServerConfigurationsClient) createOrUpdateCreateRequest(ctx con // BeginDelete - Deletes a VpnServerConfiguration. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -144,7 +144,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -180,7 +180,7 @@ func (client *VPNServerConfigurationsClient) deleteCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -188,7 +188,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -228,7 +228,7 @@ func (client *VPNServerConfigurationsClient) getCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -245,7 +245,7 @@ func (client *VPNServerConfigurationsClient) getHandleResponse(resp *http.Respon // NewListPager - Lists all the VpnServerConfigurations in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - VPNServerConfigurationsClientListOptions contains the optional parameters for the VPNServerConfigurationsClient.List // method. func (client *VPNServerConfigurationsClient) NewListPager(options *VPNServerConfigurationsClientListOptions) *runtime.Pager[VPNServerConfigurationsClientListResponse] { @@ -288,7 +288,7 @@ func (client *VPNServerConfigurationsClient) listCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -305,7 +305,7 @@ func (client *VPNServerConfigurationsClient) listHandleResponse(resp *http.Respo // NewListByResourceGroupPager - Lists all the vpnServerConfigurations in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the VpnServerConfiguration. // options - VPNServerConfigurationsClientListByResourceGroupOptions contains the optional parameters for the VPNServerConfigurationsClient.ListByResourceGroup // method. @@ -353,7 +353,7 @@ func (client *VPNServerConfigurationsClient) listByResourceGroupCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -370,7 +370,7 @@ func (client *VPNServerConfigurationsClient) listByResourceGroupHandleResponse(r // UpdateTags - Updates VpnServerConfiguration tags. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the VpnServerConfiguration. // vpnServerConfigurationName - The name of the VpnServerConfiguration being updated. // vpnServerConfigurationParameters - Parameters supplied to update VpnServerConfiguration tags. @@ -411,7 +411,7 @@ func (client *VPNServerConfigurationsClient) updateTagsCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, vpnServerConfigurationParameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_vpnserverconfigurationsassociatedwithvirtualwan_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_vpnserverconfigurationsassociatedwithvirtualwan_client.go index 9888ab1708aa..ec09b034d25e 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_vpnserverconfigurationsassociatedwithvirtualwan_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_vpnserverconfigurationsassociatedwithvirtualwan_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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 @@ -78,7 +78,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -114,7 +114,7 @@ func (client *VPNServerConfigurationsAssociatedWithVirtualWanClient) listCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_vpnsitelinkconnections_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_vpnsitelinkconnections_client.go index 703f9eda5ef2..436ef314495a 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_vpnsitelinkconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_vpnsitelinkconnections_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the VpnGateway. // gatewayName - The name of the gateway. // connectionName - The name of the vpn connection. @@ -107,7 +107,7 @@ func (client *VPNSiteLinkConnectionsClient) getCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_vpnsitelinks_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_vpnsitelinks_client.go index 631b9116fa18..6e41c21e401a 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_vpnsitelinks_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_vpnsitelinks_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the VpnSite. // vpnSiteName - The name of the VpnSite. // vpnSiteLinkName - The name of the VpnSiteLink being retrieved. @@ -101,7 +101,7 @@ func (client *VPNSiteLinksClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -118,7 +118,7 @@ func (client *VPNSiteLinksClient) getHandleResponse(resp *http.Response) (VPNSit // NewListByVPNSitePager - Lists all the vpnSiteLinks in a resource group for a vpn site. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-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 @@ -171,7 +171,7 @@ func (client *VPNSiteLinksClient) listByVPNSiteCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_vpnsites_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_vpnsites_client.go index d78d7cf0c6f2..92cb8247824e 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_vpnsites_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_vpnsites_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *VPNSitesClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, vpnSiteParameters) @@ -123,7 +123,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -143,7 +143,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -179,7 +179,7 @@ func (client *VPNSitesClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -187,7 +187,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -226,7 +226,7 @@ func (client *VPNSitesClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -243,7 +243,7 @@ func (client *VPNSitesClient) getHandleResponse(resp *http.Response) (VPNSitesCl // NewListPager - Lists all the VpnSites in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - VPNSitesClientListOptions contains the optional parameters for the VPNSitesClient.List method. func (client *VPNSitesClient) NewListPager(options *VPNSitesClientListOptions) *runtime.Pager[VPNSitesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[VPNSitesClientListResponse]{ @@ -285,7 +285,7 @@ func (client *VPNSitesClient) listCreateRequest(ctx context.Context, options *VP return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -302,7 +302,7 @@ func (client *VPNSitesClient) listHandleResponse(resp *http.Response) (VPNSitesC // NewListByResourceGroupPager - Lists all the vpnSites in a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the VpnSite. // options - VPNSitesClientListByResourceGroupOptions contains the optional parameters for the VPNSitesClient.ListByResourceGroup // method. @@ -350,7 +350,7 @@ func (client *VPNSitesClient) listByResourceGroupCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -367,7 +367,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The resource group name of the VpnSite. // vpnSiteName - The name of the VpnSite being updated. // vpnSiteParameters - Parameters supplied to update VpnSite tags. @@ -407,7 +407,7 @@ func (client *VPNSitesClient) updateTagsCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, vpnSiteParameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_vpnsitesconfiguration_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_vpnsitesconfiguration_client.go index be0cf7d38ff6..b57126958899 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_vpnsitesconfiguration_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_vpnsitesconfiguration_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -79,7 +79,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -115,7 +115,7 @@ func (client *VPNSitesConfigurationClient) downloadCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, request) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_watchers_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_watchers_client.go index 4d92df82213c..19151906710e 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_watchers_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_watchers_client.go @@ -58,7 +58,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -81,7 +81,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -117,7 +117,7 @@ func (client *WatchersClient) checkConnectivityCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -125,7 +125,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // networkWatcherName - The name of the network watcher. // parameters - Parameters that define the network watcher resource. @@ -165,7 +165,7 @@ func (client *WatchersClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -182,7 +182,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -202,7 +202,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -238,7 +238,7 @@ func (client *WatchersClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -246,7 +246,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -285,7 +285,7 @@ func (client *WatchersClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -303,7 +303,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -326,7 +326,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -362,7 +362,7 @@ func (client *WatchersClient) getAzureReachabilityReportCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -370,7 +370,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -392,7 +392,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -428,7 +428,7 @@ func (client *WatchersClient) getFlowLogStatusCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -440,7 +440,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // networkWatcherName - The name of the network watcher. // parameters - Parameters to get network configuration diagnostic. @@ -466,7 +466,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -502,7 +502,7 @@ func (client *WatchersClient) getNetworkConfigurationDiagnosticCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -510,7 +510,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // networkWatcherName - The name of the network watcher. // parameters - Parameters that define the source and destination endpoint. @@ -532,7 +532,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -568,7 +568,7 @@ func (client *WatchersClient) getNextHopCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -576,7 +576,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // networkWatcherName - The name of the network watcher. // parameters - Parameters that define the representation of topology. @@ -616,7 +616,7 @@ func (client *WatchersClient) getTopologyCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -633,7 +633,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // networkWatcherName - The name of the network watcher resource. // parameters - Parameters that define the resource to troubleshoot. @@ -655,7 +655,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -691,7 +691,7 @@ func (client *WatchersClient) getTroubleshootingCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -699,7 +699,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -721,7 +721,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -757,7 +757,7 @@ func (client *WatchersClient) getTroubleshootingResultCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -765,7 +765,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -787,7 +787,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -823,7 +823,7 @@ func (client *WatchersClient) getVMSecurityRulesCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -831,7 +831,7 @@ func (client *WatchersClient) getVMSecurityRulesCreateRequest(ctx context.Contex // NewListPager - Gets all network watchers by resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - WatchersClientListOptions contains the optional parameters for the WatchersClient.List method. func (client *WatchersClient) NewListPager(resourceGroupName string, options *WatchersClientListOptions) *runtime.Pager[WatchersClientListResponse] { @@ -872,7 +872,7 @@ func (client *WatchersClient) listCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -889,7 +889,7 @@ func (client *WatchersClient) listHandleResponse(resp *http.Response) (WatchersC // NewListAllPager - Gets all network watchers by subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - WatchersClientListAllOptions contains the optional parameters for the WatchersClient.ListAll method. func (client *WatchersClient) NewListAllPager(options *WatchersClientListAllOptions) *runtime.Pager[WatchersClientListAllResponse] { return runtime.NewPager(runtime.PagingHandler[WatchersClientListAllResponse]{ @@ -925,7 +925,7 @@ func (client *WatchersClient) listAllCreateRequest(ctx context.Context, options return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -943,7 +943,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -966,7 +966,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -1002,7 +1002,7 @@ func (client *WatchersClient) listAvailableProvidersCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -1010,7 +1010,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -1032,7 +1032,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -1068,7 +1068,7 @@ func (client *WatchersClient) setFlowLogConfigurationCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -1076,7 +1076,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // networkWatcherName - The name of the network watcher. // parameters - Parameters supplied to update network watcher tags. @@ -1116,7 +1116,7 @@ func (client *WatchersClient) updateTagsCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -1133,7 +1133,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-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. @@ -1155,7 +1155,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -1191,7 +1191,7 @@ func (client *WatchersClient) verifyIPFlowCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_webapplicationfirewallpolicies_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_webapplicationfirewallpolicies_client.go index c683cd20d18d..7f8bd34645a0 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_webapplicationfirewallpolicies_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_webapplicationfirewallpolicies_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // policyName - The name of the policy. // parameters - Policy to be created. @@ -98,7 +98,7 @@ func (client *WebApplicationFirewallPoliciesClient) createOrUpdateCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -115,7 +115,7 @@ func (client *WebApplicationFirewallPoliciesClient) createOrUpdateHandleResponse // BeginDelete - Deletes Policy. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // policyName - The name of the policy. // options - WebApplicationFirewallPoliciesClientBeginDeleteOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.BeginDelete @@ -136,7 +136,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 2021-08-01 +// Generated from API version 2022-01-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) if err != nil { @@ -172,7 +172,7 @@ func (client *WebApplicationFirewallPoliciesClient) deleteCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,7 +180,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // policyName - The name of the policy. // options - WebApplicationFirewallPoliciesClientGetOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.Get @@ -220,7 +220,7 @@ func (client *WebApplicationFirewallPoliciesClient) getCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -237,7 +237,7 @@ func (client *WebApplicationFirewallPoliciesClient) getHandleResponse(resp *http // NewListPager - Lists all of the protection policies within a resource group. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // resourceGroupName - The name of the resource group. // options - WebApplicationFirewallPoliciesClientListOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.List // method. @@ -285,7 +285,7 @@ func (client *WebApplicationFirewallPoliciesClient) listCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -302,7 +302,7 @@ func (client *WebApplicationFirewallPoliciesClient) listHandleResponse(resp *htt // NewListAllPager - Gets all the WAF policies in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - WebApplicationFirewallPoliciesClientListAllOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.ListAll // method. func (client *WebApplicationFirewallPoliciesClient) NewListAllPager(options *WebApplicationFirewallPoliciesClientListAllOptions) *runtime.Pager[WebApplicationFirewallPoliciesClientListAllResponse] { @@ -345,7 +345,7 @@ func (client *WebApplicationFirewallPoliciesClient) listAllCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_webcategories_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_webcategories_client.go index 1f8d919a69b5..53dc9f095b21 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_webcategories_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_webcategories_client.go @@ -57,7 +57,7 @@ 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 2021-08-01 +// Generated from API version 2022-01-01 // 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) { @@ -91,7 +91,7 @@ func (client *WebCategoriesClient) getCreateRequest(ctx context.Context, name st return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") if options != nil && options.Expand != nil { reqQP.Set("$expand", *options.Expand) } @@ -111,7 +111,7 @@ func (client *WebCategoriesClient) getHandleResponse(resp *http.Response) (WebCa // NewListBySubscriptionPager - Gets all the Azure Web Categories in a subscription. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2021-08-01 +// Generated from API version 2022-01-01 // options - WebCategoriesClientListBySubscriptionOptions contains the optional parameters for the WebCategoriesClient.ListBySubscription // method. func (client *WebCategoriesClient) NewListBySubscriptionPager(options *WebCategoriesClientListBySubscriptionOptions) *runtime.Pager[WebCategoriesClientListBySubscriptionResponse] { @@ -154,7 +154,7 @@ func (client *WebCategoriesClient) listBySubscriptionCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2021-08-01") + reqQP.Set("api-version", "2022-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil