role_assignments
Creates, updates, deletes, gets or lists a role_assignments
resource.
Overview
Name | role_assignments |
Type | Resource |
Id | azure.billing.role_assignments |
Fields
- vw_role_assignments
- role_assignments
Name | Datatype | Description |
---|---|---|
billingAccountName | text | field from the properties object |
billingProfileName | text | field from the properties object |
billingRoleAssignmentName | text | field from the properties object |
billing_account_display_name | text | field from the properties object |
billing_account_id | text | field from the properties object |
billing_profile_display_name | text | field from the properties object |
billing_profile_id | text | field from the properties object |
billing_request_id | text | field from the properties object |
created_by_principal_id | text | field from the properties object |
created_by_principal_puid | text | field from the properties object |
created_by_principal_tenant_id | text | field from the properties object |
created_by_user_email_address | text | field from the properties object |
created_on | text | field from the properties object |
customerName | text | field from the properties object |
customer_display_name | text | field from the properties object |
customer_id | text | field from the properties object |
invoice_section_display_name | text | field from the properties object |
invoice_section_id | text | field from the properties object |
modified_by_principal_id | text | field from the properties object |
modified_by_principal_puid | text | field from the properties object |
modified_by_principal_tenant_id | text | field from the properties object |
modified_by_user_email_address | text | field from the properties object |
modified_on | text | field from the properties object |
principal_display_name | text | field from the properties object |
principal_id | text | field from the properties object |
principal_puid | text | field from the properties object |
principal_tenant_id | text | field from the properties object |
principal_tenant_name | text | field from the properties object |
principal_type | text | field from the properties object |
provisioning_state | text | field from the properties object |
role_definition_id | text | field from the properties object |
scope | text | field from the properties object |
tags | text | 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 < > % & \ ? / |
user_authentication_type | text | field from the properties object |
user_email_address | text | field from the properties object |
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
Name | Accessible by | Required Params | Description |
---|---|---|---|
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. |
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. |
get_by_customer | SELECT | billingAccountName, billingProfileName, billingRoleAssignmentName, customerName | 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_department | SELECT | billingAccountName, billingRoleAssignmentName, departmentName | 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, billingRoleAssignmentName, enrollmentAccountName | 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_account | SELECT | billingAccountName | 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. |
list_by_billing_profile | SELECT | billingAccountName, billingProfileName | 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. |
list_by_customer | SELECT | billingAccountName, billingProfileName, customerName | Lists the role assignments for the caller on customer. The operation is supported for billing accounts with agreement type Microsoft Partner 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. |
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. |
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_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. |
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. |
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_customer | DELETE | billingAccountName, billingProfileName, billingRoleAssignmentName, customerName | Deletes a role assignment on a customer. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement. |
delete_by_department | DELETE | billingAccountName, billingRoleAssignmentName, departmentName | 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, billingRoleAssignmentName, enrollmentAccountName | Deletes a role assignment on a enrollment Account. The operation is supported only for billing accounts with agreement type Enterprise Agreement. |
resolve_by_billing_account | EXEC | billingAccountName | 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. |
resolve_by_billing_profile | EXEC | billingAccountName, billingProfileName | 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_customer | EXEC | billingAccountName, billingProfileName, customerName | 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 | 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. |
SELECT
examples
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.
- vw_role_assignments
- role_assignments
SELECT
billingAccountName,
billingProfileName,
billingRoleAssignmentName,
billing_account_display_name,
billing_account_id,
billing_profile_display_name,
billing_profile_id,
billing_request_id,
created_by_principal_id,
created_by_principal_puid,
created_by_principal_tenant_id,
created_by_user_email_address,
created_on,
customerName,
customer_display_name,
customer_id,
invoice_section_display_name,
invoice_section_id,
modified_by_principal_id,
modified_by_principal_puid,
modified_by_principal_tenant_id,
modified_by_user_email_address,
modified_on,
principal_display_name,
principal_id,
principal_puid,
principal_tenant_id,
principal_tenant_name,
principal_type,
provisioning_state,
role_definition_id,
scope,
tags,
user_authentication_type,
user_email_address
FROM azure.billing.vw_role_assignments
WHERE billingAccountName = '{{ billingAccountName }}';
SELECT
properties,
tags
FROM azure.billing.role_assignments
WHERE billingAccountName = '{{ billingAccountName }}';
INSERT
example
Use the following StackQL query and manifest file to create a new role_assignments
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.billing.role_assignments (
billingAccountName,
data__roleDefinitionId,
principalPuid,
principalId,
principalTenantId,
roleDefinitionId,
scope,
userAuthenticationType,
userEmailAddress
)
SELECT
'{{ billingAccountName }}',
'{{ data__roleDefinitionId }}',
'{{ principalPuid }}',
'{{ principalId }}',
'{{ principalTenantId }}',
'{{ roleDefinitionId }}',
'{{ scope }}',
'{{ userAuthenticationType }}',
'{{ userEmailAddress }}'
;
- name: your_resource_model_name
props:
- name: provisioningState
value: string
- name: createdOn
value: string
- name: createdByPrincipalTenantId
value: string
- name: createdByPrincipalId
value: string
- name: createdByPrincipalPuid
value: string
- name: createdByUserEmailAddress
value: string
- name: modifiedOn
value: string
- name: modifiedByPrincipalPuid
value: string
- name: modifiedByUserEmailAddress
value: string
- name: modifiedByPrincipalId
value: string
- name: modifiedByPrincipalTenantId
value: string
- name: principalPuid
value: string
- name: principalId
value: string
- name: principalTenantId
value: string
- name: roleDefinitionId
value: string
- name: scope
value: string
- name: userAuthenticationType
value: string
- name: userEmailAddress
value: string
- name: principalTenantName
value: string
- name: principalDisplayName
value: string
- name: principalType
value: string
- name: billingRequestId
value: string
- name: billingAccountId
value: string
- name: billingAccountDisplayName
value: string
- name: billingProfileId
value: string
- name: billingProfileDisplayName
value: string
- name: invoiceSectionId
value: string
- name: invoiceSectionDisplayName
value: string
- name: customerId
value: string
- name: customerDisplayName
value: string
DELETE
example
Deletes the specified role_assignments
resource.
/*+ delete */
DELETE FROM azure.billing.role_assignments
WHERE billingAccountName = '{{ billingAccountName }}'
AND billingRoleAssignmentName = '{{ billingRoleAssignmentName }}';