Delen via


Subscriptions - List

Hiermee worden alle abonnementen voor een tenant opgehaald.

GET https://management.azure.com/subscriptions?api-version=2022-12-01

URI-parameters

Name In Vereist Type Description
api-version
query True

string

minLength: 1

De API-versie die voor deze bewerking moet worden gebruikt.

Antwoorden

Name Type Description
200 OK

SubscriptionListResult

Azure-operatie succesvol voltooid.

Other Status Codes

CloudError

Een onverwachte foutreactie.

Beveiliging

azure_auth

OAuth2-stroom voor Azure Active Directory.

Type: oauth2
Stroom: implicit
Autorisatie-URL: https://login.microsoftonline.com/common/oauth2/authorize

Bereiken

Name Description
user_impersonation Uw gebruikersaccount imiteren

Voorbeelden

GetAllSubscriptions

Voorbeeldaanvraag

GET https://management.azure.com/subscriptions?api-version=2022-12-01

Voorbeeldrespons

{
  "nextLink": "http://nextlink",
  "value": [
    {
      "authorizationSource": "RoleBased",
      "displayName": "Example Subscription",
      "id": "/subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05",
      "managedByTenants": [
        {
          "tenantId": "8f70baf1-1f6e-46a2-a1ff-238dac1ebfb7"
        }
      ],
      "state": "Enabled",
      "subscriptionId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05",
      "subscriptionPolicies": {
        "locationPlacementId": "Internal_2014-09-01",
        "quotaId": "Internal_2014-09-01",
        "spendingLimit": "Off"
      },
      "tags": {
        "tagKey1": "tagValue1",
        "tagKey2": "tagValue2"
      },
      "tenantId": "31c75423-32d6-4322-88b7-c478bdde4858"
    },
    {
      "authorizationSource": "RoleBased",
      "displayName": "Example Subscription2",
      "id": "/subscriptions/72ac930a-f34e-42d8-b06d-dc2a9e12ed71",
      "managedByTenants": [
        {
          "tenantId": "8f70baf1-1f6e-46a2-a1ff-238dac1ebfb7"
        },
        {
          "tenantId": "f7fb6af2-321d-47c8-9c0f-b0239eaad39a"
        }
      ],
      "state": "Enabled",
      "subscriptionId": "72ac930a-f34e-42d8-b06d-dc2a9e12ed71",
      "subscriptionPolicies": {
        "locationPlacementId": "Internal_2014-09-01",
        "quotaId": "Internal_2014-09-01",
        "spendingLimit": "Off"
      },
      "tags": {
        "tagKey1": "tagValue1",
        "tagKey2": "tagValue2"
      },
      "tenantId": "2a0ff0de-96b2-4859-bb7c-a430d07a3e0c"
    }
  ]
}

Definities

Name Description
CloudError

Een foutbericht voor een aanvraag voor resourcebeheer.

ErrorAdditionalInfo

Aanvullende informatie over de resourcebeheerfout.

ErrorDetail

De foutdetails.

ErrorResponse

Foutreactie

ManagedByTenant

Informatie over een tenant die het abonnement beheert.

SpendingLimit

De bestedingslimiet van het abonnement.

Subscription

Abonnementsgegevens.

SubscriptionListResult

Antwoord op bewerking voor abonnementslijst.

SubscriptionPolicies

Abonnementsbeleid.

SubscriptionState

De abonnementsstatus. Mogelijke waarden zijn Ingeschakeld, Gewaarschuwd, PastDue, Uitgeschakeld en Verwijderd.

CloudError

Een foutbericht voor een aanvraag voor resourcebeheer.

Name Type Description
error

ErrorResponse

Foutreactie
Veelvoorkomende foutreactie voor alle Azure Resource Manager-API's om foutdetails te retourneren voor mislukte bewerkingen. (Dit volgt ook de OData-foutreactieindeling.)

ErrorAdditionalInfo

Aanvullende informatie over de resourcebeheerfout.

Name Type Description
info

object

De aanvullende informatie.

type

string

Het extra informatietype.

ErrorDetail

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

Foutreactie

Name Type Description
error

ErrorDetail

Het foutobject.

ManagedByTenant

Informatie over een tenant die het abonnement beheert.

Name Type Description
tenantId

string

De tenant-id van de beherende tenant. Dit is een GUID.

SpendingLimit

De bestedingslimiet van het abonnement.

Waarde Description
On

On

Off

Uit

CurrentPeriodOff

CurrentPeriodOff

Subscription

Abonnementsgegevens.

Name Type Description
authorizationSource

string

De autorisatiebron van de aanvraag. Geldige waarden zijn een of meer combinaties van Verouderd, RoleBased, Bypassed, Direct en Management. Bijvoorbeeld 'Verouderd, RoleBased'.

displayName

string

De weergavenaam van het abonnement.

id

string

De volledig gekwalificeerde id voor het abonnement. Bijvoorbeeld /subscriptions/8d65815f-a5b6-402f-9298-045155da7d74

managedByTenants

ManagedByTenant[]

Een matrix met de tenants die het abonnement beheren.

state

SubscriptionState

De abonnementsstatus. Mogelijke waarden zijn Ingeschakeld, Gewaarschuwd, PastDue, Uitgeschakeld en Verwijderd.

subscriptionId

string

De ID van het abonnement.

subscriptionPolicies

SubscriptionPolicies

Het abonnementsbeleid.

tags

object

De tags die zijn gekoppeld aan het abonnement.

tenantId

string

De tenant-id van het abonnement.

SubscriptionListResult

Antwoord op bewerking voor abonnementslijst.

Name Type Description
nextLink

string (uri)

De koppeling naar de volgende pagina met items

value

Subscription[]

De abonnementsitems op deze pagina

SubscriptionPolicies

Abonnementsbeleid.

Name Type Description
locationPlacementId

string

De plaatsings-id van de abonnementslocatie. De id geeft aan welke regio's zichtbaar zijn voor een abonnement. Een abonnement met een locatieplaatsplaatsings-id van Public_2014-09-01 heeft bijvoorbeeld toegang tot openbare Azure-regio's.

quotaId

string

De quotum-id van het abonnement.

spendingLimit

SpendingLimit

De bestedingslimiet van het abonnement.

SubscriptionState

De abonnementsstatus. Mogelijke waarden zijn Ingeschakeld, Gewaarschuwd, PastDue, Uitgeschakeld en Verwijderd.

Waarde Description
Enabled

Ingeschakeld

Warned

Gewaarschuwd

PastDue

PastDue

Disabled

Disabled

Deleted

Verwijderd