diff --git a/sdk/resourcemanager/servicenetworking/armservicenetworking/CHANGELOG.md b/sdk/resourcemanager/servicenetworking/armservicenetworking/CHANGELOG.md index 994be35efcf0..6c6009ca9ce9 100644 --- a/sdk/resourcemanager/servicenetworking/armservicenetworking/CHANGELOG.md +++ b/sdk/resourcemanager/servicenetworking/armservicenetworking/CHANGELOG.md @@ -1,5 +1,32 @@ # Release History +## 1.1.0 (2024-12-20) +### Features Added + +- New enum type `PolicyType` with values `PolicyTypeWAF` +- New function `*ClientFactory.NewSecurityPoliciesInterfaceClient() *SecurityPoliciesInterfaceClient` +- New function `NewSecurityPoliciesInterfaceClient(string, azcore.TokenCredential, *arm.ClientOptions) (*SecurityPoliciesInterfaceClient, error)` +- New function `*SecurityPoliciesInterfaceClient.BeginCreateOrUpdate(context.Context, string, string, string, SecurityPolicy, *SecurityPoliciesInterfaceClientBeginCreateOrUpdateOptions) (*runtime.Poller[SecurityPoliciesInterfaceClientCreateOrUpdateResponse], error)` +- New function `*SecurityPoliciesInterfaceClient.BeginDelete(context.Context, string, string, string, *SecurityPoliciesInterfaceClientBeginDeleteOptions) (*runtime.Poller[SecurityPoliciesInterfaceClientDeleteResponse], error)` +- New function `*SecurityPoliciesInterfaceClient.Get(context.Context, string, string, string, *SecurityPoliciesInterfaceClientGetOptions) (SecurityPoliciesInterfaceClientGetResponse, error)` +- New function `*SecurityPoliciesInterfaceClient.NewListByTrafficControllerPager(string, string, *SecurityPoliciesInterfaceClientListByTrafficControllerOptions) *runtime.Pager[SecurityPoliciesInterfaceClientListByTrafficControllerResponse]` +- New function `*SecurityPoliciesInterfaceClient.Update(context.Context, string, string, string, SecurityPolicyUpdate, *SecurityPoliciesInterfaceClientUpdateOptions) (SecurityPoliciesInterfaceClientUpdateResponse, error)` +- New struct `SecurityPolicy` +- New struct `SecurityPolicyConfigurations` +- New struct `SecurityPolicyConfigurationsUpdate` +- New struct `SecurityPolicyListResult` +- New struct `SecurityPolicyProperties` +- New struct `SecurityPolicyUpdate` +- New struct `SecurityPolicyUpdateProperties` +- New struct `TrafficControllerUpdateProperties` +- New struct `WafPolicy` +- New struct `WafPolicyUpdate` +- New struct `WafSecurityPolicy` +- New struct `WafSecurityPolicyUpdate` +- New field `SecurityPolicies`, `SecurityPolicyConfigurations` in struct `TrafficControllerProperties` +- New field `Properties` in struct `TrafficControllerUpdate` + + ## 1.1.0-beta.2 (2024-09-26) ### Bugs Fixed diff --git a/sdk/resourcemanager/servicenetworking/armservicenetworking/associationsinterface_client.go b/sdk/resourcemanager/servicenetworking/armservicenetworking/associationsinterface_client.go index 40fdc2d44dd2..21c25465f9ab 100644 --- a/sdk/resourcemanager/servicenetworking/armservicenetworking/associationsinterface_client.go +++ b/sdk/resourcemanager/servicenetworking/armservicenetworking/associationsinterface_client.go @@ -46,7 +46,7 @@ func NewAssociationsInterfaceClient(subscriptionID string, credential azcore.Tok // BeginCreateOrUpdate - Create a Association // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-05-01-preview +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - trafficControllerName - traffic controller name for path // - associationName - Name of Association @@ -74,7 +74,7 @@ func (client *AssociationsInterfaceClient) BeginCreateOrUpdate(ctx context.Conte // CreateOrUpdate - Create a Association // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-05-01-preview +// Generated from API version 2025-01-01 func (client *AssociationsInterfaceClient) createOrUpdate(ctx context.Context, resourceGroupName string, trafficControllerName string, associationName string, resource Association, options *AssociationsInterfaceClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "AssociationsInterfaceClient.BeginCreateOrUpdate" @@ -120,7 +120,7 @@ func (client *AssociationsInterfaceClient) createOrUpdateCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-05-01-preview") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, resource); err != nil { @@ -132,7 +132,7 @@ func (client *AssociationsInterfaceClient) createOrUpdateCreateRequest(ctx conte // BeginDelete - Delete a Association // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-05-01-preview +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - trafficControllerName - traffic controller name for path // - associationName - Name of Association @@ -159,7 +159,7 @@ func (client *AssociationsInterfaceClient) BeginDelete(ctx context.Context, reso // Delete - Delete a Association // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-05-01-preview +// Generated from API version 2025-01-01 func (client *AssociationsInterfaceClient) deleteOperation(ctx context.Context, resourceGroupName string, trafficControllerName string, associationName string, options *AssociationsInterfaceClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "AssociationsInterfaceClient.BeginDelete" @@ -205,7 +205,7 @@ func (client *AssociationsInterfaceClient) deleteCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-05-01-preview") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -214,7 +214,7 @@ func (client *AssociationsInterfaceClient) deleteCreateRequest(ctx context.Conte // Get - Get a Association // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-05-01-preview +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - trafficControllerName - traffic controller name for path // - associationName - Name of Association @@ -266,7 +266,7 @@ func (client *AssociationsInterfaceClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-05-01-preview") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -283,7 +283,7 @@ func (client *AssociationsInterfaceClient) getHandleResponse(resp *http.Response // NewListByTrafficControllerPager - List Association resources by TrafficController // -// Generated from API version 2024-05-01-preview +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - trafficControllerName - traffic controller name for path // - options - AssociationsInterfaceClientListByTrafficControllerOptions contains the optional parameters for the AssociationsInterfaceClient.NewListByTrafficControllerPager @@ -331,7 +331,7 @@ func (client *AssociationsInterfaceClient) listByTrafficControllerCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-05-01-preview") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -349,7 +349,7 @@ func (client *AssociationsInterfaceClient) listByTrafficControllerHandleResponse // Update - Update a Association // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-05-01-preview +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - trafficControllerName - traffic controller name for path // - associationName - Name of Association @@ -402,7 +402,7 @@ func (client *AssociationsInterfaceClient) updateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-05-01-preview") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { diff --git a/sdk/resourcemanager/servicenetworking/armservicenetworking/associationsinterface_client_example_test.go b/sdk/resourcemanager/servicenetworking/armservicenetworking/associationsinterface_client_example_test.go deleted file mode 100644 index 26f63be0799c..000000000000 --- a/sdk/resourcemanager/servicenetworking/armservicenetworking/associationsinterface_client_example_test.go +++ /dev/null @@ -1,198 +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. -// DO NOT EDIT. - -package armservicenetworking_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/servicenetworking/armservicenetworking" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2024-05-01-preview/examples/AssociationsGet.json -func ExampleAssociationsInterfaceClient_NewListByTrafficControllerPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicenetworking.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewAssociationsInterfaceClient().NewListByTrafficControllerPager("rg1", "tc1", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.AssociationListResult = armservicenetworking.AssociationListResult{ - // Value: []*armservicenetworking.Association{ - // { - // Name: to.Ptr("as1"), - // Type: to.Ptr("Microsoft.ServiceNetworking/trafficControllers/associations"), - // ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1"), - // Location: to.Ptr("NorthCentralUS"), - // Properties: &armservicenetworking.AssociationProperties{ - // AssociationType: to.Ptr(armservicenetworking.AssociationTypeSubnets), - // ProvisioningState: to.Ptr(armservicenetworking.ProvisioningStateSucceeded), - // Subnet: &armservicenetworking.AssociationSubnet{ - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet"), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2024-05-01-preview/examples/AssociationGet.json -func ExampleAssociationsInterfaceClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicenetworking.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAssociationsInterfaceClient().Get(ctx, "rg1", "tc1", "as1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Association = armservicenetworking.Association{ - // Name: to.Ptr("as1"), - // Type: to.Ptr("Microsoft.ServiceNetworking/trafficControllers/associations"), - // ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1"), - // Location: to.Ptr("NorthCentralUS"), - // Properties: &armservicenetworking.AssociationProperties{ - // AssociationType: to.Ptr(armservicenetworking.AssociationTypeSubnets), - // ProvisioningState: to.Ptr(armservicenetworking.ProvisioningStateSucceeded), - // Subnet: &armservicenetworking.AssociationSubnet{ - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2024-05-01-preview/examples/AssociationPut.json -func ExampleAssociationsInterfaceClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicenetworking.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAssociationsInterfaceClient().BeginCreateOrUpdate(ctx, "rg1", "tc1", "as1", armservicenetworking.Association{ - Location: to.Ptr("NorthCentralUS"), - Properties: &armservicenetworking.AssociationProperties{ - AssociationType: to.Ptr(armservicenetworking.AssociationTypeSubnets), - Subnet: &armservicenetworking.AssociationSubnet{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Association = armservicenetworking.Association{ - // Name: to.Ptr("associatedvnet-1"), - // Type: to.Ptr("Microsoft.ServiceNetworking/trafficControllers/associations"), - // ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1"), - // Location: to.Ptr("NorthCentralUS"), - // Properties: &armservicenetworking.AssociationProperties{ - // AssociationType: to.Ptr(armservicenetworking.AssociationTypeSubnets), - // ProvisioningState: to.Ptr(armservicenetworking.ProvisioningStateSucceeded), - // Subnet: &armservicenetworking.AssociationSubnet{ - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2024-05-01-preview/examples/AssociationPatch.json -func ExampleAssociationsInterfaceClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicenetworking.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewAssociationsInterfaceClient().Update(ctx, "rg1", "tc1", "as1", armservicenetworking.AssociationUpdate{ - Properties: &armservicenetworking.AssociationUpdateProperties{ - AssociationType: to.Ptr(armservicenetworking.AssociationTypeSubnets), - Subnet: &armservicenetworking.AssociationSubnetUpdate{ - ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Association = armservicenetworking.Association{ - // Name: to.Ptr("as1"), - // Type: to.Ptr("Microsoft.ServiceNetworking/trafficControllers/associations"), - // ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1"), - // Location: to.Ptr("NorthCentralUS"), - // Properties: &armservicenetworking.AssociationProperties{ - // AssociationType: to.Ptr(armservicenetworking.AssociationTypeSubnets), - // Subnet: &armservicenetworking.AssociationSubnet{ - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2024-05-01-preview/examples/AssociationDelete.json -func ExampleAssociationsInterfaceClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicenetworking.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAssociationsInterfaceClient().BeginDelete(ctx, "rg1", "tc1", "as1", 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/servicenetworking/armservicenetworking/autorest.md b/sdk/resourcemanager/servicenetworking/armservicenetworking/autorest.md index 7e0767e40982..304d89663e15 100644 --- a/sdk/resourcemanager/servicenetworking/armservicenetworking/autorest.md +++ b/sdk/resourcemanager/servicenetworking/armservicenetworking/autorest.md @@ -5,9 +5,8 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/servicenetworking/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/servicenetworking/resource-manager/readme.go.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/servicenetworking/resource-manager/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/servicenetworking/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.0-beta.2 -tag: 2024-05-01-preview +module-version: 1.1.0 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/servicenetworking/armservicenetworking/constants.go b/sdk/resourcemanager/servicenetworking/armservicenetworking/constants.go index cbf759a4747e..8cddb278172d 100644 --- a/sdk/resourcemanager/servicenetworking/armservicenetworking/constants.go +++ b/sdk/resourcemanager/servicenetworking/armservicenetworking/constants.go @@ -10,7 +10,7 @@ package armservicenetworking const ( moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicenetworking/armservicenetworking" - moduleVersion = "v1.1.0-beta.2" + moduleVersion = "v1.1.0" ) // ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. diff --git a/sdk/resourcemanager/servicenetworking/armservicenetworking/frontendsinterface_client.go b/sdk/resourcemanager/servicenetworking/armservicenetworking/frontendsinterface_client.go index 90015a6dbaf3..e185a8a54ec1 100644 --- a/sdk/resourcemanager/servicenetworking/armservicenetworking/frontendsinterface_client.go +++ b/sdk/resourcemanager/servicenetworking/armservicenetworking/frontendsinterface_client.go @@ -46,7 +46,7 @@ func NewFrontendsInterfaceClient(subscriptionID string, credential azcore.TokenC // BeginCreateOrUpdate - Create a Frontend // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-05-01-preview +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - trafficControllerName - traffic controller name for path // - frontendName - Frontends @@ -74,7 +74,7 @@ func (client *FrontendsInterfaceClient) BeginCreateOrUpdate(ctx context.Context, // CreateOrUpdate - Create a Frontend // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-05-01-preview +// Generated from API version 2025-01-01 func (client *FrontendsInterfaceClient) createOrUpdate(ctx context.Context, resourceGroupName string, trafficControllerName string, frontendName string, resource Frontend, options *FrontendsInterfaceClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "FrontendsInterfaceClient.BeginCreateOrUpdate" @@ -120,7 +120,7 @@ func (client *FrontendsInterfaceClient) createOrUpdateCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-05-01-preview") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, resource); err != nil { @@ -132,7 +132,7 @@ func (client *FrontendsInterfaceClient) createOrUpdateCreateRequest(ctx context. // BeginDelete - Delete a Frontend // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-05-01-preview +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - trafficControllerName - traffic controller name for path // - frontendName - Frontends @@ -159,7 +159,7 @@ func (client *FrontendsInterfaceClient) BeginDelete(ctx context.Context, resourc // Delete - Delete a Frontend // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-05-01-preview +// Generated from API version 2025-01-01 func (client *FrontendsInterfaceClient) deleteOperation(ctx context.Context, resourceGroupName string, trafficControllerName string, frontendName string, options *FrontendsInterfaceClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "FrontendsInterfaceClient.BeginDelete" @@ -205,7 +205,7 @@ func (client *FrontendsInterfaceClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-05-01-preview") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -214,7 +214,7 @@ func (client *FrontendsInterfaceClient) deleteCreateRequest(ctx context.Context, // Get - Get a Frontend // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-05-01-preview +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - trafficControllerName - traffic controller name for path // - frontendName - Frontends @@ -265,7 +265,7 @@ func (client *FrontendsInterfaceClient) getCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-05-01-preview") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -282,7 +282,7 @@ func (client *FrontendsInterfaceClient) getHandleResponse(resp *http.Response) ( // NewListByTrafficControllerPager - List Frontend resources by TrafficController // -// Generated from API version 2024-05-01-preview +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - trafficControllerName - traffic controller name for path // - options - FrontendsInterfaceClientListByTrafficControllerOptions contains the optional parameters for the FrontendsInterfaceClient.NewListByTrafficControllerPager @@ -330,7 +330,7 @@ func (client *FrontendsInterfaceClient) listByTrafficControllerCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-05-01-preview") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -348,7 +348,7 @@ func (client *FrontendsInterfaceClient) listByTrafficControllerHandleResponse(re // Update - Update a Frontend // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-05-01-preview +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - trafficControllerName - traffic controller name for path // - frontendName - Frontends @@ -401,7 +401,7 @@ func (client *FrontendsInterfaceClient) updateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-05-01-preview") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { diff --git a/sdk/resourcemanager/servicenetworking/armservicenetworking/frontendsinterface_client_example_test.go b/sdk/resourcemanager/servicenetworking/armservicenetworking/frontendsinterface_client_example_test.go deleted file mode 100644 index 09b0b5fb9e92..000000000000 --- a/sdk/resourcemanager/servicenetworking/armservicenetworking/frontendsinterface_client_example_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. -// DO NOT EDIT. - -package armservicenetworking_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/servicenetworking/armservicenetworking" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2024-05-01-preview/examples/FrontendsGet.json -func ExampleFrontendsInterfaceClient_NewListByTrafficControllerPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicenetworking.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewFrontendsInterfaceClient().NewListByTrafficControllerPager("rg1", "tc1", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.FrontendListResult = armservicenetworking.FrontendListResult{ - // Value: []*armservicenetworking.Frontend{ - // { - // Name: to.Ptr("fe1"), - // Type: to.Ptr("Microsoft.ServiceNetworking/trafficControllers/frontends"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1"), - // Location: to.Ptr("NorthCentralUS"), - // Properties: &armservicenetworking.FrontendProperties{ - // Fqdn: to.Ptr("test.net"), - // ProvisioningState: to.Ptr(armservicenetworking.ProvisioningStateSucceeded), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2024-05-01-preview/examples/FrontendGet.json -func ExampleFrontendsInterfaceClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicenetworking.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFrontendsInterfaceClient().Get(ctx, "rg1", "tc1", "fe1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Frontend = armservicenetworking.Frontend{ - // Name: to.Ptr("fe1"), - // Type: to.Ptr("Microsoft.ServiceNetworking/trafficControllers/frontends"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1"), - // Location: to.Ptr("NorthCentralUS"), - // Properties: &armservicenetworking.FrontendProperties{ - // Fqdn: to.Ptr("test.net"), - // ProvisioningState: to.Ptr(armservicenetworking.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2024-05-01-preview/examples/FrontendPut.json -func ExampleFrontendsInterfaceClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicenetworking.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewFrontendsInterfaceClient().BeginCreateOrUpdate(ctx, "rg1", "tc1", "fe1", armservicenetworking.Frontend{ - Location: to.Ptr("NorthCentralUS"), - Properties: &armservicenetworking.FrontendProperties{}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Frontend = armservicenetworking.Frontend{ - // Name: to.Ptr("fe1"), - // Type: to.Ptr("Microsoft.ServiceNetworking/trafficControllers/frontends"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1"), - // Location: to.Ptr("NorthCentralUS"), - // Properties: &armservicenetworking.FrontendProperties{ - // Fqdn: to.Ptr("test.net"), - // ProvisioningState: to.Ptr(armservicenetworking.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2024-05-01-preview/examples/FrontendPatch.json -func ExampleFrontendsInterfaceClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicenetworking.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewFrontendsInterfaceClient().Update(ctx, "rg1", "tc1", "fe1", armservicenetworking.FrontendUpdate{}, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Frontend = armservicenetworking.Frontend{ - // Name: to.Ptr("fe1"), - // Type: to.Ptr("Microsoft.ServiceNetworking/trafficControllers/frontends"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1"), - // Location: to.Ptr("NorthCentralUS"), - // Properties: &armservicenetworking.FrontendProperties{ - // Fqdn: to.Ptr("test.net"), - // ProvisioningState: to.Ptr(armservicenetworking.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2024-05-01-preview/examples/FrontendDelete.json -func ExampleFrontendsInterfaceClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicenetworking.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewFrontendsInterfaceClient().BeginDelete(ctx, "rg1", "tc1", "fe1", 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/servicenetworking/armservicenetworking/go.mod b/sdk/resourcemanager/servicenetworking/armservicenetworking/go.mod index 67fa000c561a..976a107cc3be 100644 --- a/sdk/resourcemanager/servicenetworking/armservicenetworking/go.mod +++ b/sdk/resourcemanager/servicenetworking/armservicenetworking/go.mod @@ -2,20 +2,10 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicenetworking/a go 1.18 -require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.16.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.0 -) +require github.com/Azure/azure-sdk-for-go/sdk/azcore v1.16.0 require ( github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v1.3.2 // indirect - github.com/golang-jwt/jwt/v5 v5.2.1 // indirect - github.com/google/uuid v1.6.0 // indirect - github.com/kylelemons/godebug v1.1.0 // indirect - github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect - golang.org/x/crypto v0.31.0 // indirect golang.org/x/net v0.33.0 // indirect - golang.org/x/sys v0.28.0 // indirect golang.org/x/text v0.21.0 // indirect ) diff --git a/sdk/resourcemanager/servicenetworking/armservicenetworking/go.sum b/sdk/resourcemanager/servicenetworking/armservicenetworking/go.sum index 9620a8f197a3..823eafcd76d5 100644 --- a/sdk/resourcemanager/servicenetworking/armservicenetworking/go.sum +++ b/sdk/resourcemanager/servicenetworking/armservicenetworking/go.sum @@ -1,35 +1,12 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.16.0 h1:JZg6HRh6W6U4OLl6lk7BZ7BLisIzM9dG1R50zUk9C/M= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.16.0/go.mod h1:YL1xnZ6QejvQHWJrX/AvhFl4WW4rqHVoKspWNVwFk0M= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.0 h1:B/dfvscEQtew9dVuoxqxrUKKv8Ih2f55PydknDamU+g= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.0/go.mod h1:fiPSssYvltE08HJchL04dOy+RD4hgrjph0cwGGMntdI= -github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.0 h1:+m0M/LFxN43KvULkDNfdXOgrjtg6UYJPFBJyuEcRCAw= github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 h1:ywEEhmNahHBihViHepv3xPBn1663uRv2t2q/ESv9seY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0/go.mod h1:iZDifYGJTIgIIkYRNWPENUnqx6bJ2xnSDFI2tjwZNuY= -github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1 h1:WJTmL004Abzc5wDB5VtZG2PJk5ndYDgVacGqfirKxjM= -github.com/AzureAD/microsoft-authentication-library-for-go v1.3.2 h1:kYRSnvJju5gYVyhkij+RTJ/VR6QIUaCfWeaFm2ycsjQ= -github.com/AzureAD/microsoft-authentication-library-for-go v1.3.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= -github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= -github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= -github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= -github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= -github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/keybase/go-keychain v0.0.0-20231219164618-57a3676c3af6 h1:IsMZxCuZqKuao2vNdfD82fjjgPLfyHLpR41Z88viRWs= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= -github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/redis/go-redis/v9 v9.6.1 h1:HHDteefn6ZkTtY5fGUE8tj8uy85AHk6zP7CpzIAM0y4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= -golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= -golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/sdk/resourcemanager/servicenetworking/armservicenetworking/operations_client.go b/sdk/resourcemanager/servicenetworking/armservicenetworking/operations_client.go index ae25aca1116d..46aaa7a4dd05 100644 --- a/sdk/resourcemanager/servicenetworking/armservicenetworking/operations_client.go +++ b/sdk/resourcemanager/servicenetworking/armservicenetworking/operations_client.go @@ -39,7 +39,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - List the operations for the provider // -// Generated from API version 2024-05-01-preview +// Generated from API version 2025-01-01 // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ @@ -72,7 +72,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-05-01-preview") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/servicenetworking/armservicenetworking/operations_client_example_test.go b/sdk/resourcemanager/servicenetworking/armservicenetworking/operations_client_example_test.go deleted file mode 100644 index 4cec2e2c5ff3..000000000000 --- a/sdk/resourcemanager/servicenetworking/armservicenetworking/operations_client_example_test.go +++ /dev/null @@ -1,57 +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. -// DO NOT EDIT. - -package armservicenetworking_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicenetworking/armservicenetworking" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2024-05-01-preview/examples/OperationsList.json -func ExampleOperationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicenetworking.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewOperationsClient().NewListPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.OperationListResult = armservicenetworking.OperationListResult{ - // Value: []*armservicenetworking.Operation{ - // { - // Name: to.Ptr("Microsoft.ServiceNetworking/trafficControllers/read"), - // Display: &armservicenetworking.OperationDisplay{ - // Description: to.Ptr("Traffic Controller is a L7 Load Balancing solution for a Multi Cluster setup"), - // Operation: to.Ptr("Get Traffic Controller configuration"), - // Provider: to.Ptr("Microsoft Service Networking"), - // Resource: to.Ptr("Traffic Controller"), - // }, - // IsDataAction: to.Ptr(false), - // Origin: to.Ptr(armservicenetworking.OriginUserSystem), - // }}, - // } - } -} diff --git a/sdk/resourcemanager/servicenetworking/armservicenetworking/securitypoliciesinterface_client.go b/sdk/resourcemanager/servicenetworking/armservicenetworking/securitypoliciesinterface_client.go index b43bd0e143d4..35584948d7e5 100644 --- a/sdk/resourcemanager/servicenetworking/armservicenetworking/securitypoliciesinterface_client.go +++ b/sdk/resourcemanager/servicenetworking/armservicenetworking/securitypoliciesinterface_client.go @@ -46,7 +46,7 @@ func NewSecurityPoliciesInterfaceClient(subscriptionID string, credential azcore // BeginCreateOrUpdate - Create a SecurityPolicy // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-05-01-preview +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - trafficControllerName - traffic controller name for path // - securityPolicyName - SecurityPolicy @@ -74,7 +74,7 @@ func (client *SecurityPoliciesInterfaceClient) BeginCreateOrUpdate(ctx context.C // CreateOrUpdate - Create a SecurityPolicy // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-05-01-preview +// Generated from API version 2025-01-01 func (client *SecurityPoliciesInterfaceClient) createOrUpdate(ctx context.Context, resourceGroupName string, trafficControllerName string, securityPolicyName string, resource SecurityPolicy, options *SecurityPoliciesInterfaceClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "SecurityPoliciesInterfaceClient.BeginCreateOrUpdate" @@ -120,7 +120,7 @@ func (client *SecurityPoliciesInterfaceClient) createOrUpdateCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-05-01-preview") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, resource); err != nil { @@ -132,7 +132,7 @@ func (client *SecurityPoliciesInterfaceClient) createOrUpdateCreateRequest(ctx c // BeginDelete - Delete a SecurityPolicy // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-05-01-preview +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - trafficControllerName - traffic controller name for path // - securityPolicyName - SecurityPolicy @@ -159,7 +159,7 @@ func (client *SecurityPoliciesInterfaceClient) BeginDelete(ctx context.Context, // Delete - Delete a SecurityPolicy // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-05-01-preview +// Generated from API version 2025-01-01 func (client *SecurityPoliciesInterfaceClient) deleteOperation(ctx context.Context, resourceGroupName string, trafficControllerName string, securityPolicyName string, options *SecurityPoliciesInterfaceClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "SecurityPoliciesInterfaceClient.BeginDelete" @@ -205,7 +205,7 @@ func (client *SecurityPoliciesInterfaceClient) deleteCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-05-01-preview") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -214,7 +214,7 @@ func (client *SecurityPoliciesInterfaceClient) deleteCreateRequest(ctx context.C // Get - Get a SecurityPolicy // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-05-01-preview +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - trafficControllerName - traffic controller name for path // - securityPolicyName - SecurityPolicy @@ -266,7 +266,7 @@ func (client *SecurityPoliciesInterfaceClient) getCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-05-01-preview") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -283,7 +283,7 @@ func (client *SecurityPoliciesInterfaceClient) getHandleResponse(resp *http.Resp // NewListByTrafficControllerPager - List SecurityPolicy resources by TrafficController // -// Generated from API version 2024-05-01-preview +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - trafficControllerName - traffic controller name for path // - options - SecurityPoliciesInterfaceClientListByTrafficControllerOptions contains the optional parameters for the SecurityPoliciesInterfaceClient.NewListByTrafficControllerPager @@ -331,7 +331,7 @@ func (client *SecurityPoliciesInterfaceClient) listByTrafficControllerCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-05-01-preview") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -349,7 +349,7 @@ func (client *SecurityPoliciesInterfaceClient) listByTrafficControllerHandleResp // Update - Update a SecurityPolicy // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-05-01-preview +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - trafficControllerName - traffic controller name for path // - securityPolicyName - SecurityPolicy @@ -402,7 +402,7 @@ func (client *SecurityPoliciesInterfaceClient) updateCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-05-01-preview") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { diff --git a/sdk/resourcemanager/servicenetworking/armservicenetworking/securitypoliciesinterface_client_example_test.go b/sdk/resourcemanager/servicenetworking/armservicenetworking/securitypoliciesinterface_client_example_test.go deleted file mode 100644 index 8f3b984aa5bb..000000000000 --- a/sdk/resourcemanager/servicenetworking/armservicenetworking/securitypoliciesinterface_client_example_test.go +++ /dev/null @@ -1,197 +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. -// DO NOT EDIT. - -package armservicenetworking_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/servicenetworking/armservicenetworking" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2024-05-01-preview/examples/SecurityPoliciesGetList.json -func ExampleSecurityPoliciesInterfaceClient_NewListByTrafficControllerPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicenetworking.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewSecurityPoliciesInterfaceClient().NewListByTrafficControllerPager("rg1", "tc1", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.SecurityPolicyListResult = armservicenetworking.SecurityPolicyListResult{ - // Value: []*armservicenetworking.SecurityPolicy{ - // { - // Name: to.Ptr("waf-0"), - // Type: to.Ptr("Microsoft.ServiceNetworking/trafficControllers/securityPolicies"), - // ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/sample-tc/securityPolicies/waf-0"), - // Location: to.Ptr("eastus"), - // Properties: &armservicenetworking.SecurityPolicyProperties{ - // PolicyType: to.Ptr(armservicenetworking.PolicyTypeWAF), - // ProvisioningState: to.Ptr(armservicenetworking.ProvisioningStateSucceeded), - // WafPolicy: &armservicenetworking.WafPolicy{ - // ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Networking/applicationGatewayWebApplicationFirewallPolicies/wp-0"), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2024-05-01-preview/examples/SecurityPolicyGet.json -func ExampleSecurityPoliciesInterfaceClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicenetworking.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSecurityPoliciesInterfaceClient().Get(ctx, "rg1", "tc1", "sp1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SecurityPolicy = armservicenetworking.SecurityPolicy{ - // Name: to.Ptr("waf-0"), - // Type: to.Ptr("Microsoft.ServiceNetworking/trafficControllers/securityPolicies"), - // ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/sample-tc/securityPolicies/waf-0"), - // Location: to.Ptr("eastus"), - // Properties: &armservicenetworking.SecurityPolicyProperties{ - // PolicyType: to.Ptr(armservicenetworking.PolicyTypeWAF), - // ProvisioningState: to.Ptr(armservicenetworking.ProvisioningStateSucceeded), - // WafPolicy: &armservicenetworking.WafPolicy{ - // ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Networking/applicationGatewayWebApplicationFirewallPolicies/wp-0"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2024-05-01-preview/examples/SecurityPolicyPut.json -func ExampleSecurityPoliciesInterfaceClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicenetworking.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSecurityPoliciesInterfaceClient().BeginCreateOrUpdate(ctx, "rg1", "tc1", "sp1", armservicenetworking.SecurityPolicy{ - Location: to.Ptr("NorthCentralUS"), - Properties: &armservicenetworking.SecurityPolicyProperties{ - WafPolicy: &armservicenetworking.WafPolicy{ - ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Networking/applicationGatewayWebApplicationFirewallPolicies/wp-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) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SecurityPolicy = armservicenetworking.SecurityPolicy{ - // Name: to.Ptr("waf-0"), - // Type: to.Ptr("Microsoft.ServiceNetworking/trafficControllers/securityPolicies"), - // ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/sample-tc/securityPolicies/waf-0"), - // Location: to.Ptr("eastus"), - // Properties: &armservicenetworking.SecurityPolicyProperties{ - // PolicyType: to.Ptr(armservicenetworking.PolicyTypeWAF), - // ProvisioningState: to.Ptr(armservicenetworking.ProvisioningStateSucceeded), - // WafPolicy: &armservicenetworking.WafPolicy{ - // ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Networking/applicationGatewayWebApplicationFirewallPolicies/wp-0"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2024-05-01-preview/examples/SecurityPolicyPatch.json -func ExampleSecurityPoliciesInterfaceClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicenetworking.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewSecurityPoliciesInterfaceClient().Update(ctx, "rg1", "tc1", "sp1", armservicenetworking.SecurityPolicyUpdate{ - Properties: &armservicenetworking.SecurityPolicyUpdateProperties{ - WafPolicy: &armservicenetworking.WafPolicyUpdate{ - ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Networking/applicationGatewayWebApplicationFirewallPolicies/wp-0"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SecurityPolicy = armservicenetworking.SecurityPolicy{ - // Name: to.Ptr("waf-0"), - // Type: to.Ptr("Microsoft.ServiceNetworking/trafficControllers/securityPolicies"), - // ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/sample-tc/securityPolicies/waf-0"), - // Location: to.Ptr("eastus"), - // Properties: &armservicenetworking.SecurityPolicyProperties{ - // PolicyType: to.Ptr(armservicenetworking.PolicyTypeWAF), - // ProvisioningState: to.Ptr(armservicenetworking.ProvisioningStateSucceeded), - // WafPolicy: &armservicenetworking.WafPolicy{ - // ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Networking/applicationGatewayWebApplicationFirewallPolicies/wp-0"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2024-05-01-preview/examples/SecurityPolicyDelete.json -func ExampleSecurityPoliciesInterfaceClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicenetworking.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewSecurityPoliciesInterfaceClient().BeginDelete(ctx, "rg1", "tc1", "sp1", 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/servicenetworking/armservicenetworking/trafficcontrollerinterface_client.go b/sdk/resourcemanager/servicenetworking/armservicenetworking/trafficcontrollerinterface_client.go index 7a6f8a7978ef..7e734cf35a5b 100644 --- a/sdk/resourcemanager/servicenetworking/armservicenetworking/trafficcontrollerinterface_client.go +++ b/sdk/resourcemanager/servicenetworking/armservicenetworking/trafficcontrollerinterface_client.go @@ -46,7 +46,7 @@ func NewTrafficControllerInterfaceClient(subscriptionID string, credential azcor // BeginCreateOrUpdate - Create a TrafficController // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-05-01-preview +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - trafficControllerName - traffic controller name for path // - resource - Resource create parameters. @@ -73,7 +73,7 @@ func (client *TrafficControllerInterfaceClient) BeginCreateOrUpdate(ctx context. // CreateOrUpdate - Create a TrafficController // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-05-01-preview +// Generated from API version 2025-01-01 func (client *TrafficControllerInterfaceClient) createOrUpdate(ctx context.Context, resourceGroupName string, trafficControllerName string, resource TrafficController, options *TrafficControllerInterfaceClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "TrafficControllerInterfaceClient.BeginCreateOrUpdate" @@ -115,7 +115,7 @@ func (client *TrafficControllerInterfaceClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-05-01-preview") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, resource); err != nil { @@ -127,7 +127,7 @@ func (client *TrafficControllerInterfaceClient) createOrUpdateCreateRequest(ctx // BeginDelete - Delete a TrafficController // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-05-01-preview +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - trafficControllerName - traffic controller name for path // - options - TrafficControllerInterfaceClientBeginDeleteOptions contains the optional parameters for the TrafficControllerInterfaceClient.BeginDelete @@ -153,7 +153,7 @@ func (client *TrafficControllerInterfaceClient) BeginDelete(ctx context.Context, // Delete - Delete a TrafficController // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-05-01-preview +// Generated from API version 2025-01-01 func (client *TrafficControllerInterfaceClient) deleteOperation(ctx context.Context, resourceGroupName string, trafficControllerName string, options *TrafficControllerInterfaceClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "TrafficControllerInterfaceClient.BeginDelete" @@ -195,7 +195,7 @@ func (client *TrafficControllerInterfaceClient) deleteCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-05-01-preview") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -204,7 +204,7 @@ func (client *TrafficControllerInterfaceClient) deleteCreateRequest(ctx context. // Get - Get a TrafficController // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-05-01-preview +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - trafficControllerName - traffic controller name for path // - options - TrafficControllerInterfaceClientGetOptions contains the optional parameters for the TrafficControllerInterfaceClient.Get @@ -251,7 +251,7 @@ func (client *TrafficControllerInterfaceClient) getCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-05-01-preview") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -268,7 +268,7 @@ func (client *TrafficControllerInterfaceClient) getHandleResponse(resp *http.Res // NewListByResourceGroupPager - List TrafficController resources by resource group // -// Generated from API version 2024-05-01-preview +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - TrafficControllerInterfaceClientListByResourceGroupOptions contains the optional parameters for the TrafficControllerInterfaceClient.NewListByResourceGroupPager // method. @@ -311,7 +311,7 @@ func (client *TrafficControllerInterfaceClient) listByResourceGroupCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-05-01-preview") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -328,7 +328,7 @@ func (client *TrafficControllerInterfaceClient) listByResourceGroupHandleRespons // NewListBySubscriptionPager - List TrafficController resources by subscription ID // -// Generated from API version 2024-05-01-preview +// Generated from API version 2025-01-01 // - options - TrafficControllerInterfaceClientListBySubscriptionOptions contains the optional parameters for the TrafficControllerInterfaceClient.NewListBySubscriptionPager // method. func (client *TrafficControllerInterfaceClient) NewListBySubscriptionPager(options *TrafficControllerInterfaceClientListBySubscriptionOptions) *runtime.Pager[TrafficControllerInterfaceClientListBySubscriptionResponse] { @@ -366,7 +366,7 @@ func (client *TrafficControllerInterfaceClient) listBySubscriptionCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-05-01-preview") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -384,7 +384,7 @@ func (client *TrafficControllerInterfaceClient) listBySubscriptionHandleResponse // Update - Update a TrafficController // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-05-01-preview +// Generated from API version 2025-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - trafficControllerName - traffic controller name for path // - properties - The resource properties to be updated. @@ -432,7 +432,7 @@ func (client *TrafficControllerInterfaceClient) updateCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-05-01-preview") + reqQP.Set("api-version", "2025-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, properties); err != nil { diff --git a/sdk/resourcemanager/servicenetworking/armservicenetworking/trafficcontrollerinterface_client_example_test.go b/sdk/resourcemanager/servicenetworking/armservicenetworking/trafficcontrollerinterface_client_example_test.go deleted file mode 100644 index ca2d691f027c..000000000000 --- a/sdk/resourcemanager/servicenetworking/armservicenetworking/trafficcontrollerinterface_client_example_test.go +++ /dev/null @@ -1,315 +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. -// DO NOT EDIT. - -package armservicenetworking_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/servicenetworking/armservicenetworking" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2024-05-01-preview/examples/TrafficControllersGetList.json -func ExampleTrafficControllerInterfaceClient_NewListBySubscriptionPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicenetworking.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewTrafficControllerInterfaceClient().NewListBySubscriptionPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.TrafficControllerListResult = armservicenetworking.TrafficControllerListResult{ - // Value: []*armservicenetworking.TrafficController{ - // { - // Name: to.Ptr("tc1"), - // Type: to.Ptr("Microsoft.ServiceNetworking/trafficControllers"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1"), - // Location: to.Ptr("NorthCentralUS"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // }, - // Properties: &armservicenetworking.TrafficControllerProperties{ - // Associations: []*armservicenetworking.ResourceID{ - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1"), - // }}, - // ConfigurationEndpoints: []*string{ - // to.Ptr("abc.trafficcontroller.azure.net")}, - // Frontends: []*armservicenetworking.ResourceID{ - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1"), - // }}, - // ProvisioningState: to.Ptr(armservicenetworking.ProvisioningStateSucceeded), - // SecurityPolicies: []*armservicenetworking.ResourceID{ - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/securityPolicies/sp1"), - // }}, - // SecurityPolicyConfigurations: &armservicenetworking.SecurityPolicyConfigurations{ - // WafSecurityPolicy: &armservicenetworking.WafSecurityPolicy{ - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/securityPolicies/waf-0"), - // }, - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2024-05-01-preview/examples/TrafficControllersGet.json -func ExampleTrafficControllerInterfaceClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicenetworking.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewTrafficControllerInterfaceClient().NewListByResourceGroupPager("rg1", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.TrafficControllerListResult = armservicenetworking.TrafficControllerListResult{ - // Value: []*armservicenetworking.TrafficController{ - // { - // Name: to.Ptr("tc1"), - // Type: to.Ptr("Microsoft.ServiceNetworking/trafficControllers"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1"), - // Location: to.Ptr("NorthCentralUS"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // }, - // Properties: &armservicenetworking.TrafficControllerProperties{ - // Associations: []*armservicenetworking.ResourceID{ - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1"), - // }}, - // ConfigurationEndpoints: []*string{ - // to.Ptr("abc.trafficcontroller.azure.net")}, - // Frontends: []*armservicenetworking.ResourceID{ - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1"), - // }}, - // ProvisioningState: to.Ptr(armservicenetworking.ProvisioningStateSucceeded), - // SecurityPolicies: []*armservicenetworking.ResourceID{ - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/securityPolicies/sp1"), - // }}, - // SecurityPolicyConfigurations: &armservicenetworking.SecurityPolicyConfigurations{ - // WafSecurityPolicy: &armservicenetworking.WafSecurityPolicy{ - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/securityPolicies/waf-0"), - // }, - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2024-05-01-preview/examples/TrafficControllerGet.json -func ExampleTrafficControllerInterfaceClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicenetworking.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewTrafficControllerInterfaceClient().Get(ctx, "rg1", "tc1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.TrafficController = armservicenetworking.TrafficController{ - // Name: to.Ptr("tc1"), - // Type: to.Ptr("Microsoft.ServiceNetworking/trafficControllers"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1"), - // Location: to.Ptr("NorthCentralUS"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // }, - // Properties: &armservicenetworking.TrafficControllerProperties{ - // Associations: []*armservicenetworking.ResourceID{ - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1"), - // }}, - // ConfigurationEndpoints: []*string{ - // to.Ptr("abc.trafficcontroller.azure.net")}, - // Frontends: []*armservicenetworking.ResourceID{ - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1"), - // }}, - // ProvisioningState: to.Ptr(armservicenetworking.ProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2024-05-01-preview/examples/TrafficControllerPut.json -func ExampleTrafficControllerInterfaceClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicenetworking.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewTrafficControllerInterfaceClient().BeginCreateOrUpdate(ctx, "rg1", "tc1", armservicenetworking.TrafficController{ - Location: to.Ptr("NorthCentralUS"), - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.TrafficController = armservicenetworking.TrafficController{ - // Name: to.Ptr("tc1"), - // Type: to.Ptr("Microsoft.ServiceNetworking/trafficControllers"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1"), - // Location: to.Ptr("NorthCentralUS"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // }, - // Properties: &armservicenetworking.TrafficControllerProperties{ - // Associations: []*armservicenetworking.ResourceID{ - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1"), - // }}, - // ConfigurationEndpoints: []*string{ - // to.Ptr("abc.trafficcontroller.azure.net")}, - // Frontends: []*armservicenetworking.ResourceID{ - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1"), - // }}, - // ProvisioningState: to.Ptr(armservicenetworking.ProvisioningStateSucceeded), - // SecurityPolicies: []*armservicenetworking.ResourceID{ - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/securityPolicies/sp1"), - // }}, - // SecurityPolicyConfigurations: &armservicenetworking.SecurityPolicyConfigurations{ - // WafSecurityPolicy: &armservicenetworking.WafSecurityPolicy{ - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/securityPolicies/waf-0"), - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2024-05-01-preview/examples/TrafficControllerPatch.json -func ExampleTrafficControllerInterfaceClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicenetworking.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewTrafficControllerInterfaceClient().Update(ctx, "rg1", "tc1", armservicenetworking.TrafficControllerUpdate{ - Tags: map[string]*string{ - "key1": to.Ptr("value1"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.TrafficController = armservicenetworking.TrafficController{ - // Name: to.Ptr("tc1"), - // Type: to.Ptr("Microsoft.ServiceNetworking/trafficControllers"), - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1"), - // Location: to.Ptr("NorthCentralUS"), - // Tags: map[string]*string{ - // "key1": to.Ptr("value1"), - // }, - // Properties: &armservicenetworking.TrafficControllerProperties{ - // Associations: []*armservicenetworking.ResourceID{ - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1"), - // }}, - // ConfigurationEndpoints: []*string{ - // to.Ptr("abc.trafficcontroller.azure.net")}, - // Frontends: []*armservicenetworking.ResourceID{ - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1"), - // }}, - // ProvisioningState: to.Ptr(armservicenetworking.ProvisioningStateSucceeded), - // SecurityPolicies: []*armservicenetworking.ResourceID{ - // { - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/securityPolicies/sp1"), - // }}, - // SecurityPolicyConfigurations: &armservicenetworking.SecurityPolicyConfigurations{ - // WafSecurityPolicy: &armservicenetworking.WafSecurityPolicy{ - // ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/securityPolicies/waf-0"), - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7189fb57f69468c56df76f9a4d68dd9ff04ab100/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2024-05-01-preview/examples/TrafficControllerDelete.json -func ExampleTrafficControllerInterfaceClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armservicenetworking.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewTrafficControllerInterfaceClient().BeginDelete(ctx, "rg1", "tc1", 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) - } -}