From 9af192379d5e8d18e9017a85c5977f58e702a866 Mon Sep 17 00:00:00 2001 From: Tiano2017 <31759375+Tiano2017@users.noreply.github.com> Date: Tue, 30 Mar 2021 18:10:18 -0700 Subject: [PATCH] [Resources] Import APIs for subscriptions.json file (#12964) * copy from 2020-01-01/subscriptions.json * add changes for extended location * Add examples copied from 2020-01-01 * add example for getting locations with extended locations * add reference to example file * Add extended location to resource definition. * resolve comments * update readme.md for subscriptions * update error responses in subscriptions spec * revert changes in common types * remove changes in 2020-10-01. add 2021-01-01. * copy subscriptions.json * add changes for extended locations in 2021-01-01 * update version to 2021-01-01 * revert unwanted changes * Fix readme * add x-ms-mutability to extendedLocation property --- .../examples/CheckResourceName.json | 20 + .../2021-01-01/examples/GetLocations.json | 54 ++ .../GetLocationsWithExtendedLocations.json | 83 ++ .../2021-01-01/examples/GetSubscription.json | 32 + .../2021-01-01/examples/GetSubscriptions.json | 61 ++ .../2021-01-01/examples/GetTenants.json | 53 ++ .../stable/2021-01-01/resources.json | 28 + .../stable/2021-01-01/subscriptions.json | 747 ++++++++++++++++++ .../resources/resource-manager/readme.md | 57 +- 9 files changed, 1112 insertions(+), 23 deletions(-) create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/examples/CheckResourceName.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/examples/GetLocations.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/examples/GetLocationsWithExtendedLocations.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/examples/GetSubscription.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/examples/GetSubscriptions.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/examples/GetTenants.json create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/subscriptions.json diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/examples/CheckResourceName.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/examples/CheckResourceName.json new file mode 100644 index 000000000000..45b60e3b9971 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/examples/CheckResourceName.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "body": [ + { + "Name": "isxbox", + "Type": "ResourceProviderTestHost/TestResourceType" + } + ], + "api-version": "2021-01-01" + }, + "responses": { + "200": { + "body": { + "name": "isxbox", + "type": "ResourceProviderTestHost/TestResourceType", + "status": "Allowed" + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/examples/GetLocations.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/examples/GetLocations.json new file mode 100644 index 000000000000..445f660c0b38 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/examples/GetLocations.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "subscriptionId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", + "api-version": "2021-01-01" + }, + "responses": { + "200": { + "body": [ + { + "id": "/subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05/locations/eastus", + "name": "eastus", + "type": "Region", + "displayName": "East US", + "regionalDisplayName": "(US) East US", + "metadata": { + "regionType": "Physical", + "regionCategory": "Recommended", + "geographyGroup": "US", + "longitude": "-79.8164", + "latitude": "37.3719", + "physicalLocation": "Virginia", + "pairedRegion": [ + { + "name": "westus", + "id": "/subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05/locations/westus" + } + ] + } + }, + { + "id": "/subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05/locations/eastus2", + "name": "eastus2", + "type": "Region", + "displayName": "East US 2", + "regionalDisplayName": "(US) East US 2", + "metadata": { + "regionType": "Physical", + "regionCategory": "Recommended", + "geographyGroup": "US", + "longitude": "-78.3889", + "latitude": "36.6681", + "physicalLocation": "Virginia", + "pairedRegion": [ + { + "name": "centralus", + "id": "/subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05/locations/centralus" + } + ] + } + } + ] + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/examples/GetLocationsWithExtendedLocations.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/examples/GetLocationsWithExtendedLocations.json new file mode 100644 index 000000000000..ded38f8b6a21 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/examples/GetLocationsWithExtendedLocations.json @@ -0,0 +1,83 @@ +{ + "parameters": { + "subscriptionId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", + "api-version": "2021-01-01", + "includeExtendedLocations": "true" + }, + "responses": { + "200": { + "body": [ + { + "id": "/subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05/locations/eastus", + "name": "eastus", + "type": "Region", + "displayName": "East US", + "regionalDisplayName": "(US) East US", + "metadata": { + "regionType": "Physical", + "regionCategory": "Recommended", + "geographyGroup": "US", + "longitude": "-79.8164", + "latitude": "37.3719", + "physicalLocation": "Virginia", + "pairedRegion": [ + { + "name": "westus", + "id": "/subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05/locations/westus" + } + ] + } + }, + { + "id": "/subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05/locations/eastus2", + "name": "eastus2", + "type": "Region", + "displayName": "East US 2", + "regionalDisplayName": "(US) East US 2", + "metadata": { + "regionType": "Physical", + "regionCategory": "Recommended", + "geographyGroup": "US", + "longitude": "-78.3889", + "latitude": "36.6681", + "physicalLocation": "Virginia", + "pairedRegion": [ + { + "name": "centralus", + "id": "/subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05/locations/centralus" + } + ] + } + }, + { + "id": "/subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05/locations/westus/edgeZones/microsoftlosangeles1", + "name": "microsoftlosangeles1", + "type": "EdgeZone", + "displayName": "Microsoft Los Angeles 1", + "regionalDisplayName": "Microsoft Los Angeles 1", + "metadata": { + "regionType": "Physical", + "regionCategory": "Extended", + "longitude": "-118.235374", + "latitude": "34.058414", + "homeLocation": "westus" + } + }, + { + "id": "/subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05/locations/eastus2euap/edgeZones/microsoftrrdclab1", + "name": "microsoftrrdclab1", + "type": "EdgeZone", + "displayName": "Microsoft RRDC Lab 1", + "regionalDisplayName": "Microsoft RRDC Lab 1", + "metadata": { + "regionType": "Physical", + "regionCategory": "Extended", + "longitude": "-122.03197", + "latitude": "47.69106", + "homeLocation": "eastus2euap" + } + } + ] + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/examples/GetSubscription.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/examples/GetSubscription.json new file mode 100644 index 000000000000..f62a28551dcc --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/examples/GetSubscription.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", + "api-version": "2021-01-01" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05", + "subscriptionId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", + "tenantId": "31c75423-32d6-4322-88b7-c478bdde4858", + "displayName": "Example Subscription", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + }, + "authorizationSource": "Bypassed", + "managedByTenants": [ + { + "tenantId": "8f70baf1-1f6e-46a2-a1ff-238dac1ebfb7" + } + ], + "tags": { + "tagKey1": "tagValue1", + "tagKey2": "tagValue2" + } + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/examples/GetSubscriptions.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/examples/GetSubscriptions.json new file mode 100644 index 000000000000..b340788d7eee --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/examples/GetSubscriptions.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2021-01-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/291bba3f-e0a5-47bc-a099-3bdcb2a50a05", + "subscriptionId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", + "tenantId": "31c75423-32d6-4322-88b7-c478bdde4858", + "displayName": "Example Subscription", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + }, + "authorizationSource": "RoleBased", + "managedByTenants": [ + { + "tenantId": "8f70baf1-1f6e-46a2-a1ff-238dac1ebfb7" + } + ], + "tags": { + "tagKey1": "tagValue1", + "tagKey2": "tagValue2" + } + }, + { + "id": "/subscriptions/72ac930a-f34e-42d8-b06d-dc2a9e12ed71", + "subscriptionId": "72ac930a-f34e-42d8-b06d-dc2a9e12ed71", + "tenantId": "2a0ff0de-96b2-4859-bb7c-a430d07a3e0c", + "displayName": "Example Subscription2", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + }, + "authorizationSource": "RoleBased", + "managedByTenants": [ + { + "tenantId": "8f70baf1-1f6e-46a2-a1ff-238dac1ebfb7" + }, + { + "tenantId": "f7fb6af2-321d-47c8-9c0f-b0239eaad39a" + } + ], + "tags": { + "tagKey1": "tagValue1", + "tagKey2": "tagValue2" + } + } + ], + "nextLink": "..." + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/examples/GetTenants.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/examples/GetTenants.json new file mode 100644 index 000000000000..553693bbc1e4 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/examples/GetTenants.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "api-version": "2021-01-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/tenants/a70a1586-9c4a-4373-b907-1d310660dbd1", + "tenantId": "a70a1586-9c4a-4373-b907-1d310660dbd1", + "countryCode": "US", + "displayName": "Test_Test_aad50", + "domains": [ + "aad50.ccsctp.net" + ], + "tenantCategory": "ManagedBy", + "defaultDomain": "aad50.ccsctp.net", + "tenantType": "AAD" + }, + { + "id": "/tenants/83abe5cd-bcc3-441a-bd86-e6a75360cecc", + "tenantId": "83abe5cd-bcc3-441a-bd86-e6a75360cecc", + "countryCode": "US", + "displayName": "Contoso Corp.", + "domains": [ + "auxteststagemanual.ccsctp.net" + ], + "tenantCategory": "Home", + "defaultDomain": "auxteststagemanual.ccsctp.net", + "tenantType": "AAD" + }, + { + "id": "/tenants/daea2e9b-847b-4c93-850d-2aa6f2d7af33", + "tenantId": "daea2e9b-847b-4c93-850d-2aa6f2d7af33", + "countryCode": "US", + "displayName": "TEST_TEST_RDV", + "domains": [ + "rdvmohoro.ccsctp.net", + "rdvmohoro.mail.ccsctp.net", + "rdvmohoro.com" + ], + "tenantCategory": "ProjectedBy", + "defaultDomain": "rdvmohoro.ccsctp.net", + "tenantType": "AAD", + "tenantBrandingLogoUrl": "logo1.logo.rdvmohoro.com" + } + ], + "nextLink": "..." + } + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/resources.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/resources.json index 36301bd64a2b..b71a010d0058 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/resources.json +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/resources.json @@ -5381,6 +5381,26 @@ ], "description": "Resource information." }, + "ExtendedLocation": { + "properties": { + "type": { + "type": "string", + "enum": [ + "EdgeZone" + ], + "x-ms-enum": { + "name": "ExtendedLocationType", + "modelAsString": true + }, + "description": "The extended location type." + }, + "name": { + "type": "string", + "description": "The extended location name." + } + }, + "description": "Resource extended location." + }, "GenericResourceExpanded": { "properties": { "createdTime": { @@ -5954,6 +5974,14 @@ "type": "string", "description": "Resource location" }, + "extendedLocation": { + "$ref": "#/definitions/ExtendedLocation", + "x-ms-mutability": [ + "read", + "create" + ], + "description": "Resource extended location." + }, "tags": { "type": "object", "additionalProperties": { diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/subscriptions.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/subscriptions.json new file mode 100644 index 000000000000..f1a2f58dbb72 --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2021-01-01/subscriptions.json @@ -0,0 +1,747 @@ +{ + "swagger": "2.0", + "info": { + "title": "SubscriptionClient", + "version": "2021-01-01", + "description": "All resource groups and resources exist within subscriptions. These operation enable you get information about your subscriptions and tenants. A tenant is a dedicated instance of Azure Active Directory (Azure AD) for your organization." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/providers/Microsoft.Resources/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "description": "Lists all of the available Microsoft.Resources REST API operations.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/locations": { + "get": { + "tags": [ + "Subscriptions" + ], + "operationId": "Subscriptions_ListLocations", + "summary": "Gets all available geo-locations.", + "description": "This operation provides all the locations that are available for resource providers; however, each resource provider may support a subset of this list.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "includeExtendedLocations", + "in": "query", + "required": false, + "type": "boolean", + "description": "Whether to include extended locations.", + "x-ms-parameter-location": "method" + } + ], + "responses": { + "200": { + "description": "OK - Returns an array of locations.", + "schema": { + "$ref": "#/definitions/LocationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + }, + "x-ms-examples": { + "GetLocationsWithASubscriptionId": { + "$ref": "./examples/GetLocations.json" + }, + "GetLocationsWithExtendedLocations": { + "$ref": "./examples/GetLocationsWithExtendedLocations.json" + } + } + } + }, + "/subscriptions/{subscriptionId}": { + "get": { + "tags": [ + "Subscriptions" + ], + "operationId": "Subscriptions_Get", + "description": "Gets details about a specified subscription.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns information about the subscription.", + "schema": { + "$ref": "#/definitions/Subscription" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "GetASingleSubscription": { + "$ref": "./examples/GetSubscription.json" + } + } + } + }, + "/subscriptions": { + "get": { + "tags": [ + "Subscriptions" + ], + "operationId": "Subscriptions_List", + "description": "Gets all subscriptions for a tenant.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns an array of subscriptions.", + "schema": { + "$ref": "#/definitions/SubscriptionListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "GetAllSubscriptions": { + "$ref": "./examples/GetSubscriptions.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/tenants": { + "get": { + "tags": [ + "Tenants" + ], + "operationId": "Tenants_List", + "description": "Gets the tenants for your account.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns an array of tenants.", + "schema": { + "$ref": "#/definitions/TenantListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "GetAllTenants": { + "$ref": "./examples/GetTenants.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.Resources/checkResourceName": { + "post": { + "tags": [ + "Tenants" + ], + "operationId": "checkResourceName", + "description": "A resource name is valid if it is not a reserved word, does not contains a reserved word and does not start with a reserved word", + "summary": "Checks resource name validity", + "consumes": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/CheckResourceNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns status as allowed or not.", + "schema": { + "$ref": "#/definitions/CheckResourceNameResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "CheckValidityForAResourceName": { + "$ref": "./examples/CheckResourceName.json" + } + } + } + } + }, + "definitions": { + "PairedRegion": { + "description": "Information regarding paired region.", + "properties": { + "name": { + "type": "string", + "readOnly": true, + "description": "The name of the paired region." + }, + "id": { + "readOnly": true, + "type": "string", + "description": "The fully qualified ID of the location. For example, /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus." + }, + "subscriptionId": { + "readOnly": true, + "type": "string", + "description": "The subscription ID." + } + } + }, + "LocationMetadata": { + "description": "Location metadata information", + "properties": { + "regionType": { + "readOnly": true, + "type": "string", + "description": "The type of the region.", + "enum": [ + "Physical", + "Logical" + ], + "x-ms-enum": { + "name": "RegionType", + "modelAsString": true + } + }, + "regionCategory": { + "readOnly": true, + "type": "string", + "description": "The category of the region.", + "enum": [ + "Recommended", + "Extended", + "Other" + ], + "x-ms-enum": { + "name": "RegionCategory", + "modelAsString": true + } + }, + "geographyGroup": { + "readOnly": true, + "type": "string", + "description": "The geography group of the location." + }, + "longitude": { + "readOnly": true, + "type": "string", + "description": "The longitude of the location." + }, + "latitude": { + "readOnly": true, + "type": "string", + "description": "The latitude of the location." + }, + "physicalLocation": { + "readOnly": true, + "type": "string", + "description": "The physical location of the Azure location." + }, + "pairedRegion": { + "type": "array", + "description": "The regions paired to this region.", + "items": { + "$ref": "#/definitions/PairedRegion" + } + }, + "homeLocation": { + "readOnly": true, + "type": "string", + "description": "The home location of an edge zone." + } + } + }, + "Location": { + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "The fully qualified ID of the location. For example, /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus." + }, + "subscriptionId": { + "readOnly": true, + "type": "string", + "description": "The subscription ID." + }, + "name": { + "readOnly": true, + "type": "string", + "description": "The location name." + }, + "type": { + "readOnly": true, + "type": "string", + "description": "The location type.", + "enum": [ + "Region", + "EdgeZone" + ], + "x-ms-enum": { + "name": "LocationType", + "modelAsString": false + } + }, + "displayName": { + "readOnly": true, + "type": "string", + "description": "The display name of the location." + }, + "regionalDisplayName": { + "readOnly": true, + "type": "string", + "description": "The display name of the location and its region." + }, + "metadata": { + "description": "Metadata of the location, such as lat/long, paired region, and others.", + "$ref": "#/definitions/LocationMetadata" + } + }, + "description": "Location information." + }, + "LocationListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Location" + }, + "description": "An array of locations." + } + }, + "description": "Location list operation response." + }, + "Subscription": { + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "The fully qualified ID for the subscription. For example, /subscriptions/00000000-0000-0000-0000-000000000000." + }, + "subscriptionId": { + "readOnly": true, + "type": "string", + "description": "The subscription ID." + }, + "displayName": { + "readOnly": true, + "type": "string", + "description": "The subscription display name." + }, + "tenantId": { + "readOnly": true, + "type": "string", + "description": "The subscription tenant ID." + }, + "state": { + "readOnly": true, + "type": "string", + "description": "The subscription state. Possible values are Enabled, Warned, PastDue, Disabled, and Deleted.", + "enum": [ + "Enabled", + "Warned", + "PastDue", + "Disabled", + "Deleted" + ], + "x-ms-enum": { + "name": "SubscriptionState", + "modelAsString": false + } + }, + "subscriptionPolicies": { + "$ref": "#/definitions/SubscriptionPolicies", + "description": "The subscription policies." + }, + "authorizationSource": { + "type": "string", + "description": "The authorization source of the request. Valid values are one or more combinations of Legacy, RoleBased, Bypassed, Direct and Management. For example, 'Legacy, RoleBased'." + }, + "managedByTenants": { + "type": "array", + "items": { + "$ref": "#/definitions/ManagedByTenant" + }, + "description": "An array containing the tenants managing the subscription." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string", + "description": "The additional properties. " + }, + "description": "The tags attached to the subscription." + } + }, + "description": "Subscription information." + }, + "SubscriptionPolicies": { + "properties": { + "locationPlacementId": { + "readOnly": true, + "type": "string", + "description": "The subscription location placement ID. The ID indicates which regions are visible for a subscription. For example, a subscription with a location placement Id of Public_2014-09-01 has access to Azure public regions." + }, + "quotaId": { + "readOnly": true, + "type": "string", + "description": "The subscription quota ID." + }, + "spendingLimit": { + "readOnly": true, + "type": "string", + "description": "The subscription spending limit.", + "enum": [ + "On", + "Off", + "CurrentPeriodOff" + ], + "x-ms-enum": { + "name": "spendingLimit", + "modelAsString": false + } + } + }, + "description": "Subscription policies." + }, + "ManagedByTenant": { + "properties": { + "tenantId": { + "readOnly": true, + "type": "string", + "description": "The tenant ID of the managing tenant. This is a GUID." + } + }, + "description": "Information about a tenant managing the subscription." + }, + "SubscriptionListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Subscription" + }, + "description": "An array of subscriptions." + }, + "nextLink": { + "type": "string", + "description": "The URL to get the next set of results." + } + }, + "required": [ + "nextLink" + ], + "description": "Subscription list operation response." + }, + "TenantIdDescription": { + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "The fully qualified ID of the tenant. For example, /tenants/00000000-0000-0000-0000-000000000000." + }, + "tenantId": { + "readOnly": true, + "type": "string", + "description": "The tenant ID. For example, 00000000-0000-0000-0000-000000000000." + }, + "tenantCategory": { + "readOnly": true, + "type": "string", + "description": "Category of the tenant.", + "enum": [ + "Home", + "ProjectedBy", + "ManagedBy" + ], + "x-ms-enum": { + "name": "TenantCategory", + "modelAsString": false + } + }, + "country": { + "readOnly": true, + "type": "string", + "description": "Country/region name of the address for the tenant." + }, + "countryCode": { + "readOnly": true, + "type": "string", + "description": "Country/region abbreviation for the tenant." + }, + "displayName": { + "readOnly": true, + "type": "string", + "description": "The display name of the tenant." + }, + "domains": { + "readOnly": true, + "type": "array", + "items": { + "type": "string", + "description": "The domain name for a tenant." + }, + "description": "The list of domains for the tenant." + }, + "defaultDomain": { + "readOnly": true, + "type": "string", + "description": "The default domain for the tenant." + }, + "tenantType": { + "readOnly": true, + "type": "string", + "description": "The tenant type. Only available for 'Home' tenant category." + }, + "tenantBrandingLogoUrl": { + "readOnly": true, + "type": "string", + "description": "The tenant's branding logo URL. Only available for 'Home' tenant category." + } + }, + "description": "Tenant Id information." + }, + "TenantListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/TenantIdDescription" + }, + "description": "An array of tenants." + }, + "nextLink": { + "type": "string", + "description": "The URL to use for getting the next set of results." + } + }, + "required": [ + "nextLink" + ], + "description": "Tenant Ids information." + }, + "ResourceName": { + "description": "Name and Type of the Resource", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "description": "Name of the resource", + "type": "string" + }, + "type": { + "type": "string", + "description": "The type of the resource" + } + } + }, + "CheckResourceNameResult": { + "properties": { + "name": { + "description": "Name of Resource", + "type": "string" + }, + "type": { + "description": "Type of Resource", + "type": "string" + }, + "status": { + "description": "Is the resource name Allowed or Reserved", + "type": "string", + "enum": [ + "Allowed", + "Reserved" + ], + "x-ms-enum": { + "name": "ResourceNameStatus", + "modelAsString": true + } + } + }, + "description": "Resource Name valid if not a reserved word, does not contain a reserved word and does not start with a reserved word" + }, + "CloudError": { + "x-ms-external": true, + "properties": { + "error": { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse" + } + }, + "description": "An error response for a resource management request." + }, + "Operation": { + "description": "Microsoft.Resources operation", + "type": "object", + "properties": { + "name": { + "description": "Operation name: {provider}/{resource}/{operation}", + "type": "string" + }, + "display": { + "description": "The object that represents the operation.", + "properties": { + "provider": { + "description": "Service provider: Microsoft.Resources", + "type": "string" + }, + "resource": { + "description": "Resource on which the operation is performed: Profile, endpoint, etc.", + "type": "string" + }, + "operation": { + "description": "Operation type: Read, write, delete, etc.", + "type": "string" + }, + "description": { + "description": "Description of the operation.", + "type": "string" + } + } + } + } + }, + "OperationListResult": { + "description": "Result of the request to list Microsoft.Resources operations. It contains a list of operations and a URL link to get the next set of results.", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + }, + "description": "List of Microsoft.Resources operations." + }, + "nextLink": { + "type": "string", + "description": "URL to get the next set of operation list results if there are any." + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The ID of the target subscription.", + "x-ms-parameter-location": "method" + }, + "CheckResourceNameParameter": { + "description": "Resource object with values for resource name and resource type", + "in": "body", + "name": "Resource Name Definition", + "schema": { + "$ref": "#/definitions/ResourceName" + }, + "x-ms-parameter-location": "method" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to use for the operation.", + "x-ms-parameter-location": "client" + } + } +} diff --git a/specification/resources/resource-manager/readme.md b/specification/resources/resource-manager/readme.md index 516e8084fca7..fc12fcd06fc6 100644 --- a/specification/resources/resource-manager/readme.md +++ b/specification/resources/resource-manager/readme.md @@ -45,7 +45,7 @@ tag: package-resources-2021-01 ``` ``` yaml $(package-subscriptions) -tag: package-subscriptions-2019-11 +tag: package-subscriptions-2021-01 ``` ``` yaml $(package-links) @@ -68,18 +68,9 @@ tag: package-templatespecs-2019-06-preview These settings apply only when `--tag=package-resources-2021-01` is specified on the command line. -```yaml $(tag) == 'package-resources-2021-01' +``` yaml $(tag) == 'package-resources-2021-01' input-file: - - Microsoft.Resources/stable/2021-01-01/resources.json -``` - -### Tag: package-resources-2020-10 - -These settings apply only when `--tag=package-resources-2020-10` is specified on the command line. - -``` yaml $(tag) == 'package-resources-2020-10' -input-file: -- Microsoft.Resources/stable/2020-10-01/resources.json +- Microsoft.Resources/stable/2021-01-01/resources.json ``` ### Tag: package-policy-2020-09 @@ -108,22 +99,15 @@ input-file: - Microsoft.Solutions/preview/2020-08-21-preview/managedapplications.json ``` -### Tag: package-resources-2020-08 -These settings apply only when `--tag=package-resources-2020-08` is specified on the command line. -``` yaml $(tag) == 'package-resources-2020-08' -input-file: - - Microsoft.Resources/stable/2020-08-01/resources.json -``` - -### Tag: package-subscriptions-2020-01 +### Tag: package-subscriptions-2021-01 -These settings apply only when `--tag=package-subscriptions-2020-01` is specified on the command line. +These settings apply only when `--tag=package-subscriptions-2021-01` is specified on the command line. -``` yaml $(tag) == 'package-subscriptions-2020-01' +``` yaml $(tag) == 'package-subscriptions-2021-01' input-file: - - Microsoft.Resources/stable/2020-01-01/subscriptions.json +- Microsoft.Resources/stable/2021-01-01/subscriptions.json ``` ### Tag: package-deploymentscripts-2020-10 @@ -332,6 +316,24 @@ input-file: - Microsoft.Authorization/preview/2015-10-01-preview/policy.json ``` +### Tag: package-resources-2020-10 + +These settings apply only when `--tag=package-resources-2020-10` is specified on the command line. + +``` yaml $(tag) == 'package-resources-2020-10' +input-file: + - Microsoft.Resources/stable/2020-10-01/resources.json +``` + +### Tag: package-resources-2020-08 + +These settings apply only when `--tag=package-resources-2020-08` is specified on the command line. + +``` yaml $(tag) == 'package-resources-2020-08' +input-file: + - Microsoft.Resources/stable/2020-08-01/resources.json +``` + ### Tag: package-resources-2020-06 These settings apply only when `--tag=package-resources-2020-06` is specified on the command line. @@ -458,6 +460,15 @@ input-file: - Microsoft.Resources/stable/2015-11-01/resources.json ``` +### Tag: package-subscriptions-2020-01 + +These settings apply only when `--tag=package-subscriptions-2020-01` is specified on the command line. + +``` yaml $(tag) == 'package-subscriptions-2020-01' +input-file: + - Microsoft.Resources/stable/2020-01-01/subscriptions.json +``` + ### Tag: package-subscriptions-2019-11 These settings apply only when `--tag=package-subscriptions-2019-11` is specified on the command line.