PolicyDefinitionsOperations.CreateOrUpdate(String, PolicyDefinition, CancellationToken) Method

Definition

This operation creates or updates a policy definition in the given subscription with the given name.

public virtual Azure.Response<Azure.ResourceManager.Resources.Models.PolicyDefinition> CreateOrUpdate (string policyDefinitionName, Azure.ResourceManager.Resources.Models.PolicyDefinition parameters, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : string * Azure.ResourceManager.Resources.Models.PolicyDefinition * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.Resources.Models.PolicyDefinition>
override this.CreateOrUpdate : string * Azure.ResourceManager.Resources.Models.PolicyDefinition * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.Resources.Models.PolicyDefinition>
Public Overridable Function CreateOrUpdate (policyDefinitionName As String, parameters As PolicyDefinition, Optional cancellationToken As CancellationToken = Nothing) As Response(Of PolicyDefinition)

Parameters

policyDefinitionName
System.String

The name of the policy definition to create.

parameters
PolicyDefinition

The policy definition properties.

cancellationToken
System.Threading.CancellationToken

The cancellation token to use.

Returns

Response<PolicyDefinition>

Applies to