diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/apimnamedvalues.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/apimnamedvalues.json index f591d8e0a408..f2963834eab4 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/apimnamedvalues.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/apimnamedvalues.json @@ -152,6 +152,9 @@ "x-ms-examples": { "ApiManagementGetNamedValue": { "$ref": "./examples/ApiManagementGetNamedValue.json" + }, + "ApiManagementGetNamedValueWithKeyVault": { + "$ref": "./examples/ApiManagementGetNamedValueWithKeyVault.json" } }, "parameters": [ @@ -201,6 +204,9 @@ "x-ms-examples": { "ApiManagementCreateNamedValue": { "$ref": "./examples/ApiManagementCreateNamedValue.json" + }, + "ApiManagementCreateNamedValueWithKeyVault": { + "$ref": "./examples/ApiManagementCreateNamedValueWithKeyVault.json" } }, "parameters": [ diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/definitions.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/definitions.json index d1cb1753ca05..3c1de3016855 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/definitions.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/definitions.json @@ -2677,6 +2677,51 @@ ], "description": "Issue contract Update Properties." }, + "KeyVaultContractCreateProperties": { + "properties": { + "secretIdentifier": { + "type": "string", + "description": "Key vault secret identifier for fetching secret." + }, + "identityClientId": { + "type": "string", + "description": "SystemAssignedIdentity or UserAssignedIdentity Client Id which will be used to access key vault secret." + } + }, + "description": "Create keyVault contract details." + }, + "KeyVaultContractProperties": { + "properties": { + "lastStatus": { + "$ref": "#/definitions/KeyVaultLastAccessStatusContractProperties", + "description": "Last time sync and refresh status of secret from key vault." + } + }, + "allOf": [ + { + "$ref": "#/definitions/KeyVaultContractCreateProperties" + } + ], + "description": "KeyVault contract details." + }, + "KeyVaultLastAccessStatusContractProperties": { + "properties": { + "code": { + "type": "string", + "description": "Last status code for sync and refresh of secret from key vault." + }, + "message": { + "type": "string", + "description": "Details of the error else empty." + }, + "timeStampUtc": { + "type": "string", + "format": "date-time", + "description": "Last time secret was accessed. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n" + } + }, + "description": "Issue contract Update Properties." + }, "LoggerCollection": { "properties": { "value": { @@ -3709,8 +3754,11 @@ "value": { "type": "string", "description": "Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.", - "minLength": 1, "maxLength": 4096 + }, + "keyVault": { + "$ref": "#/definitions/KeyVaultContractCreateProperties", + "description": "KeyVault location details of the namedValue." } }, "allOf": [ @@ -3719,8 +3767,7 @@ } ], "required": [ - "displayName", - "value" + "displayName" ], "description": "NamedValue Contract properties." }, @@ -3751,8 +3798,11 @@ "value": { "type": "string", "description": "Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.", - "minLength": 1, "maxLength": 4096 + }, + "keyVault": { + "$ref": "#/definitions/KeyVaultContractProperties", + "description": "KeyVault location details of the namedValue." } }, "allOf": [ @@ -3796,6 +3846,10 @@ "description": "Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace.", "minLength": 1, "maxLength": 4096 + }, + "keyVault": { + "$ref": "#/definitions/KeyVaultContractCreateProperties", + "description": "KeyVault location details of the namedValue." } }, "allOf": [ diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementCreateNamedValueWithKeyVault.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementCreateNamedValueWithKeyVault.json new file mode 100644 index 000000000000..a111ca2ba347 --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementCreateNamedValueWithKeyVault.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "serviceName": "apimService1", + "resourceGroupName": "rg1", + "api-version": "2020-06-01-preview", + "subscriptionId": "subid", + "namedValueId": "testprop6", + "parameters": { + "properties": { + "displayName": "prop6namekv", + "keyVault": { + "identityClientId": "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + "secretIdentifier": "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert" + }, + "tags": [ + "foo", + "bar" + ], + "secret": false + } + } + }, + "responses": { + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop6?api-version=2020-06-01-preview&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + }, + "201": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop6", + "type": "Microsoft.ApiManagement/service/namedValues", + "name": "testprop6", + "properties": { + "displayName": "prop6namekv", + "keyVault": { + "secretIdentifier": "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert", + "identityClientId": "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + "lastStatus": { + "code": "Success", + "timeStampUtc": "2020-09-11T00:54:31.8024882Z" + } + }, + "tags": [ + "foo", + "bar" + ], + "secret": true + } + } + }, + "200": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop6", + "type": "Microsoft.ApiManagement/service/namedValues", + "name": "testprop6", + "properties": { + "displayName": "prop6namekv", + "keyVault": { + "secretIdentifier": "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert", + "identityClientId": "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + "lastStatus": { + "code": "Success", + "timeStampUtc": "2020-09-11T00:54:31.8024882Z" + } + }, + "tags": [ + "foo", + "bar" + ], + "secret": true + } + } + } + } +} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementGetNamedValueWithKeyVault.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementGetNamedValueWithKeyVault.json new file mode 100644 index 000000000000..57d4b52e8cb8 --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementGetNamedValueWithKeyVault.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "serviceName": "apimService1", + "resourceGroupName": "rg1", + "api-version": "2020-06-01-preview", + "subscriptionId": "subid", + "namedValueId": "testprop6" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop6", + "type": "Microsoft.ApiManagement/service/namedValues", + "name": "testprop6", + "properties": { + "displayName": "prop6namekv", + "keyVault": { + "secretIdentifier": "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert", + "identityClientId": "2d2df842-44d8-4885-8dec-77cc1a984a31", + "lastStatus": { + "code": "Success", + "timeStampUtc": "2020-09-11T00:54:31.8024882Z" + } + }, + "tags": [ + "foo", + "bar" + ], + "secret": true + } + } + } + } +} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementListNamedValues.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementListNamedValues.json index 6b065d68a783..eb5c84ef99f0 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementListNamedValues.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementListNamedValues.json @@ -20,11 +20,19 @@ } }, { - "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testarmTemplateproperties2", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop6", "type": "Microsoft.ApiManagement/service/namedValues", - "name": "testarmTemplateproperties2", + "name": "testprop6", "properties": { - "displayName": "propName", + "displayName": "prop6namekv", + "keyVault": { + "secretIdentifier": "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert", + "identityClientId": "2d2df842-44d8-4885-8dec-77cc1a984a31", + "lastStatus": { + "code": "Success", + "timeStampUtc": "2020-09-11T00:54:31.8024882Z" + } + }, "tags": [ "foo", "bar"