Udostępnij za pośrednictwem


PolicyExemptionsOperationsExtensions.CreateOrUpdate Method

Definition

Creates or updates a policy exemption.

public static Microsoft.Azure.Management.ResourceManager.Models.PolicyExemption CreateOrUpdate (this Microsoft.Azure.Management.ResourceManager.IPolicyExemptionsOperations operations, string scope, string policyExemptionName, Microsoft.Azure.Management.ResourceManager.Models.PolicyExemption parameters);
static member CreateOrUpdate : Microsoft.Azure.Management.ResourceManager.IPolicyExemptionsOperations * string * string * Microsoft.Azure.Management.ResourceManager.Models.PolicyExemption -> Microsoft.Azure.Management.ResourceManager.Models.PolicyExemption
<Extension()>
Public Function CreateOrUpdate (operations As IPolicyExemptionsOperations, scope As String, policyExemptionName As String, parameters As PolicyExemption) As PolicyExemption

Parameters

operations
IPolicyExemptionsOperations

The operations group for this extension method.

scope
String

The scope of the policy exemption. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'

policyExemptionName
String

The name of the policy exemption to delete.

parameters
PolicyExemption

Parameters for the policy exemption.

Returns

Remarks

This operation creates or updates a policy exemption with the given scope and name. Policy exemptions apply to all resources contained within their scope. For example, when you create a policy exemption at resource group scope for a policy assignment at the same or above level, the exemption exempts to all applicable resources in the resource group.

Applies to