Enrollment Account Role Assignments - Put

建立或更新計費角色指派。

PUT https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}/billingRoleAssignments/{billingRoleAssignmentName}?api-version=2019-10-01-preview

URI 參數

名稱 位於 必要 類型 Description
billingAccountName
path True

string

可唯一識別計費帳戶的標識碼。

billingRoleAssignmentName
path True

string

可唯一識別角色指派的標識碼。

enrollmentAccountName
path True

string

可唯一識別註冊帳戶的標識碼。

api-version
query True

string

要與用戶端要求搭配使用的 API 版本。 目前的版本為 2019-10-01-preview。

要求本文

名稱 類型 Description
properties.principalId

string

指派角色之用戶的主體標識碼。

properties.principalTenantId

string

指派角色之用戶的主體租用戶標識碼。

properties.roleDefinitionId

string

角色定義的識別碼。

properties.userAuthenticationType

string

指派角色之使用者的驗證類型,無論是組織或 MSA。 這僅支援合約類型為 Enterprise 合約的計費帳戶。

properties.userEmailAddress

string

指派角色之用戶的電子郵件位址。 這僅支援合約類型為 Enterprise 合約的計費帳戶。

回應

名稱 類型 Description
200 OK

BillingRoleAssignment

正常。 要求已成功。

Other Status Codes

ErrorResponse

描述作業失敗原因的錯誤回應。

安全性

azure_auth

Azure Active Directory OAuth2 Flow。

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名稱 Description
user_impersonation 模擬您的用戶帳戶

範例

PutEnrollmentAccountSubscriptionCreatorRoleAssignment

Sample Request

PUT https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}/billingRoleAssignments/{billingRoleAssignmentName}?api-version=2019-10-01-preview

{
  "properties": {
    "principalId": "99a1a759-30dd-42c2-828c-db398826bb67",
    "principalTenantId": "7ca289b9-c32d-4f01-8566-7ff93261d76f",
    "roleDefinitionId": "/providers/Microsoft.Billing/billingAccounts/7898901/enrollmentAccounts/225314/billingRoleDefinitions/a0bcee42-bf30-4d1b-926a-48d21664ef71"
  }
}

Sample Response

{
  "id": "/providers/Microsoft.Billing/billingAccounts/7898901/enrollmentAccounts/225314/billingRoleAssignments/9dfd08c2-62a3-4d47-85bd-1cdba1408402",
  "name": "9dfd08c2-62a3-4d47-85bd-1cdba1408402",
  "properties": {
    "createdOn": "2019-06-28T19:11:50.6168809+00:00",
    "createdByPrincipalTenantId": "7ca289b9-c32d-4f01-8566-7ff93261d76f",
    "createdByPrincipalId": "60d97094-2be4-46cc-a4fe-3633021a25b9",
    "principalId": "99a1a759-30dd-42c2-828c-db398826bb67",
    "principalTenantId": "7ca289b9-c32d-4f01-8566-7ff93261d76f",
    "roleDefinitionId": "/providers/Microsoft.Billing/billingAccounts/7898901/enrollmentAccounts/225314/billingRoleDefinitions/a0bcee42-bf30-4d1b-926a-48d21664ef71",
    "scope": "/providers/Microsoft.Billing/billingAccounts/7898901/enrollmentAccounts/225314"
  },
  "type": "Microsoft.Billing/billingAccounts/enrollmentAccounts/billingRoleAssignments"
}

定義

名稱 Description
BillingRoleAssignment

角色指派

ErrorDetails

錯誤的詳細數據。

ErrorResponse

錯誤回應表示服務無法處理傳入要求。 錯誤訊息中會提供原因。

ErrorSubDetails

BillingRoleAssignment

角色指派

名稱 類型 Description
id

string

資源標識碼。

name

string

資源名稱。

properties.createdByPrincipalId

string

建立角色指派之用戶的主體標識碼。

properties.createdByPrincipalTenantId

string

建立角色指派之使用者的租用戶標識碼。

properties.createdByUserEmailAddress

string

建立角色指派之使用者的電子郵件位址。 這僅支援合約類型為 Enterprise 合約的計費帳戶。

properties.createdOn

string

建立角色指派的日期。

properties.name

string

角色指派的名稱。

properties.principalId

string

指派角色之用戶的主體標識碼。

properties.principalTenantId

string

指派角色之用戶的主體租用戶標識碼。

properties.roleDefinitionId

string

角色定義的識別碼。

properties.scope

string

指派角色的範圍。

properties.userAuthenticationType

string

指派角色之使用者的驗證類型,無論是組織或 MSA。 這僅支援合約類型為 Enterprise 合約的計費帳戶。

properties.userEmailAddress

string

指派角色之用戶的電子郵件位址。 這僅支援合約類型為 Enterprise 合約的計費帳戶。

type

string

資源類型。

ErrorDetails

錯誤的詳細數據。

名稱 類型 Description
code

string

錯誤碼。

details

ErrorSubDetails[]

錯誤的子詳細數據。

message

string

錯誤訊息,指出作業失敗的原因。

target

string

特定錯誤的目標。

ErrorResponse

錯誤回應表示服務無法處理傳入要求。 錯誤訊息中會提供原因。

名稱 類型 Description
error

ErrorDetails

錯誤的詳細數據。

ErrorSubDetails

名稱 類型 Description
code

string

錯誤碼。

message

string

錯誤訊息,指出作業失敗的原因。

target

string

特定錯誤的目標。