role_assignments
Creates, updates, deletes, gets or lists a role_assignments
resource.
Overview
Name | role_assignments |
Type | Resource |
Id | azure.billing.role_assignments |
Fields
The following fields are returned by SELECT
queries:
- get_by_customer
- get_by_billing_profile
- list_by_customer
- get_by_department
- get_by_enrollment_account
- list_by_billing_profile
- get_by_billing_account
- list_by_department
- list_by_enrollment_account
- list_by_billing_account
The properties of the billing role assignment.
Name | Datatype | Description |
---|---|---|
properties | object | The properties of the billing role assignment. |
tags | object | Dictionary of metadata associated with the resource. It may not be populated for all resource types. Maximum key/value length supported of 256 characters. Keys/value should not empty value nor null. Keys can not contain < > % & \ ? / |
The properties of the billing role assignment.
Name | Datatype | Description |
---|---|---|
properties | object | The properties of the billing role assignment. |
tags | object | Dictionary of metadata associated with the resource. It may not be populated for all resource types. Maximum key/value length supported of 256 characters. Keys/value should not empty value nor null. Keys can not contain < > % & \ ? / |
The list of the billing role assignments.
Name | Datatype | Description |
---|---|---|
properties | object | The properties of the billing role assignment. |
tags | object | Dictionary of metadata associated with the resource. It may not be populated for all resource types. Maximum key/value length supported of 256 characters. Keys/value should not empty value nor null. Keys can not contain < > % & \ ? / |
The properties of the billing role assignment.
Name | Datatype | Description |
---|---|---|
properties | object | The properties of the billing role assignment. |
tags | object | Dictionary of metadata associated with the resource. It may not be populated for all resource types. Maximum key/value length supported of 256 characters. Keys/value should not empty value nor null. Keys can not contain < > % & \ ? / |
The properties of the billing role assignment.
Name | Datatype | Description |
---|---|---|
properties | object | The properties of the billing role assignment. |
tags | object | Dictionary of metadata associated with the resource. It may not be populated for all resource types. Maximum key/value length supported of 256 characters. Keys/value should not empty value nor null. Keys can not contain < > % & \ ? / |
The list of the billing role assignments.
Name | Datatype | Description |
---|---|---|
properties | object | The properties of the billing role assignment. |
tags | object | Dictionary of metadata associated with the resource. It may not be populated for all resource types. Maximum key/value length supported of 256 characters. Keys/value should not empty value nor null. Keys can not contain < > % & \ ? / |
The properties of the billing role assignment.
Name | Datatype | Description |
---|---|---|
properties | object | The properties of the billing role assignment. |
tags | object | Dictionary of metadata associated with the resource. It may not be populated for all resource types. Maximum key/value length supported of 256 characters. Keys/value should not empty value nor null. Keys can not contain < > % & \ ? / |
The list of the billing role assignments.
Name | Datatype | Description |
---|---|---|
properties | object | The properties of the billing role assignment. |
tags | object | Dictionary of metadata associated with the resource. It may not be populated for all resource types. Maximum key/value length supported of 256 characters. Keys/value should not empty value nor null. Keys can not contain < > % & \ ? / |
The list of the billing role assignments.
Name | Datatype | Description |
---|---|---|
properties | object | The properties of the billing role assignment. |
tags | object | Dictionary of metadata associated with the resource. It may not be populated for all resource types. Maximum key/value length supported of 256 characters. Keys/value should not empty value nor null. Keys can not contain < > % & \ ? / |
The list of the billing role assignments.
Name | Datatype | Description |
---|---|---|
properties | object | The properties of the billing role assignment. |
tags | object | Dictionary of metadata associated with the resource. It may not be populated for all resource types. Maximum key/value length supported of 256 characters. Keys/value should not empty value nor null. Keys can not contain < > % & \ ? / |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get_by_customer | select | billingAccountName , billingProfileName , customerName , billingRoleAssignmentName | Gets a role assignment for the caller on a customer. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement. | |
get_by_billing_profile | select | billingAccountName , billingProfileName , billingRoleAssignmentName | Gets a role assignment for the caller on a billing profile. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. | |
list_by_customer | select | billingAccountName , billingProfileName , customerName | filter , top , skip | Lists the role assignments for the caller on customer. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement. |
get_by_department | select | billingAccountName , departmentName , billingRoleAssignmentName | Gets a role assignment for the caller on a department. The operation is supported only for billing accounts with agreement type Enterprise Agreement. | |
get_by_enrollment_account | select | billingAccountName , enrollmentAccountName , billingRoleAssignmentName | Gets a role assignment for the caller on a enrollment Account. The operation is supported only for billing accounts with agreement type Enterprise Agreement. | |
list_by_billing_profile | select | billingAccountName , billingProfileName | filter , top , skip | Lists the role assignments for the caller on a billing profile. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. |
get_by_billing_account | select | billingAccountName , billingRoleAssignmentName | Gets a role assignment for the caller on a billing account. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement, Microsoft Customer Agreement or Enterprise Agreement. | |
list_by_department | select | billingAccountName , departmentName | Lists the role assignments for the caller on a department. The operation is supported for billing accounts of type Enterprise Agreement. | |
list_by_enrollment_account | select | billingAccountName , enrollmentAccountName | Lists the role assignments for the caller on a enrollment account. The operation is supported for billing accounts of type Enterprise Agreement. | |
list_by_billing_account | select | billingAccountName | filter , top , skip | Lists the role assignments for the caller on a billing account. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement, Microsoft Customer Agreement or Enterprise Agreement. |
create_by_customer | insert | billingAccountName , billingProfileName , customerName , data__roleDefinitionId | Adds a role assignment on a customer. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement. | |
create_by_billing_profile | insert | billingAccountName , billingProfileName , data__roleDefinitionId | Adds a role assignment on a billing profile. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. | |
create_by_billing_account | insert | billingAccountName , data__roleDefinitionId | Adds a role assignment on a billing account. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. | |
delete_by_customer | delete | billingAccountName , billingProfileName , customerName , billingRoleAssignmentName | Deletes a role assignment on a customer. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement. | |
delete_by_billing_profile | delete | billingAccountName , billingProfileName , billingRoleAssignmentName | Deletes a role assignment on a billing profile. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. | |
delete_by_department | delete | billingAccountName , departmentName , billingRoleAssignmentName | Deletes a role assignment on a department. The operation is supported only for billing accounts with agreement type Enterprise Agreement. | |
delete_by_enrollment_account | delete | billingAccountName , enrollmentAccountName , billingRoleAssignmentName | Deletes a role assignment on a enrollment Account. The operation is supported only for billing accounts with agreement type Enterprise Agreement. | |
delete_by_billing_account | delete | billingAccountName , billingRoleAssignmentName | Deletes a role assignment on a billing account. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement, Microsoft Customer Agreement or Enterprise Agreement. | |
resolve_by_customer | exec | billingAccountName , billingProfileName , customerName | resolveScopeDisplayNames , filter | Lists the role assignments for the caller on a customer while fetching user info for each role assignment. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement. |
resolve_by_invoice_section | exec | billingAccountName , billingProfileName , invoiceSectionName | resolveScopeDisplayNames , filter | Lists the role assignments for the caller on an invoice section while fetching user info for each role assignment. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement. |
resolve_by_billing_profile | exec | billingAccountName , billingProfileName | resolveScopeDisplayNames , filter | Lists the role assignments for the caller on an billing profile while fetching user info for each role assignment. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement. |
resolve_by_billing_account | exec | billingAccountName | resolveScopeDisplayNames , filter | Lists the role assignments for the caller on a billing account while fetching user info for each role assignment. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement, Microsoft Customer Agreement or Enterprise Agreement. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
billingAccountName | string | The ID that uniquely identifies a billing account. |
billingProfileName | string | The ID that uniquely identifies a billing profile. |
billingRoleAssignmentName | string | The ID that uniquely identifies a role assignment. |
customerName | string | The ID that uniquely identifies a customer. |
departmentName | string | The name of the department. |
enrollmentAccountName | string | The name of the enrollment account. |
invoiceSectionName | string | The ID that uniquely identifies an invoice section. |
filter | string | The filter query option allows clients to filter a collection of resources that are addressed by a request URL. |
resolveScopeDisplayNames | boolean | Resolves the scope display name for each of the role assignments. |
skip | integer (int64) | The skip query option requests the number of items in the queried collection that are to be skipped and not included in the result. |
top | integer (int64) | The top query option requests the number of items in the queried collection to be included in the result. The maximum supported value for top is 50. |
SELECT
examples
- get_by_customer
- get_by_billing_profile
- list_by_customer
- get_by_department
- get_by_enrollment_account
- list_by_billing_profile
- get_by_billing_account
- list_by_department
- list_by_enrollment_account
- list_by_billing_account
Gets a role assignment for the caller on a customer. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement.
SELECT
properties,
tags
FROM azure.billing.role_assignments
WHERE billingAccountName = '{{ billingAccountName }}' -- required
AND billingProfileName = '{{ billingProfileName }}' -- required
AND customerName = '{{ customerName }}' -- required
AND billingRoleAssignmentName = '{{ billingRoleAssignmentName }}' -- required
;
Gets a role assignment for the caller on a billing profile. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
SELECT
properties,
tags
FROM azure.billing.role_assignments
WHERE billingAccountName = '{{ billingAccountName }}' -- required
AND billingProfileName = '{{ billingProfileName }}' -- required
AND billingRoleAssignmentName = '{{ billingRoleAssignmentName }}' -- required
;
Lists the role assignments for the caller on customer. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement.
SELECT
properties,
tags
FROM azure.billing.role_assignments
WHERE billingAccountName = '{{ billingAccountName }}' -- required
AND billingProfileName = '{{ billingProfileName }}' -- required
AND customerName = '{{ customerName }}' -- required
AND filter = '{{ filter }}'
AND top = '{{ top }}'
AND skip = '{{ skip }}'
;
Gets a role assignment for the caller on a department. The operation is supported only for billing accounts with agreement type Enterprise Agreement.
SELECT
properties,
tags
FROM azure.billing.role_assignments
WHERE billingAccountName = '{{ billingAccountName }}' -- required
AND departmentName = '{{ departmentName }}' -- required
AND billingRoleAssignmentName = '{{ billingRoleAssignmentName }}' -- required
;
Gets a role assignment for the caller on a enrollment Account. The operation is supported only for billing accounts with agreement type Enterprise Agreement.
SELECT
properties,
tags
FROM azure.billing.role_assignments
WHERE billingAccountName = '{{ billingAccountName }}' -- required
AND enrollmentAccountName = '{{ enrollmentAccountName }}' -- required
AND billingRoleAssignmentName = '{{ billingRoleAssignmentName }}' -- required
;
Lists the role assignments for the caller on a billing profile. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
SELECT
properties,
tags
FROM azure.billing.role_assignments
WHERE billingAccountName = '{{ billingAccountName }}' -- required
AND billingProfileName = '{{ billingProfileName }}' -- required
AND filter = '{{ filter }}'
AND top = '{{ top }}'
AND skip = '{{ skip }}'
;
Gets a role assignment for the caller on a billing account. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement, Microsoft Customer Agreement or Enterprise Agreement.
SELECT
properties,
tags
FROM azure.billing.role_assignments
WHERE billingAccountName = '{{ billingAccountName }}' -- required
AND billingRoleAssignmentName = '{{ billingRoleAssignmentName }}' -- required
;
Lists the role assignments for the caller on a department. The operation is supported for billing accounts of type Enterprise Agreement.
SELECT
properties,
tags
FROM azure.billing.role_assignments
WHERE billingAccountName = '{{ billingAccountName }}' -- required
AND departmentName = '{{ departmentName }}' -- required
;
Lists the role assignments for the caller on a enrollment account. The operation is supported for billing accounts of type Enterprise Agreement.
SELECT
properties,
tags
FROM azure.billing.role_assignments
WHERE billingAccountName = '{{ billingAccountName }}' -- required
AND enrollmentAccountName = '{{ enrollmentAccountName }}' -- required
;
Lists the role assignments for the caller on a billing account. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement, Microsoft Customer Agreement or Enterprise Agreement.
SELECT
properties,
tags
FROM azure.billing.role_assignments
WHERE billingAccountName = '{{ billingAccountName }}' -- required
AND filter = '{{ filter }}'
AND top = '{{ top }}'
AND skip = '{{ skip }}'
;
INSERT
examples
- create_by_customer
- create_by_billing_profile
- create_by_billing_account
- Manifest
Adds a role assignment on a customer. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement.
INSERT INTO azure.billing.role_assignments (
data__principalPuid,
data__principalId,
data__principalTenantId,
data__roleDefinitionId,
data__scope,
data__userAuthenticationType,
data__userEmailAddress,
billingAccountName,
billingProfileName,
customerName
)
SELECT
'{{ principalPuid }}',
'{{ principalId }}',
'{{ principalTenantId }}',
'{{ roleDefinitionId }}' /* required */,
'{{ scope }}',
'{{ userAuthenticationType }}',
'{{ userEmailAddress }}',
'{{ billingAccountName }}',
'{{ billingProfileName }}',
'{{ customerName }}'
RETURNING
properties,
tags
;
Adds a role assignment on a billing profile. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
INSERT INTO azure.billing.role_assignments (
data__principalPuid,
data__principalId,
data__principalTenantId,
data__roleDefinitionId,
data__scope,
data__userAuthenticationType,
data__userEmailAddress,
billingAccountName,
billingProfileName
)
SELECT
'{{ principalPuid }}',
'{{ principalId }}',
'{{ principalTenantId }}',
'{{ roleDefinitionId }}' /* required */,
'{{ scope }}',
'{{ userAuthenticationType }}',
'{{ userEmailAddress }}',
'{{ billingAccountName }}',
'{{ billingProfileName }}'
RETURNING
properties,
tags
;
Adds a role assignment on a billing account. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
INSERT INTO azure.billing.role_assignments (
data__principalPuid,
data__principalId,
data__principalTenantId,
data__roleDefinitionId,
data__scope,
data__userAuthenticationType,
data__userEmailAddress,
billingAccountName
)
SELECT
'{{ principalPuid }}',
'{{ principalId }}',
'{{ principalTenantId }}',
'{{ roleDefinitionId }}' /* required */,
'{{ scope }}',
'{{ userAuthenticationType }}',
'{{ userEmailAddress }}',
'{{ billingAccountName }}'
RETURNING
properties,
tags
;
# Description fields are for documentation purposes
- name: role_assignments
props:
- name: billingAccountName
value: string
description: Required parameter for the role_assignments resource.
- name: billingProfileName
value: string
description: Required parameter for the role_assignments resource.
- name: customerName
value: string
description: Required parameter for the role_assignments resource.
- name: principalPuid
value: string
description: |
The principal PUID of the user to whom the role was assigned.
- name: principalId
value: string
description: |
The object id of the user to whom the role was assigned.
- name: principalTenantId
value: string
description: |
The principal tenant id of the user to whom the role was assigned.
- name: roleDefinitionId
value: string
description: |
The ID of the role definition.
- name: scope
value: string
description: |
The scope at which the role was assigned.
- name: userAuthenticationType
value: string
description: |
The authentication type of the user, whether Organization or MSA, of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.
- name: userEmailAddress
value: string
description: |
The email address of the user to whom the role was assigned. This is supported only for billing accounts with agreement type Enterprise Agreement.
DELETE
examples
- delete_by_customer
- delete_by_billing_profile
- delete_by_department
- delete_by_enrollment_account
- delete_by_billing_account
Deletes a role assignment on a customer. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement.
DELETE FROM azure.billing.role_assignments
WHERE billingAccountName = '{{ billingAccountName }}' --required
AND billingProfileName = '{{ billingProfileName }}' --required
AND customerName = '{{ customerName }}' --required
AND billingRoleAssignmentName = '{{ billingRoleAssignmentName }}' --required
;
Deletes a role assignment on a billing profile. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
DELETE FROM azure.billing.role_assignments
WHERE billingAccountName = '{{ billingAccountName }}' --required
AND billingProfileName = '{{ billingProfileName }}' --required
AND billingRoleAssignmentName = '{{ billingRoleAssignmentName }}' --required
;
Deletes a role assignment on a department. The operation is supported only for billing accounts with agreement type Enterprise Agreement.
DELETE FROM azure.billing.role_assignments
WHERE billingAccountName = '{{ billingAccountName }}' --required
AND departmentName = '{{ departmentName }}' --required
AND billingRoleAssignmentName = '{{ billingRoleAssignmentName }}' --required
;
Deletes a role assignment on a enrollment Account. The operation is supported only for billing accounts with agreement type Enterprise Agreement.
DELETE FROM azure.billing.role_assignments
WHERE billingAccountName = '{{ billingAccountName }}' --required
AND enrollmentAccountName = '{{ enrollmentAccountName }}' --required
AND billingRoleAssignmentName = '{{ billingRoleAssignmentName }}' --required
;
Deletes a role assignment on a billing account. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement, Microsoft Customer Agreement or Enterprise Agreement.
DELETE FROM azure.billing.role_assignments
WHERE billingAccountName = '{{ billingAccountName }}' --required
AND billingRoleAssignmentName = '{{ billingRoleAssignmentName }}' --required
;
Lifecycle Methods
- resolve_by_customer
- resolve_by_invoice_section
- resolve_by_billing_profile
- resolve_by_billing_account
Lists the role assignments for the caller on a customer while fetching user info for each role assignment. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement.
EXEC azure.billing.role_assignments.resolve_by_customer
@billingAccountName='{{ billingAccountName }}' --required,
@billingProfileName='{{ billingProfileName }}' --required,
@customerName='{{ customerName }}' --required,
@resolveScopeDisplayNames={{ resolveScopeDisplayNames }},
@filter='{{ filter }}'
;
Lists the role assignments for the caller on an invoice section while fetching user info for each role assignment. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement.
EXEC azure.billing.role_assignments.resolve_by_invoice_section
@billingAccountName='{{ billingAccountName }}' --required,
@billingProfileName='{{ billingProfileName }}' --required,
@invoiceSectionName='{{ invoiceSectionName }}' --required,
@resolveScopeDisplayNames={{ resolveScopeDisplayNames }},
@filter='{{ filter }}'
;
Lists the role assignments for the caller on an billing profile while fetching user info for each role assignment. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
EXEC azure.billing.role_assignments.resolve_by_billing_profile
@billingAccountName='{{ billingAccountName }}' --required,
@billingProfileName='{{ billingProfileName }}' --required,
@resolveScopeDisplayNames={{ resolveScopeDisplayNames }},
@filter='{{ filter }}'
;
Lists the role assignments for the caller on a billing account while fetching user info for each role assignment. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement, Microsoft Customer Agreement or Enterprise Agreement.
EXEC azure.billing.role_assignments.resolve_by_billing_account
@billingAccountName='{{ billingAccountName }}' --required,
@resolveScopeDisplayNames={{ resolveScopeDisplayNames }},
@filter='{{ filter }}'
;