Tar bort en rolltilldelning på ett fakturaavsnitt. Åtgärden stöds för faktureringskonton med avtalstypen Microsoft-kundavtal.
DELETE https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleAssignments/{billingRoleAssignmentName}?api-version=2024-04-01
URI-parametrar
Name |
I |
Obligatorisk |
Typ |
Description |
billingAccountName
|
path |
True
|
string
|
Det ID som unikt identifierar ett faktureringskonto.
Reguljärt uttrycksmönster: ^([0-9]+|([Pp][Cc][Nn]\.[A-Za-z0-9]+)|[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}(:[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}_[0-9]{4}(-[0-9]{2}){2})?)$
|
billingProfileName
|
path |
True
|
string
|
Det ID som unikt identifierar en faktureringsprofil.
Reguljärt uttrycksmönster: ^[a-zA-Z\d-_]{1,128}$
|
billingRoleAssignmentName
|
path |
True
|
string
|
Det ID som unikt identifierar en rolltilldelning.
Reguljärt uttrycksmönster: ^[a-fA-F0-9]{8}[-]?([a-fA-F0-9]{4}[-]?){3}[a-fA-F0-9]{12}(_[a-fA-F0-9]{8}[-]?([a-fA-F0-9]{4}[-]?){3}[a-fA-F0-9]{12})?$
|
invoiceSectionName
|
path |
True
|
string
|
Det ID som unikt identifierar ett fakturaavsnitt.
Reguljärt uttrycksmönster: ^[a-zA-Z\d-_]{1,128}$
|
api-version
|
query |
True
|
string
|
Den version av API:et som ska användas med klientbegäran. Den aktuella versionen är 2024-04-01.
|
Svar
Name |
Typ |
Description |
200 OK
|
|
OKEJ. Begäran har slutförts.
|
204 No Content
|
|
Begäran har slutförts utan svarstext.
|
Other Status Codes
|
ErrorResponse
|
Felsvar som beskriver varför åtgärden misslyckades.
|
Exempel
BillingRoleAssignmentDeleteByInvoiceSection
Exempelbegäran
DELETE https://management.azure.com/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2018-09-30/billingProfiles/BKM6-54VH-BG7-PGB/invoiceSections/xxxx-xxxx-xxx-xxx/billingRoleAssignments/10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9?api-version=2024-04-01
/**
* Samples for BillingRoleAssignments DeleteByInvoiceSection.
*/
public final class Main {
/*
* x-ms-original-file: specification/billing/resource-manager/Microsoft.Billing/stable/2024-04-01/examples/
* billingRoleAssignmentDeleteByInvoiceSection.json
*/
/**
* Sample code: BillingRoleAssignmentDeleteByInvoiceSection.
*
* @param manager Entry point to BillingManager.
*/
public static void
billingRoleAssignmentDeleteByInvoiceSection(com.azure.resourcemanager.billing.BillingManager manager) {
manager.billingRoleAssignments().deleteByInvoiceSectionWithResponse(
"00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2018-09-30", "BKM6-54VH-BG7-PGB",
"xxxx-xxxx-xxx-xxx", "10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9",
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.billing import BillingManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-billing
# USAGE
python billing_role_assignment_delete_by_invoice_section.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = BillingManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
client.billing_role_assignments.delete_by_invoice_section(
billing_account_name="00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2018-09-30",
billing_profile_name="BKM6-54VH-BG7-PGB",
invoice_section_name="xxxx-xxxx-xxx-xxx",
billing_role_assignment_name="10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9",
)
# x-ms-original-file: specification/billing/resource-manager/Microsoft.Billing/stable/2024-04-01/examples/billingRoleAssignmentDeleteByInvoiceSection.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { BillingManagementClient } = require("@azure/arm-billing");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Deletes a role assignment on an invoice section. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement.
*
* @summary Deletes a role assignment on an invoice section. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement.
* x-ms-original-file: specification/billing/resource-manager/Microsoft.Billing/stable/2024-04-01/examples/billingRoleAssignmentDeleteByInvoiceSection.json
*/
async function billingRoleAssignmentDeleteByInvoiceSection() {
const billingAccountName =
"00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2018-09-30";
const billingProfileName = "BKM6-54VH-BG7-PGB";
const invoiceSectionName = "xxxx-xxxx-xxx-xxx";
const billingRoleAssignmentName =
"10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9";
const credential = new DefaultAzureCredential();
const client = new BillingManagementClient(credential);
const result = await client.billingRoleAssignments.deleteByInvoiceSection(
billingAccountName,
billingProfileName,
invoiceSectionName,
billingRoleAssignmentName,
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Definitioner
ErrorAdditionalInfo
Ytterligare information om resurshanteringsfelet.
Name |
Typ |
Description |
info
|
object
|
Ytterligare information.
|
type
|
string
|
Ytterligare informationstyp.
|
ErrorDetail
Felinformationen.
Name |
Typ |
Description |
additionalInfo
|
ErrorAdditionalInfo[]
|
Ytterligare information om felet.
|
code
|
string
|
Felkoden.
|
details
|
ErrorDetail[]
|
Felinformationen.
|
message
|
string
|
Felmeddelandet.
|
target
|
string
|
Felmålet.
|
ErrorResponse
Felsvar