Skip to content

Commit

Permalink
Creating a new API version (#4492)
Browse files Browse the repository at this point in the history
* Create Environment.json

* Replicate existing code

* Replicate existing api

* Commin New ServiceCientIdentity APIs

* Update to Async API

* Update Async examples

* Fix readme warning

* Update DeleteDstsServiceClientIdentity.json

* Update DeleteDstsServiceClientIdentity.json

* Update required

* fix prettier issue

Co-authored-by: Zhenglai Zhang <zhenglaizhang@hotmail.com>
  • Loading branch information
Shwas and zhenglaizhang authored Aug 20, 2021
1 parent bed1d2d commit d937145
Show file tree
Hide file tree
Showing 17 changed files with 1,645 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,389 @@
{
"swagger": "2.0",
"info": {
"title": "Foundational ARM Client",
"description": "DstsServiceAccount Provider",
"version": "2021-08-10-privatepreview"
},
"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": {
"/subscriptions/{subscriptionId}/providers/Microsoft.AzureCIS/dstsServiceAccounts": {
"get": {
"description": "Lists all the DstsServiceAccounts in a subscription.",
"x-ms-examples": {
"Get DstsServiceAccounts in a subscription": {
"$ref": "./examples/GetAllDstsServiceAccount.json"
}
},
"operationId": "DstsServiceAccount_listSubscriptionLevel",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "List of DstsServiceAccounts.",
"schema": {
"$ref": "#/definitions/DstsServiceAccountModelArray"
}
},
"default": {
"description": "Error response describing the reason for operation failure.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureCIS/dstsServiceAccounts": {
"get": {
"description": "Lists all the DstsServiceAccounts in a ResourceGroup.",
"x-ms-examples": {
"Get DstsServiceAccounts in a ResourceGroup": {
"$ref": "./examples/GetDstsServiceAccountUnderResourceGroup.json"
}
},
"operationId": "DstsServiceAccounts_listResourceGroupLevel",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
}
],
"responses": {
"200": {
"description": "List of DstsServiceAccounts.",
"schema": {
"$ref": "#/definitions/DstsServiceAccountModelArray"
}
},
"default": {
"description": "Error response describing the reason for operation failure.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureCIS/dstsServiceAccounts/{resourceName}": {
"put": {
"description": "Create or update DstsServiceAccount.",
"x-ms-examples": {
"Create or update a DstsServiceAccount": {
"$ref": "./examples/CreateDstsServiceAccount.json"
}
},
"operationId": "DstsServiceAccount_CreateUpdate",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ResourceNameParameter"
},
{
"name": "DstsServiceAccount",
"description": "DstsServiceAccount details.",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/DstsServiceAccountModel"
}
}
],
"responses": {
"201": {
"description": "DstsServiceAccount Resource created successfully.",
"schema": {
"$ref": "#/definitions/DstsServiceAccountModel"
}
},
"200": {
"description": "DstsServiceAccount Resource updated successfully.",
"schema": {
"$ref": "#/definitions/DstsServiceAccountModel"
}
},
"default": {
"description": "Error response describing the reason for operation failure.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
}
},
"patch": {
"description": "Patch DstsServiceAccount.",
"x-ms-examples": {
"Patch DstsServiceAccount": {
"$ref": "./examples/PatchDstsServiceAccount.json"
}
},
"operationId": "DstsServiceAccount_patch",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ResourceNameParameter"
},
{
"name": "DstsServiceAccount",
"description": "DstsServiceAccount details.",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/DstsServiceAccountModel"
}
}
],
"responses": {
"200": {
"description": "Patch request has been accepted, DstsServiceAccount is already in the required state.",
"schema": {
"$ref": "#/definitions/DstsServiceAccountModel"
}
},
"202": {
"description": "Patch request has been accepted",
"headers": {
"Location": {
"description": "URL to query for status of the operation.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing the reason for operation failure.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
}
},
"get": {
"description": "Returns a DstsServiceAccount info",
"x-ms-examples": {
"Get DstsServiceAccount": {
"$ref": "./examples/GetDstsServiceAccount.json"
}
},
"operationId": "DstsServiceAccountInfo_Get",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ResourceNameParameter"
}
],
"responses": {
"200": {
"description": "DstsServiceAccount info.",
"schema": {
"$ref": "#/definitions/DstsServiceAccountModel"
}
},
"default": {
"description": "Error response describing the reason for operation failure.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
}
},
"delete": {
"description": "Delete DstsServiceAccount",
"x-ms-examples": {
"Delete a DstsServiceAccount": {
"$ref": "./examples/DeleteDstsServiceAccount.json"
}
},
"operationId": "DstsServiceAccount_Delete",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ResourceNameParameter"
}
],
"responses": {
"200": {
"description": "DstsServiceAccount was deleted successfully."
},
"202": {
"description": "Delete DstsServiceAccount request has been accepted.",
"headers": {
"Location": {
"description": "URL to query for status of the operation.",
"type": "string"
}
}
},
"204": {
"description": "DstsServiceAccount does not exist."
},
"default": {
"description": "Error response describing the reason for operation failure.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {
"DstsServiceAccountResource": {
"required": [
"GroupName",
"AccountName"
],
"type": "object",
"description": "DstsServiceAccount properties",
"properties": {
"GroupName": {
"type": "string",
"description": "Name of the ServiceAccountGroup in Dscm to which the ServiceAccount belongs. Example: ProductionGroup"
},
"AccountName": {
"type": "string",
"description": "Name of the ServiceAccount, to be specified optionally if the ServiceAccountGroup does not specify a naming pattern for its member ServiceAccounts. Example: prod-useast.azcis.trafficmanager.net"
},
"DstsInstance": {
"type": "string",
"description": "Dsts instance on which the ServiceAccount should be created. If not specified, the ServiceAccount is created on the regional dsts instance corresponding to the resource location. Example: useast-dsts.dsts.core.windows.net"
}
}
},
"DstsServiceAccountModel": {
"type": "object",
"description": "DstsServiceAccount Response",
"properties": {
"provisioningState": {
"$ref": "#/definitions/ProvisioningState",
"description": "The provisioning State of the resource."
},
"properties": {
"$ref": "#/definitions/DstsServiceAccountResource",
"description": "DstsServiceAccountResource detail"
}
},
"allOf": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/TrackedResource"
}
]
},
"ProvisioningState": {
"description": "Provisioning status of the resource.",
"readOnly": true,
"enum": [
"Failed",
"Succeeded",
"Canceled",
"Accepted"
],
"type": "string",
"x-ms-enum": {
"name": "ProvisioningState",
"modelAsString": true
}
},
"DstsServiceAccountModelArray": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/DstsServiceAccountModel"
},
"description": "An array of Dsts ServiceAccount resources"
},
"nextLink": {
"type": "string",
"description": "The URL to use for getting the next set of results."
}
},
"description": "List of DstsServiceAccount"
}
},
"parameters": {
"ResourceNameParameter": {
"name": "resourceName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of resource.",
"x-ms-parameter-location": "method"
}
}
}
Loading

0 comments on commit d937145

Please sign in to comment.