Skip to content

Commit

Permalink
syncing changes from 2020-06-01-preview api (#12462)
Browse files Browse the repository at this point in the history
* [2020-06-01-preview] Update namedvalue add refreshSecret operation (#12223)

* add refreshSecret

* addressing comments

* add 202

* address comments

* parenthesis

Co-authored-by: Kacie Kang <jikang@microsoft.com>

* [2020-06-01-preview] Update certificate add refreshSecret operation (#12226)

* add refresh

* add path

* add keyvault part

* address comments

Co-authored-by: Kacie Kang <jikang@microsoft.com>

Co-authored-by: Kacie Kang <jikang@microsoft.com>
  • Loading branch information
KacieKK and KacieKK authored Jan 18, 2021
1 parent 47330bf commit 6a63e0b
Show file tree
Hide file tree
Showing 4 changed files with 183 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,61 @@
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}/refreshSecret": {
"post": {
"tags": [
"Certificate"
],
"operationId": "Certificate_RefreshSecret",
"description": "From KeyVault, Refresh the certificate being used for authentication with the backend.",
"externalDocs": {
"description": "How to secure back-end services using client certificate authentication in Azure API Management",
"url": "https://azure.microsoft.com/en-us/documentation/articles/api-management-howto-mutual-certificates/"
},
"x-ms-examples": {
"ApiManagementRefreshCertificate": {
"$ref": "./examples/ApiManagementRefreshCertificate.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/CertificateIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The certificate details were successfully updated.",
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
},
"schema": {
"$ref": "./definitions.json#/definitions/CertificateContract"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,64 @@
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}/refreshSecret": {
"post": {
"tags": [
"NamedValue"
],
"operationId": "NamedValue_RefreshSecret",
"description": "Refresh the secret of the named value specified by its identifier.",
"x-ms-examples": {
"ApiManagementRefreshNamedValue": {
"$ref": "./examples/ApiManagementRefreshNamedValue.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/NamedValueIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"202": {
"description": "Request to refresh secret was accepted."
},
"200": {
"description": "Named value was successfully updated.",
"schema": {
"$ref": "./definitions.json#/definitions/NamedValueContract"
},
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
}
}
}
},
"definitions": {},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"parameters": {
"serviceName": "apimService1",
"resourceGroupName": "rg1",
"api-version": "2020-06-01-preview",
"subscriptionId": "subid",
"certificateId": "templateCertkv"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/templateCertkv",
"type": "Microsoft.ApiManagement/service/certificates",
"name": "templateCertkv",
"properties": {
"subject": "CN=*.msitesting.net",
"thumbprint": "EA**********************9AD690",
"expirationDate": "2037-01-01T07:00:00Z",
"keyVault": {
"secretIdentifier": "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert",
"identityClientId": "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0",
"lastStatus": {
"code": "Success",
"timeStampUtc": "2020-09-22T00:24:53.3191468Z"
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"parameters": {
"serviceName": "apimService1",
"resourceGroupName": "rg1",
"api-version": "2020-06-01-preview",
"subscriptionId": "subid",
"namedValueId": "testprop2"
},
"responses": {
"202": {
"headers": {
"location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop6/refreshSecret?api-version=2020-06-01-preview&asyncId=5c730e343244df1b9cb56e85&asyncCode=201"
}
},
"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.azure.net/secrets/msitestingCert",
"identityClientId": "2d2df842-44d8-4885-8dec-77cc1a984a31",
"lastStatus": {
"code": "Success",
"timeStampUtc": "2020-09-11T00:54:31.8024882Z"
}
},
"tags": [
"foo",
"bar"
],
"secret": true
}
}
}
}
}

0 comments on commit 6a63e0b

Please sign in to comment.