From f038fbda41639362182ff3d2aeafa67eb0cab970 Mon Sep 17 00:00:00 2001 From: Bala Date: Mon, 3 Feb 2020 19:34:24 -0800 Subject: [PATCH] Add common types --- .../SwaggerSpecs/Microsoft.Kusto/kusto.json | 14 +- .../resource-management/v1/types.json | 467 ++++++++++++++++++ 2 files changed, 474 insertions(+), 7 deletions(-) create mode 100644 App_Data/SwaggerSpecs/common-types/resource-management/v1/types.json diff --git a/App_Data/SwaggerSpecs/Microsoft.Kusto/kusto.json b/App_Data/SwaggerSpecs/Microsoft.Kusto/kusto.json index 9407925..82184df 100644 --- a/App_Data/SwaggerSpecs/Microsoft.Kusto/kusto.json +++ b/App_Data/SwaggerSpecs/Microsoft.Kusto/kusto.json @@ -2998,7 +2998,7 @@ }, "allOf": [ { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/TrackedResource" + "$ref": "../common-types/resource-management/v1/types.json#/definitions/TrackedResource" } ], "description": "Class representing a Kusto cluster." @@ -3037,7 +3037,7 @@ }, "allOf": [ { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/Resource" + "$ref": "../common-types/resource-management/v1/types.json#/definitions/Resource" } ], "description": "Class representing an update to a Kusto cluster." @@ -3068,7 +3068,7 @@ }, "allOf": [ { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource" + "$ref": "../common-types/resource-management/v1/types.json#/definitions/ProxyResource" } ], "description": "Class representing an attached database configuration." @@ -3097,7 +3097,7 @@ }, "allOf": [ { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource" + "$ref": "../common-types/resource-management/v1/types.json#/definitions/ProxyResource" } ], "description": "Class representing a Kusto database.", @@ -3352,7 +3352,7 @@ }, "allOf": [ { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource" + "$ref": "../common-types/resource-management/v1/types.json#/definitions/ProxyResource" } ], "description": "Class representing a database principal assignment." @@ -3367,7 +3367,7 @@ }, "allOf": [ { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource" + "$ref": "../common-types/resource-management/v1/types.json#/definitions/ProxyResource" } ], "description": "Class representing a cluster principal assignment." @@ -3469,7 +3469,7 @@ }, "allOf": [ { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource" + "$ref": "../common-types/resource-management/v1/types.json#/definitions/ProxyResource" } ], "description": "Class representing an data connection.", diff --git a/App_Data/SwaggerSpecs/common-types/resource-management/v1/types.json b/App_Data/SwaggerSpecs/common-types/resource-management/v1/types.json new file mode 100644 index 0000000..fc8930e --- /dev/null +++ b/App_Data/SwaggerSpecs/common-types/resource-management/v1/types.json @@ -0,0 +1,467 @@ +{ + "swagger": "2.0", + "info": { + "version": "1.0", + "title": "Common types" + }, + "paths": {}, + "definitions": { + "Resource": { + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + }, + "name": { + "readOnly": true, + "type": "string", + "description": "The name of the resource" + }, + "type": { + "readOnly": true, + "type": "string", + "description": "The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts." + } + }, + "x-ms-azure-resource": true + }, + "AzureEntityResource": { + "x-ms-client-name": "AzureEntityResource", + "description": "The resource model definition for a Azure Resource Manager resource with an etag.", + "properties": { + "etag": { + "type": "string", + "readOnly": true, + "description": "Resource Etag." + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "TrackedResource": { + "description": "The resource model definition for a ARM tracked top level resource", + "properties": { + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "Resource tags." + }, + "location": { + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ], + "description": "The geo-location where the resource lives" + } + }, + "required": [ + "location" + ], + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "ProxyResource": { + "description": "The resource model definition for a ARM proxy resource. It will have everything other than required location and tags", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "ResourceModelWithAllowedPropertySet": { + "description": "The resource model definition containing the full set of allowed properties for a resource. Except properties bag, there cannot be a top level property outside of this set.", + "properties": { + "id": { + "readOnly": true, + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + }, + "name": { + "readOnly": true, + "type": "string", + "description": "The name of the resource" + }, + "type": { + "readOnly": true, + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.." + }, + "location": { + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ], + "description": "The geo-location where the resource lives" + }, + "managedBy": { + "type": "string", + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource." + }, + "kind": { + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ], + "description": "Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.", + "pattern": "^[-\\w\\._,\\(\\)]+$" + }, + "etag": { + "readOnly": true, + "type": "string", + "description": "The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. " + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "Resource tags." + }, + "identity": { + "allOf": [ + { + "$ref": "#/definitions/Identity" + } + ] + }, + "sku": { + "allOf": [ + { + "$ref": "#/definitions/Sku" + } + ] + }, + "plan": { + "allOf": [ + { + "$ref": "#/definitions/Plan" + } + ] + } + }, + "x-ms-azure-resource": true + }, + "Sku": { + "description": "The resource model definition representing SKU", + "properties": { + "name": { + "type": "string", + "description": "The name of the SKU. Ex - P3. It is typically a letter+number code" + }, + "tier": { + "type": "string", + "enum": [ + "Free", + "Basic", + "Standard", + "Premium" + ], + "x-ms-enum": { + "name": "SkuTier", + "modelAsString": false + }, + "description": "This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT." + }, + "size": { + "type": "string", + "description": "The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. " + }, + "family": { + "type": "string", + "description": "If the service has different generations of hardware, for the same SKU, then that can be captured here." + }, + "capacity": { + "type": "integer", + "format": "int32", + "description": "If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted." + } + }, + "required": [ + "name" + ] + }, + "Identity": { + "description": "Identity for the resource.", + "properties": { + "principalId": { + "readOnly": true, + "type": "string", + "description": "The principal ID of resource identity." + }, + "tenantId": { + "readOnly": true, + "type": "string", + "description": "The tenant ID of resource." + }, + "type": { + "type": "string", + "description": "The identity type.", + "enum": [ + "SystemAssigned" + ], + "x-ms-enum": { + "name": "ResourceIdentityType", + "modelAsString": false + } + } + } + }, + "Plan": { + "properties": { + "name": { + "type": "string", + "description": "A user defined name of the 3rd Party Artifact that is being procured." + }, + "publisher": { + "type": "string", + "description": "The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic" + }, + "product": { + "type": "string", + "description": "The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. " + }, + "promotionCode": { + "type": "string", + "description": "A publisher provided promotion code as provisioned in Data Market for the said product/artifact." + }, + "version": { + "type": "string", + "description": "The version of the desired product/artifact." + } + }, + "description": "Plan for the resource.", + "required": [ + "name", + "publisher", + "product" + ] + }, + "ErrorResponse": { + "properties": { + "code": { + "readOnly": true, + "type": "string", + "description": "The error code." + }, + "message": { + "readOnly": true, + "type": "string", + "description": "The error message." + }, + "target": { + "readOnly": true, + "type": "string", + "description": "The error target." + }, + "details": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResponse" + }, + "description": "The error details." + }, + "additionalInfo": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/ErrorAdditionalInfo" + }, + "description": "The error additional info." + } + }, + "description": "The resource management error response." + }, + "ErrorAdditionalInfo": { + "properties": { + "type": { + "readOnly": true, + "type": "string", + "description": "The additional info type." + }, + "info": { + "readOnly": true, + "type": "object", + "description": "The additional info." + } + }, + "description": "The resource management error additional info." + }, + "locationData": { + "description": "Metadata pertaining to the geographic location of the resource.", + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 256, + "description": "A canonical name for the geographic or physical location." + }, + "city": { + "type": "string", + "description": "The city or locality where the resource is located." + }, + "district": { + "type": "string", + "description": "The district, state, or province where the resource is located." + }, + "countryOrRegion": { + "type": "string", + "description": "The country or region where the resource is located" + } + }, + "required": [ + "name" + ] + }, + "systemData": { + "description": "Metadata pertaining to creation and last modification of the resource.", + "type": "object", + "readOnly": true, + "properties": { + "createdBy": { + "type": "string", + "description": "The identity that created the resource." + }, + "createdByType": { + "type": "string", + "description": "The type of identity that created the resource.", + "enum": [ + "User", + "Application", + "ManagedIdentity", + "Key" + ], + "x-ms-enum": { + "name": "createdByType", + "modelAsString": true + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource creation (UTC)." + }, + "lastModifiedBy": { + "type": "string", + "description": "The identity that last modified the resource." + }, + "lastModifiedByType": { + "type": "string", + "description": "The type of identity that last modified the resource.", + "enum": [ + "User", + "Application", + "ManagedIdentity", + "Key" + ], + "x-ms-enum": { + "name": "createdByType", + "modelAsString": true + } + }, + "lastModifiedByAt": { + "type": "string", + "format": "date-time", + "description": "The type of identity that last modified the resource." + } + } + }, + "encryptionProperties": { + "description": "Configuration of key for data encryption", + "type": "object", + "properties": { + "status": { + "description": "Indicates whether or not the encryption is enabled for container registry.", + "enum": [ + "enabled", + "disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "EncryptionStatus", + "modelAsString": true + } + }, + "keyVaultProperties": { + "$ref": "#/definitions/KeyVaultProperties", + "description": "Key vault properties." + } + } + }, + "KeyVaultProperties": { + "type": "object", + "properties": { + "keyIdentifier": { + "description": "Key vault uri to access the encryption key.", + "type": "string" + }, + "identity": { + "description": "The client id of the identity which will be used to access key vault.", + "type": "string" + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The ID of the target subscription.", + "minLength": 1 + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to use for this operation.", + "minLength": 1 + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group. The name is case insensitive.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90, + "x-ms-parameter-location": "method" + } + } +}