Verhogen als eigenaar van een order voor een spaarplan op basis van factureringsmachtigingen.
POST https://management.azure.com/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/elevate?api-version=2022-11-01
URI-parameters
Name |
In |
Vereist |
Type |
Description |
savingsPlanOrderId
|
path |
True
|
string
|
Order-id van het spaarplan
|
api-version
|
query |
True
|
string
|
De API-versie die door de service moet worden gebruikt
|
Antwoorden
Beveiliging
azure_auth
Azure Active Directory OAuth2-stroom
Type:
oauth2
Stroom:
implicit
Autorisatie-URL:
https://login.microsoftonline.com/common/oauth2/authorize
Bereiken
Name |
Description |
user_impersonation
|
Uw gebruikersaccount imiteren
|
Voorbeelden
SavingsPlanOrderElevate
Voorbeeldaanvraag
POST https://management.azure.com/providers/Microsoft.BillingBenefits/savingsPlanOrders/20000000-0000-0000-0000-000000000000/elevate?api-version=2022-11-01
/**
* Samples for SavingsPlanOrder Elevate.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/billingbenefits/resource-manager/Microsoft.BillingBenefits/stable/2022-11-01/examples/
* SavingsPlanOrderElevate.json
*/
/**
* Sample code: SavingsPlanOrderElevate.
*
* @param manager Entry point to BillingBenefitsManager.
*/
public static void
savingsPlanOrderElevate(com.azure.resourcemanager.billingbenefits.BillingBenefitsManager manager) {
manager.savingsPlanOrders().elevateWithResponse("20000000-0000-0000-0000-000000000000",
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.billingbenefits import BillingBenefitsRP
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-billingbenefits
# USAGE
python savings_plan_order_elevate.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 = BillingBenefitsRP(
credential=DefaultAzureCredential(),
)
response = client.savings_plan_order.elevate(
savings_plan_order_id="20000000-0000-0000-0000-000000000000",
)
print(response)
# x-ms-original-file: specification/billingbenefits/resource-manager/Microsoft.BillingBenefits/stable/2022-11-01/examples/SavingsPlanOrderElevate.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
package armbillingbenefits_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billingbenefits/armbillingbenefits/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/f790e624d0d080b89d962a3bd19c65bc6a6b2f5e/specification/billingbenefits/resource-manager/Microsoft.BillingBenefits/stable/2022-11-01/examples/SavingsPlanOrderElevate.json
func ExampleSavingsPlanOrderClient_Elevate() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armbillingbenefits.NewClientFactory(cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewSavingsPlanOrderClient().Elevate(ctx, "20000000-0000-0000-0000-000000000000", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.RoleAssignmentEntity = armbillingbenefits.RoleAssignmentEntity{
// Name: to.Ptr("70000000-0000-0000-0000-000000000005"),
// ID: to.Ptr("/providers/Microsoft.BillingBenefits/savingsPlanOrders/20000000-0000-0000-0000-000000000009/providers/Microsoft.Authorization/roleAssignments/70000000-0000-0000-0000-000000000005"),
// Properties: &armbillingbenefits.RoleAssignmentEntityProperties{
// PrincipalID: to.Ptr("50000000-0000-0000-0000-000000000000"),
// RoleDefinitionID: to.Ptr("/providers/Microsoft.BillingBenefits/savingsPlanOrders/20000000-0000-0000-0000-000000000009/providers/Microsoft.Authorization/roleDefinitions/30000000-0000-0000-0000-000000000008"),
// Scope: to.Ptr("/providers/Microsoft.BillingBenefits/savingsPlanOrders/20000000-0000-0000-0000-000000000009"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { BillingBenefitsRP } = require("@azure/arm-billingbenefits");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Elevate as owner on savings plan order based on billing permissions.
*
* @summary Elevate as owner on savings plan order based on billing permissions.
* x-ms-original-file: specification/billingbenefits/resource-manager/Microsoft.BillingBenefits/stable/2022-11-01/examples/SavingsPlanOrderElevate.json
*/
async function savingsPlanOrderElevate() {
const savingsPlanOrderId = "20000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new BillingBenefitsRP(credential);
const result = await client.savingsPlanOrder.elevate(savingsPlanOrderId);
console.log(result);
}
savingsPlanOrderElevate().catch(console.error);
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Voorbeeldrespons
{
"properties": {
"roleDefinitionId": "/providers/Microsoft.BillingBenefits/savingsPlanOrders/20000000-0000-0000-0000-000000000009/providers/Microsoft.Authorization/roleDefinitions/30000000-0000-0000-0000-000000000008",
"principalId": "50000000-0000-0000-0000-000000000000",
"scope": "/providers/Microsoft.BillingBenefits/savingsPlanOrders/20000000-0000-0000-0000-000000000009"
},
"id": "/providers/Microsoft.BillingBenefits/savingsPlanOrders/20000000-0000-0000-0000-000000000009/providers/Microsoft.Authorization/roleAssignments/70000000-0000-0000-0000-000000000005",
"name": "70000000-0000-0000-0000-000000000005"
}
Definities
ErrorAdditionalInfo
Object
Aanvullende informatie over de resourcebeheerfout.
Name |
Type |
Description |
info
|
object
|
De aanvullende informatie.
|
type
|
string
|
Het extra informatietype.
|
ErrorDetail
Object
De foutdetails.
Name |
Type |
Description |
additionalInfo
|
ErrorAdditionalInfo[]
|
De fout bevat aanvullende informatie.
|
code
|
string
|
De foutcode.
|
details
|
ErrorDetail[]
|
De foutdetails.
|
message
|
string
|
Het foutbericht.
|
target
|
string
|
Het foutdoel.
|
ErrorResponse
Object
Foutreactie
Name |
Type |
Description |
error
|
ErrorDetail
|
Het foutobject.
|
RoleAssignmentEntity
Object
Roltoewijzingsentiteit
Name |
Type |
Description |
id
|
string
|
Entiteits-id van roltoewijzing
|
name
|
string
|
Naam van roltoewijzingsentiteit
|
properties.principalId
|
string
|
Principal-id
|
properties.roleDefinitionId
|
string
|
Id van roldefinitie
|
properties.scope
|
string
|
Bereik van de roltoewijzingsentiteit
|