Erhöhen Sie den Besitzer auf der Grundlage von Abrechnungsberechtigungen als Besitzer des Sparplanauftrags.
POST https://management.azure.com/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/elevate?api-version=2022-11-01
URI-Parameter
Name |
In |
Erforderlich |
Typ |
Beschreibung |
savingsPlanOrderId
|
path |
True
|
string
|
Auftrags-ID des Sparplans
|
api-version
|
query |
True
|
string
|
Die api-Version, die vom Dienst verwendet werden soll
|
Antworten
Sicherheit
azure_auth
Azure Active Directory OAuth2-Fluss
Typ:
oauth2
Ablauf:
implicit
Autorisierungs-URL:
https://login.microsoftonline.com/common/oauth2/authorize
Bereiche
Name |
Beschreibung |
user_impersonation
|
Identitätswechsel ihres Benutzerkontos
|
Beispiele
SavingsPlanOrderElevate
Beispielanforderung
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
Beispiel für eine Antwort
{
"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"
}
Definitionen
ErrorAdditionalInfo
Objekt
Der Ressourcenverwaltungsfehler zusätzliche Informationen.
Name |
Typ |
Beschreibung |
info
|
object
|
Die zusätzlichen Informationen.
|
type
|
string
|
Der zusätzliche Informationstyp.
|
ErrorDetail
Objekt
Das Fehlerdetails.
Name |
Typ |
Beschreibung |
additionalInfo
|
ErrorAdditionalInfo[]
|
Die zusätzlichen Informationen des Fehlers.
|
code
|
string
|
Der Fehlercode.
|
details
|
ErrorDetail[]
|
Die Fehlerdetails.
|
message
|
string
|
Die Fehlermeldung.
|
target
|
string
|
Das Fehlerziel.
|
ErrorResponse
Objekt
Fehlerantwort
Name |
Typ |
Beschreibung |
error
|
ErrorDetail
|
Das Fehlerobjekt.
|
RoleAssignmentEntity
Objekt
Rollenzuweisungsentität
Name |
Typ |
Beschreibung |
id
|
string
|
Entitäts-ID der Rollenzuweisung
|
name
|
string
|
Name der Rollenzuweisungsentität
|
properties.principalId
|
string
|
Prinzipal-ID
|
properties.roleDefinitionId
|
string
|
Rollendefinitions-ID
|
properties.scope
|
string
|
Bereich der Rollenzuweisungsentität
|