From 998503dd5140777d6ba1b92a6fe11a91e7cc1f83 Mon Sep 17 00:00:00 2001 From: Alancere <804873052@qq.com> Date: Mon, 5 Jun 2023 11:21:51 +0800 Subject: [PATCH] [Release] sdk/resourcemanager/trafficmanager/armtrafficmanager/1.2.0 generation from spec commit: 0d41e635294dce73dfa99b07f3da4b68a9c9e29c --- .../armtrafficmanager/CHANGELOG.md | 9 + .../armtrafficmanager/autorest.md | 8 +- .../armtrafficmanager/client_factory.go | 3 +- .../armtrafficmanager/constants.go | 21 +- .../armtrafficmanager/endpoints_client.go | 27 ++- .../endpoints_client_example_test.go | 61 ++++- .../geographichierarchies_client.go | 4 +- ...ographichierarchies_client_example_test.go | 2 +- .../trafficmanager/armtrafficmanager/go.mod | 16 +- .../trafficmanager/armtrafficmanager/go.sum | 36 +-- .../armtrafficmanager/heatmap_client.go | 9 +- .../heatmap_client_example_test.go | 6 +- .../armtrafficmanager/models.go | 214 +++++++++--------- .../armtrafficmanager/models_serde.go | 4 + .../armtrafficmanager/profiles_client.go | 90 ++++++-- .../profiles_client_example_test.go | 88 +++++-- .../armtrafficmanager/response_types.go | 5 + .../usermetricskeys_client.go | 15 +- .../usermetricskeys_client_example_test.go | 6 +- 19 files changed, 408 insertions(+), 216 deletions(-) diff --git a/sdk/resourcemanager/trafficmanager/armtrafficmanager/CHANGELOG.md b/sdk/resourcemanager/trafficmanager/armtrafficmanager/CHANGELOG.md index 3a7cad7f1fc3..33f5aaf12291 100644 --- a/sdk/resourcemanager/trafficmanager/armtrafficmanager/CHANGELOG.md +++ b/sdk/resourcemanager/trafficmanager/armtrafficmanager/CHANGELOG.md @@ -1,5 +1,14 @@ # Release History +## 1.2.0 (2023-06-23) +### Features Added + +- New value `EndpointMonitorStatusUnmonitored` added to enum type `EndpointMonitorStatus` +- New enum type `AlwaysServe` with values `AlwaysServeDisabled`, `AlwaysServeEnabled` +- New function `*ProfilesClient.CheckTrafficManagerNameAvailabilityV2(context.Context, CheckTrafficManagerRelativeDNSNameAvailabilityParameters, *ProfilesClientCheckTrafficManagerNameAvailabilityV2Options) (ProfilesClientCheckTrafficManagerNameAvailabilityV2Response, error)` +- New field `AlwaysServe` in struct `EndpointProperties` + + ## 1.1.0 (2023-04-07) ### Features Added diff --git a/sdk/resourcemanager/trafficmanager/armtrafficmanager/autorest.md b/sdk/resourcemanager/trafficmanager/armtrafficmanager/autorest.md index 75368044b884..aa7862b81919 100644 --- a/sdk/resourcemanager/trafficmanager/armtrafficmanager/autorest.md +++ b/sdk/resourcemanager/trafficmanager/armtrafficmanager/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.0 - +module-version: 1.2.0 +tag: package-2022-04 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/trafficmanager/armtrafficmanager/client_factory.go b/sdk/resourcemanager/trafficmanager/armtrafficmanager/client_factory.go index 467455c4531c..677da7831069 100644 --- a/sdk/resourcemanager/trafficmanager/armtrafficmanager/client_factory.go +++ b/sdk/resourcemanager/trafficmanager/armtrafficmanager/client_factory.go @@ -24,8 +24,7 @@ type ClientFactory struct { // NewClientFactory creates a new instance of ClientFactory with the specified values. // The parameter values will be propagated to any client created from this factory. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { diff --git a/sdk/resourcemanager/trafficmanager/armtrafficmanager/constants.go b/sdk/resourcemanager/trafficmanager/armtrafficmanager/constants.go index c249b68fa791..3c3ab4e1f7b4 100644 --- a/sdk/resourcemanager/trafficmanager/armtrafficmanager/constants.go +++ b/sdk/resourcemanager/trafficmanager/armtrafficmanager/constants.go @@ -11,7 +11,7 @@ package armtrafficmanager const ( moduleName = "armtrafficmanager" - moduleVersion = "v1.1.0" + moduleVersion = "v1.2.0" ) // AllowedEndpointRecordType - The allowed type DNS record types for this profile. @@ -34,6 +34,23 @@ func PossibleAllowedEndpointRecordTypeValues() []AllowedEndpointRecordType { } } +// AlwaysServe - If Always Serve is enabled, probing for endpoint health will be disabled and endpoints will be included in +// the traffic routing method. +type AlwaysServe string + +const ( + AlwaysServeDisabled AlwaysServe = "Disabled" + AlwaysServeEnabled AlwaysServe = "Enabled" +) + +// PossibleAlwaysServeValues returns the possible values for the AlwaysServe const type. +func PossibleAlwaysServeValues() []AlwaysServe { + return []AlwaysServe{ + AlwaysServeDisabled, + AlwaysServeEnabled, + } +} + // EndpointMonitorStatus - The monitoring status of the endpoint. type EndpointMonitorStatus string @@ -44,6 +61,7 @@ const ( EndpointMonitorStatusInactive EndpointMonitorStatus = "Inactive" EndpointMonitorStatusOnline EndpointMonitorStatus = "Online" EndpointMonitorStatusStopped EndpointMonitorStatus = "Stopped" + EndpointMonitorStatusUnmonitored EndpointMonitorStatus = "Unmonitored" ) // PossibleEndpointMonitorStatusValues returns the possible values for the EndpointMonitorStatus const type. @@ -55,6 +73,7 @@ func PossibleEndpointMonitorStatusValues() []EndpointMonitorStatus { EndpointMonitorStatusInactive, EndpointMonitorStatusOnline, EndpointMonitorStatusStopped, + EndpointMonitorStatusUnmonitored, } } diff --git a/sdk/resourcemanager/trafficmanager/armtrafficmanager/endpoints_client.go b/sdk/resourcemanager/trafficmanager/armtrafficmanager/endpoints_client.go index 14c699e2275c..72bb62aec303 100644 --- a/sdk/resourcemanager/trafficmanager/armtrafficmanager/endpoints_client.go +++ b/sdk/resourcemanager/trafficmanager/armtrafficmanager/endpoints_client.go @@ -29,8 +29,7 @@ type EndpointsClient struct { } // NewEndpointsClient creates a new instance of EndpointsClient with the specified values. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EndpointsClient, error) { @@ -48,8 +47,8 @@ func NewEndpointsClient(subscriptionID string, credential azcore.TokenCredential // CreateOrUpdate - Create or update a Traffic Manager endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2018-08-01 -// - resourceGroupName - The name of the resource group containing the Traffic Manager endpoint to be created or updated. +// Generated from API version 2022-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - profileName - The name of the Traffic Manager profile. // - endpointType - The type of the Traffic Manager endpoint to be created or updated. // - endpointName - The name of the Traffic Manager endpoint to be created or updated. @@ -99,7 +98,7 @@ func (client *EndpointsClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-08-01") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -117,8 +116,8 @@ func (client *EndpointsClient) createOrUpdateHandleResponse(resp *http.Response) // Delete - Deletes a Traffic Manager endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2018-08-01 -// - resourceGroupName - The name of the resource group containing the Traffic Manager endpoint to be deleted. +// Generated from API version 2022-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - profileName - The name of the Traffic Manager profile. // - endpointType - The type of the Traffic Manager endpoint to be deleted. // - endpointName - The name of the Traffic Manager endpoint to be deleted. @@ -166,7 +165,7 @@ func (client *EndpointsClient) deleteCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-08-01") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -184,8 +183,8 @@ func (client *EndpointsClient) deleteHandleResponse(resp *http.Response) (Endpoi // Get - Gets a Traffic Manager endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2018-08-01 -// - resourceGroupName - The name of the resource group containing the Traffic Manager endpoint. +// Generated from API version 2022-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - profileName - The name of the Traffic Manager profile. // - endpointType - The type of the Traffic Manager endpoint. // - endpointName - The name of the Traffic Manager endpoint. @@ -233,7 +232,7 @@ func (client *EndpointsClient) getCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-08-01") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -251,8 +250,8 @@ func (client *EndpointsClient) getHandleResponse(resp *http.Response) (Endpoints // Update - Update a Traffic Manager endpoint. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2018-08-01 -// - resourceGroupName - The name of the resource group containing the Traffic Manager endpoint to be updated. +// Generated from API version 2022-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - profileName - The name of the Traffic Manager profile. // - endpointType - The type of the Traffic Manager endpoint to be updated. // - endpointName - The name of the Traffic Manager endpoint to be updated. @@ -301,7 +300,7 @@ func (client *EndpointsClient) updateCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-08-01") + reqQP.Set("api-version", "2022-04-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/trafficmanager/armtrafficmanager/endpoints_client_example_test.go b/sdk/resourcemanager/trafficmanager/armtrafficmanager/endpoints_client_example_test.go index e01d5cc8aa80..06b179bbcb6b 100644 --- a/sdk/resourcemanager/trafficmanager/armtrafficmanager/endpoints_client_example_test.go +++ b/sdk/resourcemanager/trafficmanager/armtrafficmanager/endpoints_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/trafficmanager/armtrafficmanager" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2018-08-01/examples/Endpoint-PATCH-External-Target.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/Endpoint-PATCH-External-Target.json func ExampleEndpointsClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -58,7 +58,7 @@ func ExampleEndpointsClient_Update() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2018-08-01/examples/Endpoint-GET-External-WithGeoMapping.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/Endpoint-GET-External-WithGeoMapping.json func ExampleEndpointsClient_Get_endpointGetExternalWithGeoMapping() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -93,7 +93,7 @@ func ExampleEndpointsClient_Get_endpointGetExternalWithGeoMapping() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2018-08-01/examples/Endpoint-GET-External-WithLocation.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/Endpoint-GET-External-WithLocation.json func ExampleEndpointsClient_Get_endpointGetExternalWithLocation() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -126,7 +126,7 @@ func ExampleEndpointsClient_Get_endpointGetExternalWithLocation() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2018-08-01/examples/Endpoint-GET-External-WithSubnetMapping.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/Endpoint-GET-External-WithSubnetMapping.json func ExampleEndpointsClient_Get_endpointGetExternalWithSubnetMapping() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -167,7 +167,50 @@ func ExampleEndpointsClient_Get_endpointGetExternalWithSubnetMapping() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2018-08-01/examples/Endpoint-PUT-External-WithCustomHeaders.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/Endpoint-PUT-External-WithAlwaysServe.json +func ExampleEndpointsClient_CreateOrUpdate_endpointPutExternalWithAlwaysServe() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armtrafficmanager.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewEndpointsClient().CreateOrUpdate(ctx, "azuresdkfornetautoresttrafficmanager1421", "azsmnet6386", armtrafficmanager.EndpointTypeExternalEndpoints, "azsmnet7187", armtrafficmanager.Endpoint{ + Name: to.Ptr("azsmnet7187"), + Type: to.Ptr("Microsoft.network/TrafficManagerProfiles/ExternalEndpoints"), + Properties: &armtrafficmanager.EndpointProperties{ + AlwaysServe: to.Ptr(armtrafficmanager.AlwaysServeEnabled), + EndpointLocation: to.Ptr("North Europe"), + EndpointStatus: to.Ptr(armtrafficmanager.EndpointStatusEnabled), + Target: to.Ptr("foobar.contoso.com"), + }, + }, 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.Endpoint = armtrafficmanager.Endpoint{ + // Name: to.Ptr("azsmnet7187"), + // Type: to.Ptr("Microsoft.Network/trafficManagerProfiles/externalEndpoints"), + // ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1421/providers/Microsoft.Network/trafficManagerProfiles/azsmnet6386/externalEndpoints/azsmnet7187"), + // Properties: &armtrafficmanager.EndpointProperties{ + // AlwaysServe: to.Ptr(armtrafficmanager.AlwaysServeEnabled), + // EndpointLocation: to.Ptr("North Europe"), + // EndpointMonitorStatus: to.Ptr(armtrafficmanager.EndpointMonitorStatusCheckingEndpoint), + // EndpointStatus: to.Ptr(armtrafficmanager.EndpointStatusEnabled), + // Priority: to.Ptr[int64](1), + // Target: to.Ptr("foobar.contoso.com"), + // Weight: to.Ptr[int64](1), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/Endpoint-PUT-External-WithCustomHeaders.json func ExampleEndpointsClient_CreateOrUpdate_endpointPutExternalWithCustomHeaders() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -226,7 +269,7 @@ func ExampleEndpointsClient_CreateOrUpdate_endpointPutExternalWithCustomHeaders( // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2018-08-01/examples/Endpoint-PUT-External-WithGeoMapping.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/Endpoint-PUT-External-WithGeoMapping.json func ExampleEndpointsClient_CreateOrUpdate_endpointPutExternalWithGeoMapping() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -271,7 +314,7 @@ func ExampleEndpointsClient_CreateOrUpdate_endpointPutExternalWithGeoMapping() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2018-08-01/examples/Endpoint-PUT-External-WithLocation.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/Endpoint-PUT-External-WithLocation.json func ExampleEndpointsClient_CreateOrUpdate_endpointPutExternalWithLocation() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -312,7 +355,7 @@ func ExampleEndpointsClient_CreateOrUpdate_endpointPutExternalWithLocation() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2018-08-01/examples/Endpoint-PUT-External-WithSubnetMapping.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/Endpoint-PUT-External-WithSubnetMapping.json func ExampleEndpointsClient_CreateOrUpdate_endpointPutExternalWithSubnetMapping() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -369,7 +412,7 @@ func ExampleEndpointsClient_CreateOrUpdate_endpointPutExternalWithSubnetMapping( // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2018-08-01/examples/Endpoint-DELETE-External.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/Endpoint-DELETE-External.json func ExampleEndpointsClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/trafficmanager/armtrafficmanager/geographichierarchies_client.go b/sdk/resourcemanager/trafficmanager/armtrafficmanager/geographichierarchies_client.go index 20d588d75e7a..4416d14e1342 100644 --- a/sdk/resourcemanager/trafficmanager/armtrafficmanager/geographichierarchies_client.go +++ b/sdk/resourcemanager/trafficmanager/armtrafficmanager/geographichierarchies_client.go @@ -41,7 +41,7 @@ func NewGeographicHierarchiesClient(credential azcore.TokenCredential, options * // GetDefault - Gets the default Geographic Hierarchy used by the Geographic traffic routing method. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2018-08-01 +// Generated from API version 2022-04-01 // - options - GeographicHierarchiesClientGetDefaultOptions contains the optional parameters for the GeographicHierarchiesClient.GetDefault // method. func (client *GeographicHierarchiesClient) GetDefault(ctx context.Context, options *GeographicHierarchiesClientGetDefaultOptions) (GeographicHierarchiesClientGetDefaultResponse, error) { @@ -67,7 +67,7 @@ func (client *GeographicHierarchiesClient) getDefaultCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-08-01") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/trafficmanager/armtrafficmanager/geographichierarchies_client_example_test.go b/sdk/resourcemanager/trafficmanager/armtrafficmanager/geographichierarchies_client_example_test.go index bf44e7cd9db1..a9b1788ec1a2 100644 --- a/sdk/resourcemanager/trafficmanager/armtrafficmanager/geographichierarchies_client_example_test.go +++ b/sdk/resourcemanager/trafficmanager/armtrafficmanager/geographichierarchies_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/trafficmanager/armtrafficmanager" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2018-08-01/examples/GeographicHierarchy-GET-default.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/GeographicHierarchy-GET-default.json func ExampleGeographicHierarchiesClient_GetDefault() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/trafficmanager/armtrafficmanager/go.mod b/sdk/resourcemanager/trafficmanager/armtrafficmanager/go.mod index 2f2102289587..d89325d47e2d 100644 --- a/sdk/resourcemanager/trafficmanager/armtrafficmanager/go.mod +++ b/sdk/resourcemanager/trafficmanager/armtrafficmanager/go.mod @@ -3,19 +3,19 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/trafficmanager/armt go 1.18 require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0 + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 ) require ( - github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/google/uuid v1.3.0 // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect - golang.org/x/crypto v0.6.0 // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect + golang.org/x/crypto v0.7.0 // indirect + golang.org/x/net v0.8.0 // indirect + golang.org/x/sys v0.6.0 // indirect + golang.org/x/text v0.8.0 // indirect ) diff --git a/sdk/resourcemanager/trafficmanager/armtrafficmanager/go.sum b/sdk/resourcemanager/trafficmanager/armtrafficmanager/go.sum index 8ba445a8c4da..21718b486698 100644 --- a/sdk/resourcemanager/trafficmanager/armtrafficmanager/go.sum +++ b/sdk/resourcemanager/trafficmanager/armtrafficmanager/go.sum @@ -1,13 +1,13 @@ -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 h1:rTnT/Jrcm+figWlYz4Ixzt0SJVR2cMC8lvZcimipiEY= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0/go.mod h1:ON4tFdPTwRcgWEaVDrN3584Ef+b7GgSJaXxe5fW9t4M= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 h1:uqM+VoHjVH6zdlkLF2b6O0ZANcHoj3rO0PoQ3jglUJA= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2/go.mod h1:twTKAa1E6hLmSDjLhaCkbTMQKc7p/rNLU40rLxGEOCI= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 h1:leh5DwKv6Ihwi+h60uHtn6UWAxBbZ0q8DwQVMzf61zw= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= -github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 h1:UE9n9rkJF62ArLb1F3DEjRt8O3jLwMWdSoypKV4f3MU= -github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0 h1:8kDqDngH+DmVBiCtIjCFTGa7MBnsIOkF9IccInFEbjk= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 h1:vcYCAze6p19qBW7MhZybIsqD8sMV8js0NyQM8JDnVtg= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0/go.mod h1:OQeznEEkTZ9OrhHJoDD8ZDq51FHgXjqtP9z6bEwBq9U= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= +github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 h1:OBhqkivkhkMqLPymWEppkm7vgPQY2XsHoEkaMQ0AdZY= +github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= +github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= @@ -18,14 +18,14 @@ github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9 github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/sdk/resourcemanager/trafficmanager/armtrafficmanager/heatmap_client.go b/sdk/resourcemanager/trafficmanager/armtrafficmanager/heatmap_client.go index 840567b0af17..866c64528c0d 100644 --- a/sdk/resourcemanager/trafficmanager/armtrafficmanager/heatmap_client.go +++ b/sdk/resourcemanager/trafficmanager/armtrafficmanager/heatmap_client.go @@ -30,8 +30,7 @@ type HeatMapClient struct { } // NewHeatMapClient creates a new instance of HeatMapClient with the specified values. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewHeatMapClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*HeatMapClient, error) { @@ -49,8 +48,8 @@ func NewHeatMapClient(subscriptionID string, credential azcore.TokenCredential, // Get - Gets latest heatmap for Traffic Manager profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2018-08-01 -// - resourceGroupName - The name of the resource group containing the Traffic Manager endpoint. +// Generated from API version 2022-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - profileName - The name of the Traffic Manager profile. // - options - HeatMapClientGetOptions contains the optional parameters for the HeatMapClient.Get method. func (client *HeatMapClient) Get(ctx context.Context, resourceGroupName string, profileName string, options *HeatMapClientGetOptions) (HeatMapClientGetResponse, error) { @@ -95,7 +94,7 @@ func (client *HeatMapClient) getCreateRequest(ctx context.Context, resourceGroup if options != nil && options.BotRight != nil { reqQP.Set("botRight", strings.Join(strings.Fields(strings.Trim(fmt.Sprint(options.BotRight), "[]")), ",")) } - reqQP.Set("api-version", "2018-08-01") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/trafficmanager/armtrafficmanager/heatmap_client_example_test.go b/sdk/resourcemanager/trafficmanager/armtrafficmanager/heatmap_client_example_test.go index 660caf211690..eb5558f24273 100644 --- a/sdk/resourcemanager/trafficmanager/armtrafficmanager/heatmap_client_example_test.go +++ b/sdk/resourcemanager/trafficmanager/armtrafficmanager/heatmap_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/trafficmanager/armtrafficmanager" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2018-08-01/examples/HeatMap-GET.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/HeatMap-GET.json func ExampleHeatMapClient_Get_heatMapGet() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -90,7 +90,7 @@ func ExampleHeatMapClient_Get_heatMapGet() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2018-08-01/examples/HeatMap-GET-With-Null-Values.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/HeatMap-GET-With-Null-Values.json func ExampleHeatMapClient_Get_heatMapGetWithNullValues() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -162,7 +162,7 @@ func ExampleHeatMapClient_Get_heatMapGetWithNullValues() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2018-08-01/examples/HeatMap-GET-With-TopLeft-BotRight.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/HeatMap-GET-With-TopLeft-BotRight.json func ExampleHeatMapClient_Get_heatMapGetWithTopLeftBotRight() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/trafficmanager/armtrafficmanager/models.go b/sdk/resourcemanager/trafficmanager/armtrafficmanager/models.go index 17737bb619f9..ea82828034b8 100644 --- a/sdk/resourcemanager/trafficmanager/armtrafficmanager/models.go +++ b/sdk/resourcemanager/trafficmanager/armtrafficmanager/models.go @@ -14,10 +14,10 @@ import "time" // CheckTrafficManagerRelativeDNSNameAvailabilityParameters - Parameters supplied to check Traffic Manager name operation. type CheckTrafficManagerRelativeDNSNameAvailabilityParameters struct { // The name of the resource. - Name *string `json:"name,omitempty"` + Name *string // The type of the resource. - Type *string `json:"type,omitempty"` + Type *string } // DNSConfig - Class containing DNS settings in a Traffic Manager profile. @@ -25,110 +25,114 @@ type DNSConfig struct { // The relative DNS name provided by this Traffic Manager profile. This value is combined with the DNS domain name used by // Azure Traffic Manager to form the fully-qualified domain name (FQDN) of the // profile. - RelativeName *string `json:"relativeName,omitempty"` + RelativeName *string // The DNS Time-To-Live (TTL), in seconds. This informs the local DNS resolvers and DNS clients how long to cache DNS responses // provided by this Traffic Manager profile. - TTL *int64 `json:"ttl,omitempty"` + TTL *int64 // READ-ONLY; The fully-qualified domain name (FQDN) of the Traffic Manager profile. This is formed from the concatenation // of the RelativeName with the DNS domain used by Azure Traffic Manager. - Fqdn *string `json:"fqdn,omitempty" azure:"ro"` + Fqdn *string } // DeleteOperationResult - The result of the request or operation. type DeleteOperationResult struct { // READ-ONLY; The result of the operation or request. - OperationResult *bool `json:"boolean,omitempty" azure:"ro"` + OperationResult *bool } // Endpoint - Class representing a Traffic Manager endpoint. type Endpoint struct { // Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} - ID *string `json:"id,omitempty"` + ID *string // The name of the resource - Name *string `json:"name,omitempty"` + Name *string // The properties of the Traffic Manager endpoint. - Properties *EndpointProperties `json:"properties,omitempty"` + Properties *EndpointProperties // The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles. - Type *string `json:"type,omitempty"` + Type *string } // EndpointProperties - Class representing a Traffic Manager endpoint properties. type EndpointProperties struct { + // If Always Serve is enabled, probing for endpoint health will be disabled and endpoints will be included in the traffic + // routing method. + AlwaysServe *AlwaysServe + // List of custom headers. - CustomHeaders []*EndpointPropertiesCustomHeadersItem `json:"customHeaders,omitempty"` + CustomHeaders []*EndpointPropertiesCustomHeadersItem // Specifies the location of the external or nested endpoints when using the 'Performance' traffic routing method. - EndpointLocation *string `json:"endpointLocation,omitempty"` + EndpointLocation *string // The monitoring status of the endpoint. - EndpointMonitorStatus *EndpointMonitorStatus `json:"endpointMonitorStatus,omitempty"` + EndpointMonitorStatus *EndpointMonitorStatus // The status of the endpoint. If the endpoint is Enabled, it is probed for endpoint health and is included in the traffic // routing method. - EndpointStatus *EndpointStatus `json:"endpointStatus,omitempty"` + EndpointStatus *EndpointStatus // The list of countries/regions mapped to this endpoint when using the 'Geographic' traffic routing method. Please consult // Traffic Manager Geographic documentation for a full list of accepted values. - GeoMapping []*string `json:"geoMapping,omitempty"` + GeoMapping []*string // The minimum number of endpoints that must be available in the child profile in order for the parent profile to be considered // available. Only applicable to endpoint of type 'NestedEndpoints'. - MinChildEndpoints *int64 `json:"minChildEndpoints,omitempty"` + MinChildEndpoints *int64 // The minimum number of IPv4 (DNS record type A) endpoints that must be available in the child profile in order for the parent // profile to be considered available. Only applicable to endpoint of type // 'NestedEndpoints'. - MinChildEndpointsIPv4 *int64 `json:"minChildEndpointsIPv4,omitempty"` + MinChildEndpointsIPv4 *int64 // The minimum number of IPv6 (DNS record type AAAA) endpoints that must be available in the child profile in order for the // parent profile to be considered available. Only applicable to endpoint of type // 'NestedEndpoints'. - MinChildEndpointsIPv6 *int64 `json:"minChildEndpointsIPv6,omitempty"` + MinChildEndpointsIPv6 *int64 // The priority of this endpoint when using the 'Priority' traffic routing method. Possible values are from 1 to 1000, lower // values represent higher priority. This is an optional parameter. If specified, // it must be specified on all endpoints, and no two endpoints can share the same priority value. - Priority *int64 `json:"priority,omitempty"` + Priority *int64 // The list of subnets, IP addresses, and/or address ranges mapped to this endpoint when using the 'Subnet' traffic routing // method. An empty list will match all ranges not covered by other endpoints. - Subnets []*EndpointPropertiesSubnetsItem `json:"subnets,omitempty"` + Subnets []*EndpointPropertiesSubnetsItem // The fully-qualified DNS name or IP address of the endpoint. Traffic Manager returns this value in DNS responses to direct // traffic to this endpoint. - Target *string `json:"target,omitempty"` + Target *string // The Azure Resource URI of the of the endpoint. Not applicable to endpoints of type 'ExternalEndpoints'. - TargetResourceID *string `json:"targetResourceId,omitempty"` + TargetResourceID *string // The weight of this endpoint when using the 'Weighted' traffic routing method. Possible values are from 1 to 1000. - Weight *int64 `json:"weight,omitempty"` + Weight *int64 } // EndpointPropertiesCustomHeadersItem - Custom header name and value. type EndpointPropertiesCustomHeadersItem struct { // Header name. - Name *string `json:"name,omitempty"` + Name *string // Header value. - Value *string `json:"value,omitempty"` + Value *string } // EndpointPropertiesSubnetsItem - Subnet first address, scope, and/or last address. type EndpointPropertiesSubnetsItem struct { // First address in the subnet. - First *string `json:"first,omitempty"` + First *string // Last address in the subnet. - Last *string `json:"last,omitempty"` + Last *string // Block size (number of leading bits in the subnet mask). - Scope *int32 `json:"scope,omitempty"` + Scope *int32 } // EndpointsClientCreateOrUpdateOptions contains the optional parameters for the EndpointsClient.CreateOrUpdate method. @@ -160,23 +164,23 @@ type GeographicHierarchiesClientGetDefaultOptions struct { // GeographicHierarchy - Class representing the Geographic hierarchy used with the Geographic traffic routing method. type GeographicHierarchy struct { // Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} - ID *string `json:"id,omitempty"` + ID *string // The name of the resource - Name *string `json:"name,omitempty"` + Name *string // The properties of the Geographic Hierarchy resource. - Properties *GeographicHierarchyProperties `json:"properties,omitempty"` + Properties *GeographicHierarchyProperties // The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles. - Type *string `json:"type,omitempty"` + Type *string } // GeographicHierarchyProperties - Class representing the properties of the Geographic hierarchy used with the Geographic // traffic routing method. type GeographicHierarchyProperties struct { // The region at the root of the hierarchy from all the regions in the hierarchy can be retrieved. - GeographicHierarchy *Region `json:"geographicHierarchy,omitempty"` + GeographicHierarchy *Region } // HeatMapClientGetOptions contains the optional parameters for the HeatMapClient.Get method. @@ -190,164 +194,170 @@ type HeatMapClientGetOptions struct { // HeatMapEndpoint - Class which is a sparse representation of a Traffic Manager endpoint. type HeatMapEndpoint struct { // A number uniquely identifying this endpoint in query experiences. - EndpointID *int32 `json:"endpointId,omitempty"` + EndpointID *int32 // The ARM Resource ID of this Traffic Manager endpoint. - ResourceID *string `json:"resourceId,omitempty"` + ResourceID *string } // HeatMapModel - Class representing a Traffic Manager HeatMap. type HeatMapModel struct { // Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} - ID *string `json:"id,omitempty"` + ID *string // The name of the resource - Name *string `json:"name,omitempty"` + Name *string // The properties of the Traffic Manager HeatMap. - Properties *HeatMapProperties `json:"properties,omitempty"` + Properties *HeatMapProperties // The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles. - Type *string `json:"type,omitempty"` + Type *string } // HeatMapProperties - Class representing a Traffic Manager HeatMap properties. type HeatMapProperties struct { // The ending of the time window for this HeatMap, exclusive. - EndTime *time.Time `json:"endTime,omitempty"` + EndTime *time.Time // The endpoints used in this HeatMap calculation. - Endpoints []*HeatMapEndpoint `json:"endpoints,omitempty"` + Endpoints []*HeatMapEndpoint // The beginning of the time window for this HeatMap, inclusive. - StartTime *time.Time `json:"startTime,omitempty"` + StartTime *time.Time // The traffic flows produced in this HeatMap calculation. - TrafficFlows []*TrafficFlow `json:"trafficFlows,omitempty"` + TrafficFlows []*TrafficFlow } // MonitorConfig - Class containing endpoint monitoring settings in a Traffic Manager profile. type MonitorConfig struct { // List of custom headers. - CustomHeaders []*MonitorConfigCustomHeadersItem `json:"customHeaders,omitempty"` + CustomHeaders []*MonitorConfigCustomHeadersItem // List of expected status code ranges. - ExpectedStatusCodeRanges []*MonitorConfigExpectedStatusCodeRangesItem `json:"expectedStatusCodeRanges,omitempty"` + ExpectedStatusCodeRanges []*MonitorConfigExpectedStatusCodeRangesItem // The monitor interval for endpoints in this profile. This is the interval at which Traffic Manager will check the health // of each endpoint in this profile. - IntervalInSeconds *int64 `json:"intervalInSeconds,omitempty"` + IntervalInSeconds *int64 // The path relative to the endpoint domain name used to probe for endpoint health. - Path *string `json:"path,omitempty"` + Path *string // The TCP port used to probe for endpoint health. - Port *int64 `json:"port,omitempty"` + Port *int64 // The profile-level monitoring status of the Traffic Manager profile. - ProfileMonitorStatus *ProfileMonitorStatus `json:"profileMonitorStatus,omitempty"` + ProfileMonitorStatus *ProfileMonitorStatus // The protocol (HTTP, HTTPS or TCP) used to probe for endpoint health. - Protocol *MonitorProtocol `json:"protocol,omitempty"` + Protocol *MonitorProtocol // The monitor timeout for endpoints in this profile. This is the time that Traffic Manager allows endpoints in this profile // to response to the health check. - TimeoutInSeconds *int64 `json:"timeoutInSeconds,omitempty"` + TimeoutInSeconds *int64 // The number of consecutive failed health check that Traffic Manager tolerates before declaring an endpoint in this profile // Degraded after the next failed health check. - ToleratedNumberOfFailures *int64 `json:"toleratedNumberOfFailures,omitempty"` + ToleratedNumberOfFailures *int64 } // MonitorConfigCustomHeadersItem - Custom header name and value. type MonitorConfigCustomHeadersItem struct { // Header name. - Name *string `json:"name,omitempty"` + Name *string // Header value. - Value *string `json:"value,omitempty"` + Value *string } // MonitorConfigExpectedStatusCodeRangesItem - Min and max value of a status code range. type MonitorConfigExpectedStatusCodeRangesItem struct { // Max status code. - Max *int32 `json:"max,omitempty"` + Max *int32 // Min status code. - Min *int32 `json:"min,omitempty"` + Min *int32 } // NameAvailability - Class representing a Traffic Manager Name Availability response. type NameAvailability struct { // Descriptive message that explains why the name is not available, when applicable. - Message *string `json:"message,omitempty"` + Message *string // The relative name. - Name *string `json:"name,omitempty"` + Name *string // Describes whether the relative name is available or not. - NameAvailable *bool `json:"nameAvailable,omitempty"` + NameAvailable *bool // The reason why the name is not available, when applicable. - Reason *string `json:"reason,omitempty"` + Reason *string // Traffic Manager profile resource type. - Type *string `json:"type,omitempty"` + Type *string } // Profile - Class representing a Traffic Manager profile. type Profile struct { // Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} - ID *string `json:"id,omitempty"` + ID *string // The Azure Region where the resource lives - Location *string `json:"location,omitempty"` + Location *string // The name of the resource - Name *string `json:"name,omitempty"` + Name *string // The properties of the Traffic Manager profile. - Properties *ProfileProperties `json:"properties,omitempty"` + Properties *ProfileProperties // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles. - Type *string `json:"type,omitempty"` + Type *string } // ProfileListResult - The list Traffic Manager profiles operation response. type ProfileListResult struct { // Gets the list of Traffic manager profiles. - Value []*Profile `json:"value,omitempty"` + Value []*Profile } // ProfileProperties - Class representing the Traffic Manager profile properties. type ProfileProperties struct { // The list of allowed endpoint record types. - AllowedEndpointRecordTypes []*AllowedEndpointRecordType `json:"allowedEndpointRecordTypes,omitempty"` + AllowedEndpointRecordTypes []*AllowedEndpointRecordType // The DNS settings of the Traffic Manager profile. - DNSConfig *DNSConfig `json:"dnsConfig,omitempty"` + DNSConfig *DNSConfig // The list of endpoints in the Traffic Manager profile. - Endpoints []*Endpoint `json:"endpoints,omitempty"` + Endpoints []*Endpoint // Maximum number of endpoints to be returned for MultiValue routing type. - MaxReturn *int64 `json:"maxReturn,omitempty"` + MaxReturn *int64 // The endpoint monitoring settings of the Traffic Manager profile. - MonitorConfig *MonitorConfig `json:"monitorConfig,omitempty"` + MonitorConfig *MonitorConfig // The status of the Traffic Manager profile. - ProfileStatus *ProfileStatus `json:"profileStatus,omitempty"` + ProfileStatus *ProfileStatus // The traffic routing method of the Traffic Manager profile. - TrafficRoutingMethod *TrafficRoutingMethod `json:"trafficRoutingMethod,omitempty"` + TrafficRoutingMethod *TrafficRoutingMethod // Indicates whether Traffic View is 'Enabled' or 'Disabled' for the Traffic Manager profile. Null, indicates 'Disabled'. // Enabling this feature will increase the cost of the Traffic Manage profile. - TrafficViewEnrollmentStatus *TrafficViewEnrollmentStatus `json:"trafficViewEnrollmentStatus,omitempty"` + TrafficViewEnrollmentStatus *TrafficViewEnrollmentStatus +} + +// ProfilesClientCheckTrafficManagerNameAvailabilityV2Options contains the optional parameters for the ProfilesClient.CheckTrafficManagerNameAvailabilityV2 +// method. +type ProfilesClientCheckTrafficManagerNameAvailabilityV2Options struct { + // placeholder for future optional parameters } // ProfilesClientCheckTrafficManagerRelativeDNSNameAvailabilityOptions contains the optional parameters for the ProfilesClient.CheckTrafficManagerRelativeDNSNameAvailability @@ -392,82 +402,82 @@ type ProfilesClientUpdateOptions struct { // and tags type ProxyResource struct { // Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} - ID *string `json:"id,omitempty"` + ID *string // The name of the resource - Name *string `json:"name,omitempty"` + Name *string // The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles. - Type *string `json:"type,omitempty"` + Type *string } // QueryExperience - Class representing a Traffic Manager HeatMap query experience properties. type QueryExperience struct { // REQUIRED; The id of the endpoint from the 'endpoints' array which these queries were routed to. - EndpointID *int32 `json:"endpointId,omitempty"` + EndpointID *int32 // REQUIRED; The number of queries originating from this location. - QueryCount *int32 `json:"queryCount,omitempty"` + QueryCount *int32 // The latency experienced by queries originating from this location. - Latency *float64 `json:"latency,omitempty"` + Latency *float64 } // Region - Class representing a region in the Geographic hierarchy used with the Geographic traffic routing method. type Region struct { // The code of the region - Code *string `json:"code,omitempty"` + Code *string // The name of the region - Name *string `json:"name,omitempty"` + Name *string // The list of Regions grouped under this Region in the Geographic Hierarchy. - Regions []*Region `json:"regions,omitempty"` + Regions []*Region } // Resource - The core properties of ARM resources type Resource struct { // Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} - ID *string `json:"id,omitempty"` + ID *string // The name of the resource - Name *string `json:"name,omitempty"` + Name *string // The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles. - Type *string `json:"type,omitempty"` + Type *string } // TrackedResource - The resource model definition for a ARM tracked top level resource type TrackedResource struct { // Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} - ID *string `json:"id,omitempty"` + ID *string // The Azure Region where the resource lives - Location *string `json:"location,omitempty"` + Location *string // The name of the resource - Name *string `json:"name,omitempty"` + Name *string // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` + Tags map[string]*string // The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles. - Type *string `json:"type,omitempty"` + Type *string } // TrafficFlow - Class representing a Traffic Manager HeatMap traffic flow properties. type TrafficFlow struct { // The approximate latitude that these queries originated from. - Latitude *float64 `json:"latitude,omitempty"` + Latitude *float64 // The approximate longitude that these queries originated from. - Longitude *float64 `json:"longitude,omitempty"` + Longitude *float64 // The query experiences produced in this HeatMap calculation. - QueryExperiences []*QueryExperience `json:"queryExperiences,omitempty"` + QueryExperiences []*QueryExperience // The IP address that this query experience originated from. - SourceIP *string `json:"sourceIp,omitempty"` + SourceIP *string } // UserMetricsKeysClientCreateOrUpdateOptions contains the optional parameters for the UserMetricsKeysClient.CreateOrUpdate @@ -489,20 +499,20 @@ type UserMetricsKeysClientGetOptions struct { // UserMetricsModel - Class representing Traffic Manager User Metrics. type UserMetricsModel struct { // Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} - ID *string `json:"id,omitempty"` + ID *string // The name of the resource - Name *string `json:"name,omitempty"` + Name *string // The properties of the Traffic Manager User Metrics. - Properties *UserMetricsProperties `json:"properties,omitempty"` + Properties *UserMetricsProperties // The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles. - Type *string `json:"type,omitempty"` + Type *string } // UserMetricsProperties - Class representing a Traffic Manager Real User Metrics key response. type UserMetricsProperties struct { // The key returned by the User Metrics operation. - Key *string `json:"key,omitempty"` + Key *string } diff --git a/sdk/resourcemanager/trafficmanager/armtrafficmanager/models_serde.go b/sdk/resourcemanager/trafficmanager/armtrafficmanager/models_serde.go index 56d9a9d18e34..5182d4084058 100644 --- a/sdk/resourcemanager/trafficmanager/armtrafficmanager/models_serde.go +++ b/sdk/resourcemanager/trafficmanager/armtrafficmanager/models_serde.go @@ -151,6 +151,7 @@ func (e *Endpoint) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EndpointProperties. func (e EndpointProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "alwaysServe", e.AlwaysServe) populate(objectMap, "customHeaders", e.CustomHeaders) populate(objectMap, "endpointLocation", e.EndpointLocation) populate(objectMap, "endpointMonitorStatus", e.EndpointMonitorStatus) @@ -176,6 +177,9 @@ func (e *EndpointProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "alwaysServe": + err = unpopulate(val, "AlwaysServe", &e.AlwaysServe) + delete(rawMsg, key) case "customHeaders": err = unpopulate(val, "CustomHeaders", &e.CustomHeaders) delete(rawMsg, key) diff --git a/sdk/resourcemanager/trafficmanager/armtrafficmanager/profiles_client.go b/sdk/resourcemanager/trafficmanager/armtrafficmanager/profiles_client.go index 7a933f3a57b6..8bea42bd6883 100644 --- a/sdk/resourcemanager/trafficmanager/armtrafficmanager/profiles_client.go +++ b/sdk/resourcemanager/trafficmanager/armtrafficmanager/profiles_client.go @@ -29,8 +29,7 @@ type ProfilesClient struct { } // NewProfilesClient creates a new instance of ProfilesClient with the specified values. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewProfilesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProfilesClient, error) { @@ -45,10 +44,59 @@ func NewProfilesClient(subscriptionID string, credential azcore.TokenCredential, return client, nil } +// CheckTrafficManagerNameAvailabilityV2 - Checks the availability of a Traffic Manager Relative DNS name. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2022-04-01 +// - parameters - The Traffic Manager name parameters supplied to the CheckTrafficManagerNameAvailability operation. +// - options - ProfilesClientCheckTrafficManagerNameAvailabilityV2Options contains the optional parameters for the ProfilesClient.CheckTrafficManagerNameAvailabilityV2 +// method. +func (client *ProfilesClient) CheckTrafficManagerNameAvailabilityV2(ctx context.Context, parameters CheckTrafficManagerRelativeDNSNameAvailabilityParameters, options *ProfilesClientCheckTrafficManagerNameAvailabilityV2Options) (ProfilesClientCheckTrafficManagerNameAvailabilityV2Response, error) { + req, err := client.checkTrafficManagerNameAvailabilityV2CreateRequest(ctx, parameters, options) + if err != nil { + return ProfilesClientCheckTrafficManagerNameAvailabilityV2Response{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ProfilesClientCheckTrafficManagerNameAvailabilityV2Response{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ProfilesClientCheckTrafficManagerNameAvailabilityV2Response{}, runtime.NewResponseError(resp) + } + return client.checkTrafficManagerNameAvailabilityV2HandleResponse(resp) +} + +// checkTrafficManagerNameAvailabilityV2CreateRequest creates the CheckTrafficManagerNameAvailabilityV2 request. +func (client *ProfilesClient) checkTrafficManagerNameAvailabilityV2CreateRequest(ctx context.Context, parameters CheckTrafficManagerRelativeDNSNameAvailabilityParameters, options *ProfilesClientCheckTrafficManagerNameAvailabilityV2Options) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Network/checkTrafficManagerNameAvailabilityV2" + 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.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-04-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, parameters) +} + +// checkTrafficManagerNameAvailabilityV2HandleResponse handles the CheckTrafficManagerNameAvailabilityV2 response. +func (client *ProfilesClient) checkTrafficManagerNameAvailabilityV2HandleResponse(resp *http.Response) (ProfilesClientCheckTrafficManagerNameAvailabilityV2Response, error) { + result := ProfilesClientCheckTrafficManagerNameAvailabilityV2Response{} + if err := runtime.UnmarshalAsJSON(resp, &result.NameAvailability); err != nil { + return ProfilesClientCheckTrafficManagerNameAvailabilityV2Response{}, err + } + return result, nil +} + // CheckTrafficManagerRelativeDNSNameAvailability - Checks the availability of a Traffic Manager Relative DNS name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2018-08-01 +// Generated from API version 2022-04-01 // - parameters - The Traffic Manager name parameters supplied to the CheckTrafficManagerNameAvailability operation. // - options - ProfilesClientCheckTrafficManagerRelativeDNSNameAvailabilityOptions contains the optional parameters for the // ProfilesClient.CheckTrafficManagerRelativeDNSNameAvailability method. @@ -75,7 +123,7 @@ func (client *ProfilesClient) checkTrafficManagerRelativeDNSNameAvailabilityCrea return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-08-01") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -93,8 +141,8 @@ func (client *ProfilesClient) checkTrafficManagerRelativeDNSNameAvailabilityHand // CreateOrUpdate - Create or update a Traffic Manager profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2018-08-01 -// - resourceGroupName - The name of the resource group containing the Traffic Manager profile. +// Generated from API version 2022-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - profileName - The name of the Traffic Manager profile. // - parameters - The Traffic Manager profile parameters supplied to the CreateOrUpdate operation. // - options - ProfilesClientCreateOrUpdateOptions contains the optional parameters for the ProfilesClient.CreateOrUpdate method. @@ -133,7 +181,7 @@ func (client *ProfilesClient) createOrUpdateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-08-01") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -151,8 +199,8 @@ func (client *ProfilesClient) createOrUpdateHandleResponse(resp *http.Response) // Delete - Deletes a Traffic Manager profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2018-08-01 -// - resourceGroupName - The name of the resource group containing the Traffic Manager profile to be deleted. +// Generated from API version 2022-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - profileName - The name of the Traffic Manager profile to be deleted. // - options - ProfilesClientDeleteOptions contains the optional parameters for the ProfilesClient.Delete method. func (client *ProfilesClient) Delete(ctx context.Context, resourceGroupName string, profileName string, options *ProfilesClientDeleteOptions) (ProfilesClientDeleteResponse, error) { @@ -190,7 +238,7 @@ func (client *ProfilesClient) deleteCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-08-01") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -208,8 +256,8 @@ func (client *ProfilesClient) deleteHandleResponse(resp *http.Response) (Profile // Get - Gets a Traffic Manager profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2018-08-01 -// - resourceGroupName - The name of the resource group containing the Traffic Manager profile. +// Generated from API version 2022-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - profileName - The name of the Traffic Manager profile. // - options - ProfilesClientGetOptions contains the optional parameters for the ProfilesClient.Get method. func (client *ProfilesClient) Get(ctx context.Context, resourceGroupName string, profileName string, options *ProfilesClientGetOptions) (ProfilesClientGetResponse, error) { @@ -247,7 +295,7 @@ func (client *ProfilesClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-08-01") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -264,8 +312,8 @@ func (client *ProfilesClient) getHandleResponse(resp *http.Response) (ProfilesCl // NewListByResourceGroupPager - Lists all Traffic Manager profiles within a resource group. // -// Generated from API version 2018-08-01 -// - resourceGroupName - The name of the resource group containing the Traffic Manager profiles to be listed. +// Generated from API version 2022-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - ProfilesClientListByResourceGroupOptions contains the optional parameters for the ProfilesClient.NewListByResourceGroupPager // method. func (client *ProfilesClient) NewListByResourceGroupPager(resourceGroupName string, options *ProfilesClientListByResourceGroupOptions) *runtime.Pager[ProfilesClientListByResourceGroupResponse] { @@ -306,7 +354,7 @@ func (client *ProfilesClient) listByResourceGroupCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-08-01") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -323,7 +371,7 @@ func (client *ProfilesClient) listByResourceGroupHandleResponse(resp *http.Respo // NewListBySubscriptionPager - Lists all Traffic Manager profiles within a subscription. // -// Generated from API version 2018-08-01 +// Generated from API version 2022-04-01 // - options - ProfilesClientListBySubscriptionOptions contains the optional parameters for the ProfilesClient.NewListBySubscriptionPager // method. func (client *ProfilesClient) NewListBySubscriptionPager(options *ProfilesClientListBySubscriptionOptions) *runtime.Pager[ProfilesClientListBySubscriptionResponse] { @@ -360,7 +408,7 @@ func (client *ProfilesClient) listBySubscriptionCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-08-01") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -378,8 +426,8 @@ func (client *ProfilesClient) listBySubscriptionHandleResponse(resp *http.Respon // Update - Update a Traffic Manager profile. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2018-08-01 -// - resourceGroupName - The name of the resource group containing the Traffic Manager profile. +// Generated from API version 2022-04-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. // - profileName - The name of the Traffic Manager profile. // - parameters - The Traffic Manager profile parameters supplied to the Update operation. // - options - ProfilesClientUpdateOptions contains the optional parameters for the ProfilesClient.Update method. @@ -418,7 +466,7 @@ func (client *ProfilesClient) updateCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-08-01") + reqQP.Set("api-version", "2022-04-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/trafficmanager/armtrafficmanager/profiles_client_example_test.go b/sdk/resourcemanager/trafficmanager/armtrafficmanager/profiles_client_example_test.go index 46eb957fa8cf..810494760822 100644 --- a/sdk/resourcemanager/trafficmanager/armtrafficmanager/profiles_client_example_test.go +++ b/sdk/resourcemanager/trafficmanager/armtrafficmanager/profiles_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/trafficmanager/armtrafficmanager" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2018-08-01/examples/NameAvailabilityTest_NameAvailable-POST-example-21.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/NameAvailabilityTest_NameAvailable-POST-example-21.json func ExampleProfilesClient_CheckTrafficManagerRelativeDNSNameAvailability_nameAvailabilityTestNameAvailablePost21() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -46,7 +46,7 @@ func ExampleProfilesClient_CheckTrafficManagerRelativeDNSNameAvailability_nameAv // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2018-08-01/examples/NameAvailabilityTest_NameNotAvailable-POST-example-23.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/NameAvailabilityTest_NameNotAvailable-POST-example-23.json func ExampleProfilesClient_CheckTrafficManagerRelativeDNSNameAvailability_nameAvailabilityTestNameNotAvailablePost23() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -76,7 +76,65 @@ func ExampleProfilesClient_CheckTrafficManagerRelativeDNSNameAvailability_nameAv // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2018-08-01/examples/Profile-GET-ByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/NameAvailabilityV2Test_NameAvailable-POST-example-21.json +func ExampleProfilesClient_CheckTrafficManagerNameAvailabilityV2_nameAvailabilityV2TestNameAvailablePost21() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armtrafficmanager.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewProfilesClient().CheckTrafficManagerNameAvailabilityV2(ctx, armtrafficmanager.CheckTrafficManagerRelativeDNSNameAvailabilityParameters{ + Name: to.Ptr("azsmnet5403"), + Type: to.Ptr("microsoft.network/trafficmanagerprofiles"), + }, 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.NameAvailability = armtrafficmanager.NameAvailability{ + // Name: to.Ptr("azsmnet5403"), + // Type: to.Ptr("Microsoft.Network/trafficManagerProfiles"), + // NameAvailable: to.Ptr(true), + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/NameAvailabilityV2Test_NameNotAvailable-POST-example-23.json +func ExampleProfilesClient_CheckTrafficManagerNameAvailabilityV2_nameAvailabilityV2TestNameNotAvailablePost23() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armtrafficmanager.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewProfilesClient().CheckTrafficManagerNameAvailabilityV2(ctx, armtrafficmanager.CheckTrafficManagerRelativeDNSNameAvailabilityParameters{ + Name: to.Ptr("azsmnet4696"), + Type: to.Ptr("microsoft.network/trafficmanagerprofiles"), + }, 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.NameAvailability = armtrafficmanager.NameAvailability{ + // Name: to.Ptr("azsmnet4696"), + // Type: to.Ptr("Microsoft.Network/trafficManagerProfiles"), + // Message: to.Ptr("Domain name azsmnet4696.tmpreview.watmtest.azure-test.net already exists. Please choose a different DNS prefix."), + // NameAvailable: to.Ptr(false), + // Reason: to.Ptr("AlreadyExists"), + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/Profile-GET-ByResourceGroup.json func ExampleProfilesClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -184,7 +242,7 @@ func ExampleProfilesClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2018-08-01/examples/Profile-GET-BySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/Profile-GET-BySubscription.json func ExampleProfilesClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -322,7 +380,7 @@ func ExampleProfilesClient_NewListBySubscriptionPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2018-08-01/examples/Profile-GET-WithEndpoints.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/Profile-GET-WithEndpoints.json func ExampleProfilesClient_Get_profileGetWithEndpoints() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -382,7 +440,7 @@ func ExampleProfilesClient_Get_profileGetWithEndpoints() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2018-08-01/examples/Profile-GET-WithTrafficViewDisabled.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/Profile-GET-WithTrafficViewDisabled.json func ExampleProfilesClient_Get_profileGetWithTrafficViewDisabled() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -443,7 +501,7 @@ func ExampleProfilesClient_Get_profileGetWithTrafficViewDisabled() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2018-08-01/examples/Profile-GET-WithTrafficViewEnabled.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/Profile-GET-WithTrafficViewEnabled.json func ExampleProfilesClient_Get_profileGetWithTrafficViewEnabled() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -504,7 +562,7 @@ func ExampleProfilesClient_Get_profileGetWithTrafficViewEnabled() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2018-08-01/examples/Profile-PUT-MultiValue.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/Profile-PUT-MultiValue.json func ExampleProfilesClient_CreateOrUpdate_profilePutMultiValue() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -569,7 +627,7 @@ func ExampleProfilesClient_CreateOrUpdate_profilePutMultiValue() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2018-08-01/examples/Profile-PUT-NoEndpoints.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/Profile-PUT-NoEndpoints.json func ExampleProfilesClient_CreateOrUpdate_profilePutNoEndpoints() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -630,7 +688,7 @@ func ExampleProfilesClient_CreateOrUpdate_profilePutNoEndpoints() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2018-08-01/examples/Profile-PUT-WithAliasing.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/Profile-PUT-WithAliasing.json func ExampleProfilesClient_CreateOrUpdate_profilePutWithAliasing() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -734,7 +792,7 @@ func ExampleProfilesClient_CreateOrUpdate_profilePutWithAliasing() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2018-08-01/examples/Profile-PUT-WithCustomHeaders.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/Profile-PUT-WithCustomHeaders.json func ExampleProfilesClient_CreateOrUpdate_profilePutWithCustomHeaders() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -859,7 +917,7 @@ func ExampleProfilesClient_CreateOrUpdate_profilePutWithCustomHeaders() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2018-08-01/examples/Profile-PUT-WithEndpoints.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/Profile-PUT-WithEndpoints.json func ExampleProfilesClient_CreateOrUpdate_profilePutWithEndpoints() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -945,7 +1003,7 @@ func ExampleProfilesClient_CreateOrUpdate_profilePutWithEndpoints() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2018-08-01/examples/Profile-PUT-WithNestedEndpoints.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/Profile-PUT-WithNestedEndpoints.json func ExampleProfilesClient_CreateOrUpdate_profilePutWithNestedEndpoints() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1065,7 +1123,7 @@ func ExampleProfilesClient_CreateOrUpdate_profilePutWithNestedEndpoints() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2018-08-01/examples/Profile-DELETE.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/Profile-DELETE.json func ExampleProfilesClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1087,7 +1145,7 @@ func ExampleProfilesClient_Delete() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2018-08-01/examples/Profile-PATCH-MonitorConfig.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/Profile-PATCH-MonitorConfig.json func ExampleProfilesClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/trafficmanager/armtrafficmanager/response_types.go b/sdk/resourcemanager/trafficmanager/armtrafficmanager/response_types.go index aa5160fabb1f..3906235f1646 100644 --- a/sdk/resourcemanager/trafficmanager/armtrafficmanager/response_types.go +++ b/sdk/resourcemanager/trafficmanager/armtrafficmanager/response_types.go @@ -39,6 +39,11 @@ type HeatMapClientGetResponse struct { HeatMapModel } +// ProfilesClientCheckTrafficManagerNameAvailabilityV2Response contains the response from method ProfilesClient.CheckTrafficManagerNameAvailabilityV2. +type ProfilesClientCheckTrafficManagerNameAvailabilityV2Response struct { + NameAvailability +} + // ProfilesClientCheckTrafficManagerRelativeDNSNameAvailabilityResponse contains the response from method ProfilesClient.CheckTrafficManagerRelativeDNSNameAvailability. type ProfilesClientCheckTrafficManagerRelativeDNSNameAvailabilityResponse struct { NameAvailability diff --git a/sdk/resourcemanager/trafficmanager/armtrafficmanager/usermetricskeys_client.go b/sdk/resourcemanager/trafficmanager/armtrafficmanager/usermetricskeys_client.go index 5ac1410e2e4b..245c78c16159 100644 --- a/sdk/resourcemanager/trafficmanager/armtrafficmanager/usermetricskeys_client.go +++ b/sdk/resourcemanager/trafficmanager/armtrafficmanager/usermetricskeys_client.go @@ -29,8 +29,7 @@ type UserMetricsKeysClient struct { } // NewUserMetricsKeysClient creates a new instance of UserMetricsKeysClient with the specified values. -// - subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID -// forms part of the URI for every service call. +// - subscriptionID - The ID of the target subscription. // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewUserMetricsKeysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UserMetricsKeysClient, error) { @@ -48,7 +47,7 @@ func NewUserMetricsKeysClient(subscriptionID string, credential azcore.TokenCred // CreateOrUpdate - Create or update a subscription-level key used for Real User Metrics collection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2018-08-01 +// Generated from API version 2022-04-01 // - options - UserMetricsKeysClientCreateOrUpdateOptions contains the optional parameters for the UserMetricsKeysClient.CreateOrUpdate // method. func (client *UserMetricsKeysClient) CreateOrUpdate(ctx context.Context, options *UserMetricsKeysClientCreateOrUpdateOptions) (UserMetricsKeysClientCreateOrUpdateResponse, error) { @@ -78,7 +77,7 @@ func (client *UserMetricsKeysClient) createOrUpdateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-08-01") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -96,7 +95,7 @@ func (client *UserMetricsKeysClient) createOrUpdateHandleResponse(resp *http.Res // Delete - Delete a subscription-level key used for Real User Metrics collection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2018-08-01 +// Generated from API version 2022-04-01 // - options - UserMetricsKeysClientDeleteOptions contains the optional parameters for the UserMetricsKeysClient.Delete method. func (client *UserMetricsKeysClient) Delete(ctx context.Context, options *UserMetricsKeysClientDeleteOptions) (UserMetricsKeysClientDeleteResponse, error) { req, err := client.deleteCreateRequest(ctx, options) @@ -125,7 +124,7 @@ func (client *UserMetricsKeysClient) deleteCreateRequest(ctx context.Context, op return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-08-01") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -143,7 +142,7 @@ func (client *UserMetricsKeysClient) deleteHandleResponse(resp *http.Response) ( // Get - Get the subscription-level key used for Real User Metrics collection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2018-08-01 +// Generated from API version 2022-04-01 // - options - UserMetricsKeysClientGetOptions contains the optional parameters for the UserMetricsKeysClient.Get method. func (client *UserMetricsKeysClient) Get(ctx context.Context, options *UserMetricsKeysClientGetOptions) (UserMetricsKeysClientGetResponse, error) { req, err := client.getCreateRequest(ctx, options) @@ -172,7 +171,7 @@ func (client *UserMetricsKeysClient) getCreateRequest(ctx context.Context, optio return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2018-08-01") + reqQP.Set("api-version", "2022-04-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/trafficmanager/armtrafficmanager/usermetricskeys_client_example_test.go b/sdk/resourcemanager/trafficmanager/armtrafficmanager/usermetricskeys_client_example_test.go index e7c7321fdf02..39cee611b102 100644 --- a/sdk/resourcemanager/trafficmanager/armtrafficmanager/usermetricskeys_client_example_test.go +++ b/sdk/resourcemanager/trafficmanager/armtrafficmanager/usermetricskeys_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/trafficmanager/armtrafficmanager" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2018-08-01/examples/TrafficManagerUserMetricsKeys-GET.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/TrafficManagerUserMetricsKeys-GET.json func ExampleUserMetricsKeysClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -45,7 +45,7 @@ func ExampleUserMetricsKeysClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2018-08-01/examples/TrafficManagerUserMetricsKeys-PUT.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/TrafficManagerUserMetricsKeys-PUT.json func ExampleUserMetricsKeysClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -62,7 +62,7 @@ func ExampleUserMetricsKeysClient_CreateOrUpdate() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2018-08-01/examples/TrafficManagerUserMetricsKeys-DELETE.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/0d41e635294dce73dfa99b07f3da4b68a9c9e29c/specification/trafficmanager/resource-manager/Microsoft.Network/stable/2022-04-01/examples/TrafficManagerUserMetricsKeys-DELETE.json func ExampleUserMetricsKeysClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil {