IPolicySetDefinitionsOperations.CreateOrUpdateWithHttpMessagesAsync(String, PolicySetDefinition, Dictionary<String,List<String>>, CancellationToken) IPolicySetDefinitionsOperations.CreateOrUpdateWithHttpMessagesAsync(String, PolicySetDefinition, Dictionary<String,List<String>>, CancellationToken) Method

Definition

Creates or updates a policy set definition.

public System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.Management.ResourceManager.Models.PolicySetDefinition>> CreateOrUpdateWithHttpMessagesAsync (string policySetDefinitionName, Microsoft.Azure.Management.ResourceManager.Models.PolicySetDefinition parameters, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = null);
abstract member CreateOrUpdateWithHttpMessagesAsync : string * Microsoft.Azure.Management.ResourceManager.Models.PolicySetDefinition * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.Management.ResourceManager.Models.PolicySetDefinition>>

Parameters

policySetDefinitionName
String String

The name of the policy set definition to create.

parameters
PolicySetDefinition PolicySetDefinition

The policy set definition properties.

customHeaders
Dictionary<String,List<String>>

The headers that will be added to request.

cancellationToken
CancellationToken CancellationToken

The cancellation token.

Returns

Task<Microsoft.Rest.Azure.AzureOperationResponse<PolicySetDefinition>>

Exceptions

Thrown when the operation returned an invalid status code

Microsoft.Rest.SerializationException Microsoft.Rest.SerializationException

Thrown when unable to deserialize the response

Microsoft.Rest.ValidationException Microsoft.Rest.ValidationException

Thrown when a required parameter is null

Remarks

This operation creates or updates a policy set definition in the

given subscription with the given name.

Applies to