diff --git a/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/DeleteLink.json b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/DeleteLink.json new file mode 100644 index 000000000000..1665cb62d617 --- /dev/null +++ b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/DeleteLink.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2022-05-01", + "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/stable/2022-05-01/examples/GetConfigurations.json b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/GetConfigurations.json new file mode 100644 index 000000000000..b9ac679ce37e --- /dev/null +++ b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/GetConfigurations.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2022-05-01", + "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/stable/2022-05-01/examples/Link.json b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/Link.json new file mode 100644 index 000000000000..f6fc96a81031 --- /dev/null +++ b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/Link.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2022-05-01", + "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" + }, + "targetService": { + "type": "AzureResource", + "id": "/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/stable/2022-05-01/examples/LinkList.json b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/LinkList.json new file mode 100644 index 000000000000..b0156db7285b --- /dev/null +++ b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/LinkList.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2022-05-01", + "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" + }, + "targetService": { + "type": "AzureResource", + "id": "/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/stable/2022-05-01/examples/OperationsList.json b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/OperationsList.json new file mode 100644 index 000000000000..8f67473f5c42 --- /dev/null +++ b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/OperationsList.json @@ -0,0 +1,185 @@ +{ + "parameters": { + "api-version": "2022-05-01", + "resourceUri": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", + "linkerName": "linkName" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "display": { + "description": "Register the subscription for Microsoft.ServiceLinker", + "operation": "Register the Microsoft.ServiceLinker", + "provider": "Microsoft.ServiceLinker", + "resource": "Microsoft.ServiceLinker" + }, + "isDataAction": false, + "name": "Microsoft.ServiceLinker/register/action" + }, + { + "display": { + "description": "Unregister the subscription for Microsoft.ServiceLinker", + "operation": "Unregister the Microsoft.ServiceLinker", + "provider": "Microsoft.ServiceLinker", + "resource": "Microsoft.ServiceLinker" + }, + "isDataAction": false, + "name": "Microsoft.ServiceLinker/unregister/action" + }, + { + "display": { + "description": "read operations", + "operation": "read_operations", + "provider": "Microsoft.ServiceLinker", + "resource": "operations" + }, + "isDataAction": false, + "name": "Microsoft.ServiceLinker/operations/read" + }, + { + "display": { + "description": "list dryrun jobs", + "operation": "Dryrun_List", + "provider": "Microsoft.ServiceLinker", + "resource": "dryruns" + }, + "isDataAction": false, + "name": "Microsoft.ServiceLinker/dryruns/read" + }, + { + "display": { + "description": "get a dryrun job", + "operation": "Dryrun_Get", + "provider": "Microsoft.ServiceLinker", + "resource": "dryruns" + }, + "isDataAction": false, + "name": "Microsoft.ServiceLinker/dryruns/read" + }, + { + "display": { + "description": "create a dryrun job to do necessary check before actual creation", + "operation": "Dryrun_Create", + "provider": "Microsoft.ServiceLinker", + "resource": "dryruns" + }, + "isDataAction": false, + "name": "Microsoft.ServiceLinker/dryruns/write" + }, + { + "display": { + "description": "delete a dryrun job", + "operation": "Dryrun_Delete", + "provider": "Microsoft.ServiceLinker", + "resource": "dryruns" + }, + "isDataAction": false, + "name": "Microsoft.ServiceLinker/dryruns/delete" + }, + { + "display": { + "description": "add a dryrun job to do necessary check before actual creation", + "operation": "Dryrun_Update", + "provider": "Microsoft.ServiceLinker", + "resource": "dryruns" + }, + "isDataAction": false, + "name": "Microsoft.ServiceLinker/dryruns/write" + }, + { + "display": { + "description": "read operationStatuses", + "operation": "read_operationStatuses", + "provider": "Microsoft.ServiceLinker", + "resource": "locations/operationStatuses" + }, + "isDataAction": false, + "name": "Microsoft.ServiceLinker/locations/operationStatuses/read" + }, + { + "display": { + "description": "write operationStatuses", + "operation": "write_operationStatuses", + "provider": "Microsoft.ServiceLinker", + "resource": "locations/operationStatuses" + }, + "isDataAction": false, + "name": "Microsoft.ServiceLinker/locations/operationStatuses/write" + }, + { + "display": { + "description": "Returns list of Linkers which connects to the resource.", + "operation": "Linker_List", + "provider": "Microsoft.ServiceLinker", + "resource": "linkers" + }, + "isDataAction": false, + "name": "Microsoft.ServiceLinker/linkers/read" + }, + { + "display": { + "description": "Returns Linker resource for a given name.", + "operation": "Linker_Get", + "provider": "Microsoft.ServiceLinker", + "resource": "linkers" + }, + "isDataAction": false, + "name": "Microsoft.ServiceLinker/linkers/read" + }, + { + "display": { + "description": "Create or update linker resource.", + "operation": "Linker_CreateOrUpdate", + "provider": "Microsoft.ServiceLinker", + "resource": "linkers" + }, + "isDataAction": false, + "name": "Microsoft.ServiceLinker/linkers/write" + }, + { + "display": { + "description": "Delete a link.", + "operation": "Linker_Delete", + "provider": "Microsoft.ServiceLinker", + "resource": "linkers" + }, + "isDataAction": false, + "name": "Microsoft.ServiceLinker/linkers/delete" + }, + { + "display": { + "description": "Operation to update an existing link.", + "operation": "Linker_Update", + "provider": "Microsoft.ServiceLinker", + "resource": "linkers" + }, + "isDataAction": false, + "name": "Microsoft.ServiceLinker/linkers/write" + }, + { + "display": { + "description": "Validate a link.", + "operation": "Linker_Validate", + "provider": "Microsoft.ServiceLinker", + "resource": "linkers" + }, + "isDataAction": false, + "name": "Microsoft.ServiceLinker/linkers/validateLinker/action" + }, + { + "display": { + "description": "list source configurations for a linker.", + "operation": "Linker_ListConfigurations", + "provider": "Microsoft.ServiceLinker", + "resource": "linkers" + }, + "isDataAction": false, + "name": "Microsoft.ServiceLinker/linkers/listConfigurations/action" + } + ] + } + } + } +} diff --git a/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/PatchLink.json b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/PatchLink.json new file mode 100644 index 000000000000..eabeb61953cb --- /dev/null +++ b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/PatchLink.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2022-05-01", + "resourceUri": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", + "linkerName": "linkName", + "parameters": { + "properties": { + "targetService": { + "type": "AzureResource", + "id": "/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" + }, + "targetService": { + "type": "AzureResource", + "id": "/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" + }, + "targetService": { + "type": "AzureResource", + "id": "/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/stable/2022-05-01/examples/PutLink.json b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/PutLink.json new file mode 100644 index 000000000000..0cf5efec9cf7 --- /dev/null +++ b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/PutLink.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "api-version": "2022-05-01", + "resourceUri": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", + "linkerName": "linkName", + "parameters": { + "properties": { + "targetService": { + "type": "AzureResource", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DBforPostgreSQL/servers/test-pg/databases/test-db" + }, + "authInfo": { + "authType": "secret", + "name": "name", + "secretInfo": { + "secretType": "rawValue", + "value": "secret" + } + } + } + } + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.ServiceLinker/links", + "name": "linkName", + "properties": { + "authInfo": { + "authType": "secret", + "name": "name" + }, + "targetService": { + "type": "AzureResource", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DBforPostgreSQL/servers/test-pg/databases/test-db" + } + } + } + }, + "201": { + "body": { + "type": "Microsoft.ServiceLinker/links", + "name": "linkName", + "properties": { + "authInfo": { + "authType": "secret", + "name": "name" + }, + "targetService": { + "type": "AzureResource", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DBforPostgreSQL/servers/test-pg/databases/test-db" + } + } + } + } + } +} diff --git a/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/PutLinkWithSecretStore.json b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/PutLinkWithSecretStore.json new file mode 100644 index 000000000000..b3b37c417811 --- /dev/null +++ b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/PutLinkWithSecretStore.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2022-05-01", + "resourceUri": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", + "linkerName": "linkName", + "parameters": { + "properties": { + "targetService": { + "type": "AzureResource", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db" + }, + "authInfo": { + "authType": "secret" + }, + "secretStore": { + "keyVaultId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.KeyVault/vaults/test-kv" + } + } + } + }, + "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" + }, + "secretStore": { + "keyVaultId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.KeyVault/vaults/test-kv" + }, + "targetService": { + "type": "AzureResource", + "id": "/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" + }, + "secretStore": { + "keyVaultId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.KeyVault/vaults/test-kv" + }, + "targetService": { + "type": "AzureResource", + "id": "/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/stable/2022-05-01/examples/PutLinkWithServiceEndpoint.json b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/PutLinkWithServiceEndpoint.json new file mode 100644 index 000000000000..33b69d5fcb15 --- /dev/null +++ b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/PutLinkWithServiceEndpoint.json @@ -0,0 +1,68 @@ +{ + "parameters": { + "api-version": "2022-05-01", + "resourceUri": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", + "linkerName": "linkName", + "parameters": { + "properties": { + "targetService": { + "type": "AzureResource", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DBforPostgreSQL/servers/test-pg/databases/test-db" + }, + "authInfo": { + "authType": "secret", + "name": "name", + "secretInfo": { + "secretType": "keyVaultSecretUri", + "value": "https://vault-name.vault.azure.net/secrets/secret-name/00000000000000000000000000000000" + } + }, + "vNetSolution": { + "type": "serviceEndpoint" + } + } + } + }, + "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" + }, + "vNetSolution": { + "type": "serviceEndpoint" + }, + "targetService": { + "type": "AzureResource", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DBforPostgreSQL/servers/test-pg/databases/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" + }, + "vNetSolution": { + "type": "serviceEndpoint" + }, + "targetService": { + "type": "AzureResource", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DBforPostgreSQL/servers/test-pg/databases/test-db" + } + } + } + } + } +} diff --git a/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/ValidateLinkSuccess.json b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/ValidateLinkSuccess.json new file mode 100644 index 000000000000..066cb295ec0c --- /dev/null +++ b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/ValidateLinkSuccess.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2022-05-01", + "resourceUri": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", + "linkerName": "linkName" + }, + "responses": { + "200": { + "body": { + "linkerName": "linkName", + "isConnectionAvailable": true, + "reportStartTimeUtc": "2020-07-12T22:05:09Z", + "reportEndTimeUtc": "2020-07-12T22:06:09Z", + "sourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db", + "targetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db", + "authType": "secret", + "validationDetail": [ + { + "name": "TargetExistence", + "description": "The target existence is validated", + "result": "success" + }, + { + "name": "TargetNetworkAccess", + "description": "Deny public network access is set to yes. Please confirm you are using private endpoint connection to access target resource.", + "result": "warning" + } + ] + } + }, + "202": {} + } +} diff --git a/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/servicelinker.json b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/servicelinker.json new file mode 100644 index 000000000000..ae1f34a40bdb --- /dev/null +++ b/specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/servicelinker.json @@ -0,0 +1,995 @@ +{ + "swagger": "2.0", + "info": { + "title": "Microsoft.ServiceLinker", + "description": "Microsoft.ServiceLinker provider", + "version": "2022-05-01" + }, + "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" + }, + "PutLinkWithServiceEndpoint": { + "$ref": "./examples/PutLinkWithServiceEndpoint.json" + }, + "PutLinkWithSecretStore": { + "$ref": "./examples/PutLinkWithSecretStore.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" + } + }, + "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.", + "x-ms-examples": { + "GetConfiguration": { + "$ref": "./examples/OperationsList.json" + } + }, + "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": { + "TargetServiceType": { + "description": "The target service type.", + "type": "string", + "enum": [ + "AzureResource", + "ConfluentBootstrapServer", + "ConfluentSchemaRegistry" + ], + "x-ms-enum": { + "name": "type", + "modelAsString": true + } + }, + "TargetServiceBase": { + "description": "The target service properties", + "discriminator": "type", + "type": "object", + "properties": { + "type": { + "description": "The target service type.", + "$ref": "#/definitions/TargetServiceType" + } + }, + "required": [ + "type" + ] + }, + "AzureResourceType": { + "description": "The azure resource type.", + "type": "string", + "enum": [ + "KeyVault" + ], + "x-ms-enum": { + "name": "type", + "modelAsString": true + } + }, + "AzureResourcePropertiesBase": { + "description": "The azure resource properties", + "discriminator": "type", + "type": "object", + "properties": { + "type": { + "description": "The azure resource type.", + "$ref": "#/definitions/AzureResourceType" + } + }, + "required": [ + "type" + ] + }, + "AzureResource": { + "x-ms-discriminator-value": "AzureResource", + "type": "object", + "description": "The azure resource info when target service type is AzureResource", + "allOf": [ + { + "$ref": "#/definitions/TargetServiceBase" + } + ], + "properties": { + "id": { + "description": "The Id of azure resource.", + "type": "string" + }, + "resourceProperties": { + "description": "The azure resource connection related properties.", + "$ref": "#/definitions/AzureResourcePropertiesBase" + } + } + }, + "AzureKeyVaultProperties": { + "x-ms-discriminator-value": "KeyVault", + "type": "object", + "description": "The resource properties when type is Azure Key Vault", + "allOf": [ + { + "$ref": "#/definitions/AzureResourcePropertiesBase" + } + ], + "properties": { + "connectAsKubernetesCsiDriver": { + "description": "True if connect via Kubernetes CSI Driver.", + "type": "boolean" + } + } + }, + "ConfluentBootstrapServer": { + "x-ms-discriminator-value": "ConfluentBootstrapServer", + "type": "object", + "description": "The service properties when target service type is ConfluentBootstrapServer", + "allOf": [ + { + "$ref": "#/definitions/TargetServiceBase" + } + ], + "properties": { + "endpoint": { + "description": "The endpoint of service.", + "type": "string" + } + } + }, + "ConfluentSchemaRegistry": { + "x-ms-discriminator-value": "ConfluentSchemaRegistry", + "type": "object", + "description": "The service properties when target service type is ConfluentSchemaRegistry", + "allOf": [ + { + "$ref": "#/definitions/TargetServiceBase" + } + ], + "properties": { + "endpoint": { + "description": "The endpoint of service.", + "type": "string" + } + } + }, + "AuthType": { + "description": "The authentication type.", + "type": "string", + "enum": [ + "systemAssignedIdentity", + "userAssignedIdentity", + "servicePrincipalSecret", + "servicePrincipalCertificate", + "secret" + ], + "x-ms-enum": { + "name": "AuthType", + "modelAsString": true + } + }, + "SecretType": { + "description": "The secret type.", + "type": "string", + "enum": [ + "rawValue", + "keyVaultSecretUri", + "keyVaultSecretReference" + ], + "x-ms-enum": { + "name": "SecretType", + "modelAsString": true + } + }, + "SecretInfoBase": { + "description": "The secret info", + "discriminator": "secretType", + "type": "object", + "properties": { + "secretType": { + "description": "The secret type.", + "$ref": "#/definitions/SecretType" + } + }, + "required": [ + "secretType" + ] + }, + "ValueSecretInfo": { + "x-ms-discriminator-value": "rawValue", + "type": "object", + "description": "The secret info when type is rawValue. It's for scenarios that user input the secret.", + "allOf": [ + { + "$ref": "#/definitions/SecretInfoBase" + } + ], + "properties": { + "value": { + "description": "The actual value of the secret.", + "type": "string", + "x-ms-secret": true + } + } + }, + "KeyVaultSecretReferenceSecretInfo": { + "x-ms-discriminator-value": "keyVaultSecretReference", + "type": "object", + "description": "The secret info when type is keyVaultSecretReference. It's for scenario that user provides a secret stored in user's keyvault and source is Azure Kubernetes. The key Vault's resource id is linked to secretStore.keyVaultId.", + "allOf": [ + { + "$ref": "#/definitions/SecretInfoBase" + } + ], + "properties": { + "name": { + "description": "Name of the Key Vault secret.", + "type": "string" + }, + "version": { + "description": "Version of the Key Vault secret.", + "type": "string" + } + } + }, + "KeyVaultSecretUriSecretInfo": { + "x-ms-discriminator-value": "keyVaultSecretUri", + "type": "object", + "description": "The secret info when type is keyVaultSecretUri. It's for scenario that user provides a secret stored in user's keyvault and source is Web App, Spring Cloud or Container App.", + "allOf": [ + { + "$ref": "#/definitions/SecretInfoBase" + } + ], + "properties": { + "value": { + "description": "URI to the keyvault secret", + "type": "string" + } + } + }, + "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" + }, + "secretInfo": { + "description": "Password or key vault secret for secret auth.", + "$ref": "#/definitions/SecretInfoBase" + } + } + }, + "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" + } + } + }, + "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", + "x-ms-secret": true + } + }, + "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", + "x-ms-secret": true + } + }, + "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": { + "targetService": { + "$ref": "#/definitions/TargetServiceBase", + "description": "The target service properties" + }, + "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. " + }, + "vNetSolution": { + "description": "The VNet solution.", + "$ref": "#/definitions/VNetSolution" + }, + "secretStore": { + "description": "An option to store secret value in secure place", + "$ref": "#/definitions/SecretStore" + }, + "scope": { + "type": "string", + "description": "connection scope in source service." + } + } + }, + "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" + }, + "x-ms-identifiers": [ + "name" + ] + } + } + }, + "ValidateResult": { + "description": "The validation result for a linker.", + "type": "object", + "properties": { + "linkerName": { + "description": "The linker name.", + "type": "string" + }, + "isConnectionAvailable": { + "description": "A boolean value indicating whether the connection is available or not", + "type": "boolean" + }, + "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." + }, + "sourceId": { + "description": "The resource id of the linker source application.", + "type": "string" + }, + "targetId": { + "description": "The resource Id of target service.", + "type": "string" + }, + "authType": { + "description": "The authentication type.", + "$ref": "#/definitions/AuthType" + }, + "validationDetail": { + "description": "The detail of validation result", + "type": "array", + "items": { + "$ref": "#/definitions/ValidationResultItem" + }, + "x-ms-identifiers": [ + "name" + ] + } + } + }, + "ValidationResultItem": { + "description": "The validation item for a linker.", + "type": "object", + "properties": { + "name": { + "description": "The validation item name.", + "type": "string" + }, + "description": { + "description": "The display name of validation item", + "type": "string" + }, + "result": { + "description": "The result of validation", + "type": "string", + "enum": [ + "success", + "failed", + "warning" + ], + "x-ms-enum": { + "name": "validationItemResult", + "modelAsString": true + } + }, + "errorMessage": { + "description": "The error message of validation result", + "type": "string" + }, + "errorCode": { + "description": "The error code of validation result", + "type": "string" + } + } + }, + "VNetSolution": { + "type": "object", + "description": "The VNet solution for linker", + "properties": { + "type": { + "description": "Type of VNet solution.", + "type": "string", + "enum": [ + "serviceEndpoint", + "privateLink" + ], + "x-ms-enum": { + "name": "vNetSolutionType", + "modelAsString": true + } + } + } + }, + "SecretStore": { + "type": "object", + "description": "An option to store secret value in secure place", + "properties": { + "keyVaultId": { + "type": "string", + "description": "The key vault id to store secret" + } + } + } + }, + "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.md b/specification/servicelinker/resource-manager/readme.md index 32e0c3f8cdce..740d2f4e780b 100644 --- a/specification/servicelinker/resource-manager/readme.md +++ b/specification/servicelinker/resource-manager/readme.md @@ -27,7 +27,7 @@ These are the global settings for the servicelinker. ```yaml openapi-type: arm openapi-subtype : rpaas -tag: package-2022-01-01-preview +tag: package-2022-05-01 ``` ### Tag: package-2021-11-01-preview @@ -48,6 +48,15 @@ input-file: - Microsoft.ServiceLinker/preview/2022-01-01-preview/servicelinker.json ``` +### Tag: package-2022-05-01 + +These settings apply only when `--tag=package-2022-05-01` is specified on the command line. + +```yaml $(tag) == 'package-2022-05-01' +input-file: + - Microsoft.ServiceLinker/stable/2022-05-01/servicelinker.json +``` + ## Suppression ``` yaml