Skip to main content

role_assignments

Creates, updates, deletes, gets or lists a role_assignments resource.

Overview

Namerole_assignments
TypeResource
Idazure.billing.role_assignments

Fields

NameDatatypeDescription
billingAccountNametextfield from the properties object
billingProfileNametextfield from the properties object
billingRoleAssignmentNametextfield from the properties object
billing_account_display_nametextfield from the properties object
billing_account_idtextfield from the properties object
billing_profile_display_nametextfield from the properties object
billing_profile_idtextfield from the properties object
billing_request_idtextfield from the properties object
created_by_principal_idtextfield from the properties object
created_by_principal_puidtextfield from the properties object
created_by_principal_tenant_idtextfield from the properties object
created_by_user_email_addresstextfield from the properties object
created_ontextfield from the properties object
customerNametextfield from the properties object
customer_display_nametextfield from the properties object
customer_idtextfield from the properties object
invoice_section_display_nametextfield from the properties object
invoice_section_idtextfield from the properties object
modified_by_principal_idtextfield from the properties object
modified_by_principal_puidtextfield from the properties object
modified_by_principal_tenant_idtextfield from the properties object
modified_by_user_email_addresstextfield from the properties object
modified_ontextfield from the properties object
principal_display_nametextfield from the properties object
principal_idtextfield from the properties object
principal_puidtextfield from the properties object
principal_tenant_idtextfield from the properties object
principal_tenant_nametextfield from the properties object
principal_typetextfield from the properties object
provisioning_statetextfield from the properties object
role_definition_idtextfield from the properties object
scopetextfield from the properties object
tagstextDictionary 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_typetextfield from the properties object
user_email_addresstextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
get_by_billing_accountSELECTbillingAccountName, billingRoleAssignmentNameGets 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_profileSELECTbillingAccountName, billingProfileName, billingRoleAssignmentNameGets 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_customerSELECTbillingAccountName, billingProfileName, billingRoleAssignmentName, customerNameGets a role assignment for the caller on a customer. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement.
get_by_departmentSELECTbillingAccountName, billingRoleAssignmentName, departmentNameGets 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_accountSELECTbillingAccountName, billingRoleAssignmentName, enrollmentAccountNameGets 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_accountSELECTbillingAccountNameLists 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_profileSELECTbillingAccountName, billingProfileNameLists 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_customerSELECTbillingAccountName, billingProfileName, customerNameLists the role assignments for the caller on customer. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement.
list_by_departmentSELECTbillingAccountName, departmentNameLists the role assignments for the caller on a department. The operation is supported for billing accounts of type Enterprise Agreement.
list_by_enrollment_accountSELECTbillingAccountName, enrollmentAccountNameLists the role assignments for the caller on a enrollment account. The operation is supported for billing accounts of type Enterprise Agreement.
create_by_billing_accountINSERTbillingAccountName, data__roleDefinitionIdAdds 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_profileINSERTbillingAccountName, billingProfileName, data__roleDefinitionIdAdds 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_customerINSERTbillingAccountName, billingProfileName, customerName, data__roleDefinitionIdAdds a role assignment on a customer. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement.
delete_by_billing_accountDELETEbillingAccountName, billingRoleAssignmentNameDeletes 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_profileDELETEbillingAccountName, billingProfileName, billingRoleAssignmentNameDeletes 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_customerDELETEbillingAccountName, billingProfileName, billingRoleAssignmentName, customerNameDeletes a role assignment on a customer. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement.
delete_by_departmentDELETEbillingAccountName, billingRoleAssignmentName, departmentNameDeletes a role assignment on a department. The operation is supported only for billing accounts with agreement type Enterprise Agreement.
delete_by_enrollment_accountDELETEbillingAccountName, billingRoleAssignmentName, enrollmentAccountNameDeletes a role assignment on a enrollment Account. The operation is supported only for billing accounts with agreement type Enterprise Agreement.
resolve_by_billing_accountEXECbillingAccountNameLists 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_profileEXECbillingAccountName, billingProfileNameLists 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_customerEXECbillingAccountName, billingProfileName, customerNameLists 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_sectionEXECbillingAccountName, billingProfileName, invoiceSectionNameLists 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.

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 }}';

INSERT example

Use the following StackQL query and manifest file to create a new role_assignments resource.

/*+ 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 }}'
;

DELETE example

Deletes the specified role_assignments resource.

/*+ delete */
DELETE FROM azure.billing.role_assignments
WHERE billingAccountName = '{{ billingAccountName }}'
AND billingRoleAssignmentName = '{{ billingRoleAssignmentName }}';