Dela via


AdvisorExtensions.CreateConfigurationAsync Method

Definition

Overloads

CreateConfigurationAsync(ResourceGroupResource, ConfigurationName, ConfigData, CancellationToken)

Create/Overwrite Azure Advisor configuration.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Advisor/configurations/{configurationName}
  • Operation Id: Configurations_CreateInResourceGroup
CreateConfigurationAsync(SubscriptionResource, ConfigurationName, ConfigData, CancellationToken)

Create/Overwrite Azure Advisor configuration and also delete all configurations of contained resource groups.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Advisor/configurations/{configurationName}
  • Operation Id: Configurations_CreateInSubscription

CreateConfigurationAsync(ResourceGroupResource, ConfigurationName, ConfigData, CancellationToken)

Source:
AdvisorExtensions.cs

Create/Overwrite Azure Advisor configuration.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Advisor/configurations/{configurationName}
  • Operation Id: Configurations_CreateInResourceGroup
public static System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Advisor.Models.ConfigData>> CreateConfigurationAsync (this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, Azure.ResourceManager.Advisor.Models.ConfigurationName configurationName, Azure.ResourceManager.Advisor.Models.ConfigData data, System.Threading.CancellationToken cancellationToken = default);
static member CreateConfigurationAsync : Azure.ResourceManager.Resources.ResourceGroupResource * Azure.ResourceManager.Advisor.Models.ConfigurationName * Azure.ResourceManager.Advisor.Models.ConfigData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Advisor.Models.ConfigData>>
<Extension()>
Public Function CreateConfigurationAsync (resourceGroupResource As ResourceGroupResource, configurationName As ConfigurationName, data As ConfigData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ConfigData))

Parameters

resourceGroupResource
ResourceGroupResource

The ResourceGroupResource instance the method will execute against.

configurationName
ConfigurationName

Advisor configuration name. Value must be 'default'.

data
ConfigData

The Azure Advisor configuration data structure.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

resourceGroupResource or data is null.

Applies to

CreateConfigurationAsync(SubscriptionResource, ConfigurationName, ConfigData, CancellationToken)

Source:
AdvisorExtensions.cs

Create/Overwrite Azure Advisor configuration and also delete all configurations of contained resource groups.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Advisor/configurations/{configurationName}
  • Operation Id: Configurations_CreateInSubscription
public static System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Advisor.Models.ConfigData>> CreateConfigurationAsync (this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Advisor.Models.ConfigurationName configurationName, Azure.ResourceManager.Advisor.Models.ConfigData data, System.Threading.CancellationToken cancellationToken = default);
static member CreateConfigurationAsync : Azure.ResourceManager.Resources.SubscriptionResource * Azure.ResourceManager.Advisor.Models.ConfigurationName * Azure.ResourceManager.Advisor.Models.ConfigData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Advisor.Models.ConfigData>>
<Extension()>
Public Function CreateConfigurationAsync (subscriptionResource As SubscriptionResource, configurationName As ConfigurationName, data As ConfigData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ConfigData))

Parameters

subscriptionResource
SubscriptionResource

The SubscriptionResource instance the method will execute against.

configurationName
ConfigurationName

Advisor configuration name. Value must be 'default'.

data
ConfigData

The Azure Advisor configuration data structure.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

subscriptionResource or data is null.

Applies to