다음을 통해 공유


IRoleAssignmentsOperations.CreateWithHttpMessagesAsync 메서드

정의

scope 및 이름으로 역할 할당을 만들거나 업데이트합니다.

public System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.Management.Authorization.Models.RoleAssignment>> CreateWithHttpMessagesAsync(string scope, string roleAssignmentName, Microsoft.Azure.Management.Authorization.Models.RoleAssignmentCreateParameters parameters, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateWithHttpMessagesAsync : string * string * Microsoft.Azure.Management.Authorization.Models.RoleAssignmentCreateParameters * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.Management.Authorization.Models.RoleAssignment>>
Public Function CreateWithHttpMessagesAsync (scope As String, roleAssignmentName As String, parameters As RoleAssignmentCreateParameters, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AzureOperationResponse(Of RoleAssignment))

매개 변수

scope
String

작업 또는 리소스의 scope. 유효한 범위는 구독(형식: '/subscriptions/{subscriptionId}'), 리소스 그룹(형식: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' 또는 리소스(형식: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'입니다.

roleAssignmentName
String

역할 할당의 이름입니다. 유효한 GUID일 수 있습니다.

parameters
RoleAssignmentCreateParameters

역할 할당에 대한 매개 변수입니다.

customHeaders
Dictionary<String,List<String>>

요청에 추가할 헤더입니다.

cancellationToken
CancellationToken

취소 토큰입니다.

반환

예외

작업이 잘못된 상태 코드를 반환할 때 throw됨

작업이 잘못된 상태 코드를 반환할 때 throw됨

응답을 역직렬화할 수 없을 때 throw됨

필수 매개 변수가 null일 때 throw됨

적용 대상