Skip to content

Commit

Permalink
sync common types (#4074)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenglaizhang authored Jun 16, 2021
1 parent ed43a17 commit a9c0e39
Show file tree
Hide file tree
Showing 5 changed files with 517 additions and 19 deletions.
182 changes: 182 additions & 0 deletions specification/common-types/resource-management/v1/privatelinks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
{
"swagger": "2.0",
"info": {
"version": "1.0",
"title": "Common types"
},
"paths": {},
"definitions": {
"PrivateEndpoint": {
"type": "object",
"properties": {
"id": {
"readOnly": true,
"type": "string",
"description": "The ARM identifier for Private Endpoint"
}
},
"description": "The Private Endpoint resource."
},
"PrivateEndpointConnection": {
"type": "object",
"properties": {
"properties": {
"$ref": "#/definitions/PrivateEndpointConnectionProperties",
"x-ms-client-flatten": true,
"description": "Resource properties."
}
},
"allOf": [
{
"$ref": "./types.json#/definitions/Resource"
}
],
"description": "The Private Endpoint Connection resource."
},
"PrivateEndpointConnectionProperties": {
"type": "object",
"properties": {
"privateEndpoint": {
"$ref": "#/definitions/PrivateEndpoint",
"description": "The resource of private end point."
},
"privateLinkServiceConnectionState": {
"$ref": "#/definitions/PrivateLinkServiceConnectionState",
"description": "A collection of information about the state of the connection between service consumer and provider."
},
"provisioningState": {
"$ref": "#/definitions/PrivateEndpointConnectionProvisioningState",
"description": "The provisioning state of the private endpoint connection resource."
}
},
"required": [
"privateLinkServiceConnectionState"
],
"description": "Properties of the PrivateEndpointConnectProperties."
},
"PrivateLinkServiceConnectionState": {
"type": "object",
"properties": {
"status": {
"$ref": "#/definitions/PrivateEndpointServiceConnectionStatus",
"description": "Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service."
},
"description": {
"type": "string",
"description": "The reason for approval/rejection of the connection."
},
"actionsRequired": {
"type": "string",
"description": "A message indicating if changes on the service provider require any updates on the consumer."
}
},
"description": "A collection of information about the state of the connection between service consumer and provider."
},
"PrivateEndpointServiceConnectionStatus": {
"type": "string",
"description": "The private endpoint connection status.",
"enum": [
"Pending",
"Approved",
"Rejected"
],
"x-ms-enum": {
"name": "PrivateEndpointServiceConnectionStatus",
"modelAsString": true
}
},
"PrivateEndpointConnectionProvisioningState": {
"type": "string",
"readOnly": true,
"description": "The current provisioning state.",
"enum": [
"Succeeded",
"Creating",
"Deleting",
"Failed"
],
"x-ms-enum": {
"name": "PrivateEndpointConnectionProvisioningState",
"modelAsString": true
}
},
"PrivateLinkResource": {
"type": "object",
"properties": {
"properties": {
"$ref": "#/definitions/PrivateLinkResourceProperties",
"description": "Resource properties.",
"x-ms-client-flatten": true
}
},
"allOf": [
{
"$ref": "./types.json#/definitions/Resource"
}
],
"description": "A private link resource"
},
"PrivateLinkResourceProperties": {
"type": "object",
"properties": {
"groupId": {
"description": "The private link resource group id.",
"type": "string",
"readOnly": true
},
"requiredMembers": {
"description": "The private link resource required member names.",
"type": "array",
"items": {
"type": "string"
},
"readOnly": true
},
"requiredZoneNames": {
"type": "array",
"items": {
"type": "string"
},
"description": "The private link resource Private link DNS zone name."
}
},
"description": "Properties of a private link resource."
},
"PrivateEndpointConnectionListResult": {
"type": "object",
"properties": {
"value": {
"type": "array",
"description": "Array of private endpoint connections",
"items": {
"$ref": "#/definitions/PrivateEndpointConnection"
}
}
},
"description": "List of private endpoint connection associated with the specified storage account"
},
"PrivateLinkResourceListResult": {
"type": "object",
"properties": {
"value": {
"type": "array",
"description": "Array of private link resources",
"items": {
"$ref": "#/definitions/PrivateLinkResource"
}
}
},
"description": "A list of private link resources"
}
},
"parameters": {
"PrivateEndpointConnectionName": {
"name": "privateEndpointConnectionName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the private endpoint connection associated with the Azure resource",
"x-ms-parameter-location": "method"
}
}
}
44 changes: 30 additions & 14 deletions specification/common-types/resource-management/v1/types.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
"paths": {},
"definitions": {
"Resource": {
"description": "The resource model definition.",
"title": "Resource",
"description": "Common fields that are returned in the response for all Azure Resource Manager resources",
"type": "object",
"properties": {
"id": {
"readOnly": true,
"type": "string",
"description": "Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
"description": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
},
"name": {
"readOnly": true,
Expand All @@ -22,14 +24,16 @@
"type": {
"readOnly": true,
"type": "string",
"description": "The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts."
"description": "The type of the resource. E.g. \"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.",
"title": "Entity Resource",
"description": "The resource model definition for an Azure Resource Manager resource with an etag.",
"type": "object",
"properties": {
"etag": {
"type": "string",
Expand All @@ -44,7 +48,9 @@
]
},
"TrackedResource": {
"description": "The resource model definition for a ARM tracked top level resource",
"title": "Tracked Resource",
"description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'",
"type": "object",
"properties": {
"tags": {
"type": "object",
Expand Down Expand Up @@ -77,7 +83,9 @@
]
},
"ProxyResource": {
"description": "The resource model definition for a ARM proxy resource. It will have everything other than required location and tags",
"title": "Proxy Resource",
"description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location",
"type": "object",
"allOf": [
{
"$ref": "#/definitions/Resource"
Expand All @@ -86,14 +94,15 @@
},
"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.",
"type": "object",
"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}"
"description": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
},
"name": {
"readOnly": true,
Expand All @@ -106,7 +115,7 @@
"x-ms-mutability": [
"read"
],
"description": "The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.."
"description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\""
},
"location": {
"type": "string",
Expand All @@ -123,7 +132,7 @@
"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."
"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",
Expand Down Expand Up @@ -177,6 +186,7 @@
},
"Sku": {
"description": "The resource model definition representing SKU",
"type": "object",
"properties": {
"name": {
"type": "string",
Expand Down Expand Up @@ -216,6 +226,7 @@
},
"Identity": {
"description": "Identity for the resource.",
"type": "object",
"properties": {
"principalId": {
"readOnly": true,
Expand All @@ -241,6 +252,7 @@
}
},
"Plan": {
"type": "object",
"properties": {
"name": {
"type": "string",
Expand Down Expand Up @@ -271,6 +283,9 @@
]
},
"ErrorResponse": {
"title": "Error Response",
"description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.)",
"type": "object",
"properties": {
"code": {
"readOnly": true,
Expand Down Expand Up @@ -303,10 +318,10 @@
},
"description": "The error additional info."
}
},
"description": "The resource management error response."
}
},
"ErrorAdditionalInfo": {
"type": "object",
"properties": {
"type": {
"readOnly": true,
Expand Down Expand Up @@ -338,6 +353,7 @@
},
"display": {
"description": "Localized display information for this particular operation.",
"type": "object",
"properties": {
"provider": {
"description": "The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\".",
Expand Down Expand Up @@ -391,6 +407,7 @@
},
"OperationListResult": {
"description": "A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.",
"type": "object",
"properties": {
"value": {
"type": "array",
Expand Down Expand Up @@ -482,7 +499,7 @@
"lastModifiedAt": {
"type": "string",
"format": "date-time",
"description": "The type of identity that last modified the resource."
"description": "The timestamp of resource last modification (UTC)"
}
}
},
Expand Down Expand Up @@ -516,7 +533,7 @@
"type": "string"
},
"identity": {
"description": "The client id of the identity which will be used to access key vault.",
"description": "The client ID of the identity which will be used to access key vault.",
"type": "string"
}
}
Expand Down Expand Up @@ -545,7 +562,6 @@
"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"
Expand Down
Loading

0 comments on commit a9c0e39

Please sign in to comment.