diff --git a/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2021-11-01-preview/examples/DeleteLink.json b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2021-11-01-preview/examples/DeleteLink.json new file mode 100644 index 000000000000..6b21d0057800 --- /dev/null +++ b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2021-11-01-preview/examples/DeleteLink.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2021-11-01-preview", + "resourceUri": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", + "linkerName": "linkName" + }, + "responses": { + "200": {}, + "204": {}, + "202": {} + } +} diff --git a/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2021-11-01-preview/examples/GetConfigurations.json b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2021-11-01-preview/examples/GetConfigurations.json new file mode 100644 index 000000000000..62c29f26445d --- /dev/null +++ b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2021-11-01-preview/examples/GetConfigurations.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2021-11-01-preview", + "resourceUri": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", + "linkerName": "linkName" + }, + "responses": { + "200": { + "body": { + "configurations": [ + { + "name": "ASL_DocumentDb_ConnectionString", + "value": "ConnectionString" + } + ] + } + } + } +} diff --git a/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2021-11-01-preview/examples/Link.json b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2021-11-01-preview/examples/Link.json new file mode 100644 index 000000000000..b55e103113f9 --- /dev/null +++ b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2021-11-01-preview/examples/Link.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2021-11-01-preview", + "resourceUri": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", + "linkerName": "linkName" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app/providers/Microsoft.ServiceLinker/links/linkName", + "name": "linkName", + "type": "Microsoft.ServiceLinker/links", + "properties": { + "authInfo": { + "authType": "secret", + "name": "name" + }, + "targetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db" + }, + "systemData": { + "createdAt": "2020-07-12T22:05:09Z" + } + } + } + } +} diff --git a/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2021-11-01-preview/examples/LinkList.json b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2021-11-01-preview/examples/LinkList.json new file mode 100644 index 000000000000..4c38ca7a8c3c --- /dev/null +++ b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2021-11-01-preview/examples/LinkList.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2021-11-01-preview", + "resourceUri": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.ServiceLinker/links/linkName", + "name": "linkName", + "type": "Microsoft.ServiceLinker/links", + "properties": { + "authInfo": { + "authType": "secret", + "name": "username" + }, + "targetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db" + }, + "systemData": { + "createdAt": "2020-07-12T22:05:09Z" + } + } + ] + } + } + } +} diff --git a/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2021-11-01-preview/examples/PatchLink.json b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2021-11-01-preview/examples/PatchLink.json new file mode 100644 index 000000000000..500fe59e7232 --- /dev/null +++ b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2021-11-01-preview/examples/PatchLink.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "api-version": "2021-11-01-preview", + "resourceUri": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", + "linkerName": "linkName", + "parameters": { + "properties": { + "targetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db", + "authInfo": { + "authType": "servicePrincipalSecret", + "clientId": "name", + "principalId": "id", + "secret": "secret" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app/providers/Microsoft.ServiceLinker/links/linkName", + "type": "Microsoft.ServiceLinker/links", + "name": "linkName", + "properties": { + "authInfo": { + "authType": "servicePrincipalSecret", + "clientId": "name", + "principalId": "id", + "secret": "secret" + }, + "targetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app/providers/Microsoft.ServiceLinker/links/linkName", + "type": "Microsoft.ServiceLinker/links", + "name": "linkName", + "properties": { + "authInfo": { + "authType": "servicePrincipalSecret", + "clientId": "name", + "principalId": "id", + "secret": "secret" + }, + "targetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db" + } + } + } + } +} diff --git a/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2021-11-01-preview/examples/PutLink.json b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2021-11-01-preview/examples/PutLink.json new file mode 100644 index 000000000000..030563c3edb7 --- /dev/null +++ b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2021-11-01-preview/examples/PutLink.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2021-11-01-preview", + "resourceUri": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", + "linkerName": "linkName", + "parameters": { + "properties": { + "targetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db", + "authInfo": { + "authType": "secret", + "name": "name", + "secret": "secret" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app/providers/Microsoft.ServiceLinker/links/linkName", + "type": "Microsoft.ServiceLinker/links", + "name": "linkName", + "properties": { + "authInfo": { + "authType": "secret", + "name": "name" + }, + "targetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app/providers/Microsoft.ServiceLinker/links/linkName", + "type": "Microsoft.ServiceLinker/links", + "name": "linkName", + "properties": { + "authInfo": { + "authType": "secret", + "name": "name" + }, + "targetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db" + } + } + } + } +} diff --git a/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2021-11-01-preview/examples/ValidateLinkFailure.json b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2021-11-01-preview/examples/ValidateLinkFailure.json new file mode 100644 index 000000000000..49b3d28eda97 --- /dev/null +++ b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2021-11-01-preview/examples/ValidateLinkFailure.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2021-11-01-preview", + "resourceUri": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", + "linkerName": "linkName" + }, + "responses": { + "200": { + "body": { + "name": "linkName", + "linkerStatus": "Not healthy", + "reason": "Error reason and trouble shooting message.", + "reportStartTimeUtc": "2020-07-12T22:05:09Z", + "reportEndTimeUtc": "2020-07-12T22:06:09Z", + "targetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db", + "authType": "secret" + } + }, + "202": {} + } +} diff --git a/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2021-11-01-preview/examples/ValidateLinkSuccess.json b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2021-11-01-preview/examples/ValidateLinkSuccess.json new file mode 100644 index 000000000000..dcd7b2430474 --- /dev/null +++ b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2021-11-01-preview/examples/ValidateLinkSuccess.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2021-11-01-preview", + "resourceUri": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", + "linkerName": "linkName" + }, + "responses": { + "200": { + "body": { + "name": "linkName", + "linkerStatus": "Healthy", + "reportStartTimeUtc": "2020-07-12T22:05:09Z", + "reportEndTimeUtc": "2020-07-12T22:06:09Z", + "targetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db", + "authType": "secret" + } + }, + "202": {} + } +} diff --git a/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2021-11-01-preview/servicelinker.json b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2021-11-01-preview/servicelinker.json new file mode 100644 index 000000000000..4c3610906e10 --- /dev/null +++ b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2021-11-01-preview/servicelinker.json @@ -0,0 +1,710 @@ +{ + "swagger": "2.0", + "info": { + "title": "Microsoft.ServiceLinker", + "description": "Microsoft.ServiceLinker provider", + "version": "2021-11-01-preview" + }, + "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": { + "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers": { + "get": { + "deprecated": false, + "description": "Returns list of Linkers which connects to the resource.", + "operationId": "Linker_List", + "x-ms-examples": { + "LinkList": { + "$ref": "./examples/LinkList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ResourceUriParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "linker details.", + "schema": { + "$ref": "#/definitions/LinkerList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}": { + "get": { + "description": "Returns Linker resource for a given name.", + "operationId": "Linker_Get", + "x-ms-examples": { + "Link": { + "$ref": "./examples/Link.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ResourceUriParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/LinkerNameParameter" + } + ], + "responses": { + "200": { + "description": "Linker details.", + "schema": { + "$ref": "#/definitions/LinkerResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "description": "Create or update linker resource.", + "operationId": "Linker_CreateOrUpdate", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "PutLink": { + "$ref": "./examples/PutLink.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ResourceUriParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/LinkerNameParameter" + }, + { + "name": "parameters", + "description": "Linker details.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/LinkerResource" + } + } + ], + "responses": { + "200": { + "description": "Successful.", + "schema": { + "$ref": "#/definitions/LinkerResource" + } + }, + "201": { + "description": "Long running operation.", + "schema": { + "$ref": "#/definitions/LinkerResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Links" + ], + "operationId": "Linker_Delete", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "description": "Delete a link.", + "x-ms-examples": { + "DeleteLink": { + "$ref": "./examples/DeleteLink.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ResourceUriParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/LinkerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The link is deleted." + }, + "204": { + "description": "Deleted. The link is not found." + }, + "202": { + "description": "Long running operation." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + }, + "patch": { + "tags": [ + "Links" + ], + "operationId": "Linker_Update", + "description": "Operation to update an existing link.", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "PatchLink": { + "$ref": "./examples/PatchLink.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ResourceUriParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/LinkerNameParameter" + }, + { + "name": "parameters", + "description": "Linker details.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/LinkerPatch" + } + } + ], + "responses": { + "200": { + "description": "Success. The response describes a link.", + "schema": { + "$ref": "#/definitions/LinkerResource" + } + }, + "201": { + "description": "Long running operation.", + "schema": { + "$ref": "#/definitions/LinkerResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}/validateLinker": { + "post": { + "tags": [ + "Links" + ], + "operationId": "Linker_Validate", + "description": "Validate a link.", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "ValidateLinkSuccess": { + "$ref": "./examples/ValidateLinkSuccess.json" + }, + "ValidateLinkFailure": { + "$ref": "./examples/ValidateLinkFailure.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ResourceUriParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/LinkerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ValidateResult" + } + }, + "202": { + "description": "Accepted - Returns this status until the asynchronous operation has completed." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}/listConfigurations": { + "post": { + "tags": [ + "Links" + ], + "operationId": "Linker_ListConfigurations", + "description": "list source configurations for a linker.", + "x-ms-examples": { + "GetConfiguration": { + "$ref": "./examples/GetConfigurations.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ResourceUriParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/LinkerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/SourceConfigurationResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.ServiceLinker/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "description": "Lists the available ServiceLinker REST API operations.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "AuthType": { + "description": "The authentication type.", + "type": "string", + "enum": [ + "systemAssignedIdentity", + "userAssignedIdentity", + "servicePrincipalSecret", + "servicePrincipalCertificate", + "secret" + ], + "x-ms-enum": { + "name": "AuthType", + "modelAsString": true + } + }, + "AuthInfoBase": { + "description": "The authentication info", + "discriminator": "authType", + "type": "object", + "properties": { + "authType": { + "description": "The authentication type.", + "$ref": "#/definitions/AuthType" + } + }, + "required": [ + "authType" + ] + }, + "SecretAuthInfo": { + "x-ms-discriminator-value": "secret", + "type": "object", + "description": "The authentication info when authType is secret", + "allOf": [ + { + "$ref": "#/definitions/AuthInfoBase" + } + ], + "properties": { + "name": { + "description": "Username or account name for secret auth.", + "type": "string" + }, + "secret": { + "description": "Password or account key for secret auth.", + "type": "string", + "x-ms-secret": true + } + } + }, + "UserAssignedIdentityAuthInfo": { + "x-ms-discriminator-value": "userAssignedIdentity", + "type": "object", + "description": "The authentication info when authType is userAssignedIdentity", + "allOf": [ + { + "$ref": "#/definitions/AuthInfoBase" + } + ], + "properties": { + "clientId": { + "description": "Client Id for userAssignedIdentity.", + "type": "string" + }, + "subscriptionId": { + "description": "Subscription id for userAssignedIdentity.", + "type": "string" + } + }, + "required": [ + "clientId", + "subscriptionId" + ] + }, + "SystemAssignedIdentityAuthInfo": { + "x-ms-discriminator-value": "systemAssignedIdentity", + "type": "object", + "description": "The authentication info when authType is systemAssignedIdentity", + "allOf": [ + { + "$ref": "#/definitions/AuthInfoBase" + } + ] + }, + "ServicePrincipalSecretAuthInfo": { + "x-ms-discriminator-value": "servicePrincipalSecret", + "type": "object", + "description": "The authentication info when authType is servicePrincipal secret", + "allOf": [ + { + "$ref": "#/definitions/AuthInfoBase" + } + ], + "properties": { + "clientId": { + "description": "ServicePrincipal application clientId for servicePrincipal auth.", + "type": "string" + }, + "principalId": { + "description": "Principal Id for servicePrincipal auth.", + "type": "string" + }, + "secret": { + "description": "Secret for servicePrincipal auth.", + "type": "string" + } + }, + "required": [ + "clientId", + "principalId", + "secret" + ] + }, + "ServicePrincipalCertificateAuthInfo": { + "x-ms-discriminator-value": "servicePrincipalCertificate", + "type": "object", + "description": "The authentication info when authType is servicePrincipal certificate", + "allOf": [ + { + "$ref": "#/definitions/AuthInfoBase" + } + ], + "properties": { + "clientId": { + "description": "Application clientId for servicePrincipal auth.", + "type": "string" + }, + "principalId": { + "description": "Principal Id for servicePrincipal auth.", + "type": "string" + }, + "certificate": { + "description": "ServicePrincipal certificate for servicePrincipal auth.", + "type": "string" + } + }, + "required": [ + "clientId", + "principalId", + "certificate" + ] + }, + "LinkerResource": { + "type": "object", + "description": "Linker of source and target resource", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource", + "description": "The resource model definition for an Azure Resource Manager proxy resource." + } + ], + "required": [ + "properties" + ], + "properties": { + "properties": { + "description": "The properties of the linker.", + "$ref": "#/definitions/LinkerProperties", + "x-ms-client-flatten": true + }, + "systemData": { + "readOnly": true, + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", + "description": "The system data." + } + } + }, + "LinkerPatch": { + "description": "A linker to be updated.", + "type": "object", + "properties": { + "properties": { + "description": "Linker properties", + "type": "object", + "x-ms-client-flatten": true, + "$ref": "#/definitions/LinkerProperties" + } + } + }, + "LinkerList": { + "description": "The list of Linker.", + "type": "object", + "properties": { + "nextLink": { + "description": "The link used to get the next page of Linker list.", + "type": "string" + }, + "value": { + "description": "The list of Linkers.", + "type": "array", + "items": { + "$ref": "#/definitions/LinkerResource" + } + } + } + }, + "LinkerProperties": { + "description": "The properties of the linker.", + "type": "object", + "properties": { + "targetId": { + "description": "The resource Id of target service.", + "type": "string" + }, + "authInfo": { + "description": "The authentication type.", + "$ref": "#/definitions/AuthInfoBase" + }, + "clientType": { + "description": "The application client type", + "type": "string", + "enum": [ + "none", + "dotnet", + "java", + "python", + "go", + "php", + "ruby", + "django", + "nodejs", + "springBoot" + ], + "x-ms-enum": { + "name": "clientType", + "modelAsString": true + } + }, + "provisioningState": { + "readOnly": true, + "type": "string", + "description": "The provisioning state. " + } + } + }, + "SourceConfiguration": { + "description": "A configuration item for source resource", + "type": "object", + "properties": { + "name": { + "description": "The name of setting.", + "type": "string" + }, + "value": { + "description": "The value of setting", + "type": "string" + } + } + }, + "SourceConfigurationResult": { + "description": "Configurations for source resource, include appSettings, connectionString and serviceBindings", + "type": "object", + "properties": { + "configurations": { + "description": "The configuration properties for source resource.", + "type": "array", + "items": { + "$ref": "#/definitions/SourceConfiguration" + } + } + } + }, + "ValidateResult": { + "description": "The validation result for a linker.", + "type": "object", + "properties": { + "name": { + "description": "The linker name.", + "type": "string" + }, + "linkerStatus": { + "description": "Specifies if the linker is healthy.", + "type": "string", + "enum": [ + "Healthy", + "Not healthy" + ], + "x-ms-enum": { + "name": "linkerStatus", + "modelAsString": true + } + }, + "reason": { + "description": "The reason of the error.", + "type": "string" + }, + "reportStartTimeUtc": { + "type": "string", + "format": "date-time", + "description": "The start time of the validation report." + }, + "reportEndTimeUtc": { + "type": "string", + "format": "date-time", + "description": "The end time of the validation report." + }, + "targetId": { + "description": "The resource Id of target service.", + "type": "string" + }, + "authType": { + "description": "The authentication type.", + "$ref": "#/definitions/AuthType" + } + } + } + }, + "parameters": { + "LinkerNameParameter": { + "name": "linkerName", + "in": "path", + "required": true, + "type": "string", + "description": "The name Linker resource.", + "x-ms-parameter-location": "method" + }, + "ResourceUriParameter": { + "name": "resourceUri", + "in": "path", + "required": true, + "type": "string", + "description": "The fully qualified Azure Resource manager identifier of the resource to be connected.", + "x-ms-skip-url-encoding": true, + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/servicelinker/resource-manager/readme.csharp.md b/specification/servicelinker/resource-manager/readme.csharp.md new file mode 100644 index 000000000000..cec7ea43ab74 --- /dev/null +++ b/specification/servicelinker/resource-manager/readme.csharp.md @@ -0,0 +1,15 @@ +## C + +These settings apply only when `--csharp` is specified on the command line. +Please also specify `--csharp-sdks-folder=`. + +```yaml $(csharp) +csharp: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + payload-flattening-threshold: 1 + clear-output-folder: true + client-side-validation: false + namespace: Microsoft.ServiceLinker + output-folder: $(csharp-sdks-folder)/servicelinker/management/Microsoft.ServiceLinker/GeneratedProtocol +``` diff --git a/specification/servicelinker/resource-manager/readme.go.md b/specification/servicelinker/resource-manager/readme.go.md new file mode 100644 index 000000000000..847676ae49be --- /dev/null +++ b/specification/servicelinker/resource-manager/readme.go.md @@ -0,0 +1,26 @@ +## Go + +These settings apply only when `--go` is specified on the command line. + +```yaml $(go) +go: + license-header: MICROSOFT_APACHE_NO_VERSION + clear-output-folder: true +``` + +### Go multi-api + +``` yaml $(go) && $(multiapi) +batch: + - tag: package-2021-11-01-preview +``` + +### Tag: package-2021-11-01-preview and go + +These settings apply only when `--tag=package-2021-11-01-preview --go` is specified on the command line. +Please also specify `--go-sdks-folder=`. + +```yaml $(tag) == 'package-2021-11-01-preview' && $(go) +namespace: servicelinker +output-folder: $(go-sdk-folder)/services/preview/$(namespace)/mgmt/2021-11-01-preview/$(namespace) +``` diff --git a/specification/servicelinker/resource-manager/readme.md b/specification/servicelinker/resource-manager/readme.md new file mode 100644 index 000000000000..9d743f391295 --- /dev/null +++ b/specification/servicelinker/resource-manager/readme.md @@ -0,0 +1,89 @@ +# servicelinker + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for servicelinker. + +## Getting Started + +To build the SDKs for My API, simply install AutoRest via `npm` (`npm install -g autorest`) and then run: + +> `autorest readme.md` + +To see additional help and options, run: + +> `autorest --help` + +For other options on installation see [Installing AutoRest](https://aka.ms/autorest/install) on the AutoRest github page. + +--- + +## Configuration + +### Basic Information + +These are the global settings for the servicelinker. + +```yaml +openapi-type: arm +openapi-subtype : rpaas +tag: package-2021-11-01-preview +``` + +### Tag: package-2021-11-01-preview + +These settings apply only when `--tag=package-2021-11-01-preview` is specified on the command line. + +```yaml $(tag) == 'package-2021-11-01-preview' +input-file: + - Microsoft.ServiceLinker/preview/2021-11-01-preview/servicelinker.json +``` + +## Suppression + +``` yaml +directive: + - suppress: TopLevelResourcesListBySubscription + from: servicelinker.json + where: $.definitions.LinkerResource + reason: This is an extension resource +``` + +--- +# Code Generation + +## Swagger to SDK + +This section describes what SDK should be generated by the automatic system. +This is not used by Autorest itself. + +```yaml $(swagger-to-sdk) +swagger-to-sdk: + - repo: azure-sdk-for-python-track2 + - repo: azure-sdk-for-java + - repo: azure-sdk-for-go + - repo: azure-sdk-for-js + - repo: azure-sdk-for-ruby + after_scripts: + - bundle install && rake arm:regen_all_profiles['azure_mgmt_servicelinker'] +``` + +## Go + +See configuration in [readme.go.md](./readme.go.md) + +## Python + +See configuration in [readme.python.md](./readme.python.md) + +## Ruby + +See configuration in [readme.ruby.md](./readme.ruby.md) + +## TypeScript + +See configuration in [readme.typescript.md](./readme.typescript.md) + +## CSharp + +See configuration in [readme.csharp.md](./readme.csharp.md) diff --git a/specification/servicelinker/resource-manager/readme.python.md b/specification/servicelinker/resource-manager/readme.python.md new file mode 100644 index 000000000000..3302a43185d0 --- /dev/null +++ b/specification/servicelinker/resource-manager/readme.python.md @@ -0,0 +1,23 @@ +## Python + +These settings apply only when `--python` is specified on the command line. +Please also specify `--python-sdks-folder=`. + +``` yaml $(track2) +azure-arm: true +license-header: MICROSOFT_MIT_NO_VERSION +package-name: azure-mgmt-servicelinker +no-namespace-folders: true +package-version: 1.0.0b1 +clear-output-folder: true +``` + +``` yaml $(python-mode) == 'update' && $(track2) +no-namespace-folders: true +output-folder: $(python-sdks-folder)/servicelinker/azure-mgmt-servicelinker/azure/mgmt/servicelinker +``` + +``` yaml $(python-mode) == 'create' && $(track2) +basic-setup-py: true +output-folder: $(python-sdks-folder)/servicelinker/azure-mgmt-servicelinker +``` diff --git a/specification/servicelinker/resource-manager/readme.ruby.md b/specification/servicelinker/resource-manager/readme.ruby.md new file mode 100644 index 000000000000..5b63b49b5cfb --- /dev/null +++ b/specification/servicelinker/resource-manager/readme.ruby.md @@ -0,0 +1,19 @@ +## Ruby + +These settings apply only when `--ruby` is specified on the command line. + +```yaml +package-name: azure_mgmt_servicelinker +package-version: 2021-11-01-preview +azure-arm: true +``` + +### Tag: package-2021-11-01-preview and ruby + +These settings apply only when `--tag=package-2021-11-01-preview --ruby` is specified on the command line. +Please also specify `--ruby-sdks-folder=`. + +```yaml $(tag) == 'package-2021-11-01-preview' && $(ruby) +namespace: Microsoft.ServiceLinker +output-folder: $(ruby-sdks-folder)/servicelinker +``` diff --git a/specification/servicelinker/resource-manager/readme.typescript.md b/specification/servicelinker/resource-manager/readme.typescript.md new file mode 100644 index 000000000000..cf94d368f056 --- /dev/null +++ b/specification/servicelinker/resource-manager/readme.typescript.md @@ -0,0 +1,14 @@ +## TypeScript + +These settings apply only when `--typescript` is specified on the command line. +Please also specify `--typescript-sdks-folder=`. + +```yaml $(typescript) +typescript: + azure-arm: true + package-name: "@azure/arm-servicelinker" + output-folder: "$(typescript-sdks-folder)/sdk/servicelinker/arm-servicelinker" + payload-flattening-threshold: 1 + clear-output-folder: true + generate-metadata: true +```