StandardAssignmentCollection.CreateOrUpdateAsync Method

Definition

This operation creates or updates a standard assignment with the given scope and name. standard assignments apply to all resources contained within their scope. For example, when you assign a policy at resource group scope, that policy applies to all resources in the group.

  • Request Path. : /{resourceId}/providers/Microsoft.Security/standardAssignments/{standardAssignmentName}.
  • Operation Id. : StandardAssignments_Create.
  • Default Api Version. : 2024-08-01.
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.SecurityCenter.StandardAssignmentResource>> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string standardAssignmentName, Azure.ResourceManager.SecurityCenter.StandardAssignmentData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.SecurityCenter.StandardAssignmentData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.SecurityCenter.StandardAssignmentResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.SecurityCenter.StandardAssignmentData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.SecurityCenter.StandardAssignmentResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, standardAssignmentName As String, data As StandardAssignmentData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of StandardAssignmentResource))

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

standardAssignmentName
String

The standard assignments assignment key - unique key for the standard assignment.

data
StandardAssignmentData

Custom standard assignment over a pre-defined scope.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

standardAssignmentName or data is null.

standardAssignmentName is an empty string, and was expected to be non-empty.

Applies to