Skip to content

Commit

Permalink
Dev keyvault microsoft.key vault 2021 04 01 preview (Azure#13585)
Browse files Browse the repository at this point in the history
* Adds base for updating Microsoft.KeyVault from version preview/2020-04-01-preview to version 2021-04-01-preview

* Updates readme

* Updates API version in new specs and examples

* Open API change for Managed Hsm private endpoints feature (Azure#12938)

* Open API change for Managed Hsm private endpoints feature

* Fixing spell check errors

* Fixing spell check errors

* Prettier fixes

* Fixing swagger validation errors

* Fixing systemData property reference

* Adding publicNetworkAccess property based on private endpoint requirement.

* GET responses following a successful DELETE should be returning 404. … (Azure#13054)

* GET responses following a successful DELETE should be returning 404. Only the DELETE response is to return 204 if the resource didn't exist (it allows idempotent deletes).

(cherry picked from commit b752a19)

* Removing 404 as it is taken care by default response.

* Added new routes for Deleted ManagedHsm for Soft Delete Feature (Azure#13282)

* Added new routes for Deleted ManagedHsm and examples, updated ManagedHsm definition to include PurgeDateTimeUTC

* Fixing validation issues.

* Fixing errors in properties in example jsons

* Delete keyvault.json

Deleted an errant json file

* Fixed misspelling of property in examples

* Fixed x-ms-examples naming, fixed camelcasing

* Addressing comments in PR to make 204s 404s and also changing PurgeDateTimeUTC to scheduledPurgeDate

* Added schema definitions for 404

* Removed 200 for purge

Co-authored-by: Soohwan Kim <sookim@microsoft.com>

* Addressing Comments for PR 13585 (Azure#13586)

* Removed 404s to allow requests to fall through to default

* Removing 404s from examples

Co-authored-by: Soohwan Kim <sookim@microsoft.com>

* Added deletedmanagedhsm object to examples and managedhsm.json (Azure#13591)

* Added deletedmanagedhsm object to examples and managedhsm.json

* Fixing error in references to correct values

* Changed vaultId to mhsmId in exmaples

Co-authored-by: Soohwan Kim <sookim@microsoft.com>

* Try to use the common type for SystemData (Azure#13723)

* Add SystemData property for KeyVault

* 04012021 fix schema (Azure#13749)

* Resolving conflict with custom-words.txt

* Add 2021 preview to azureresourcechema, add suppression to readme

* Add 2021 preview to azureresourcechema

* Merging custom-words.txt

Co-authored-by: Soohwan Kim <sookim@microsoft.com>

* Add missing default error response (Azure#13762)

* Fix Lint error (Azure#13765)

* Add missing default error response

* Update the integer format to fix Lint error

* Add securityDefinitions

* Added python tag for 2021 preview (Azure#13805)

Co-authored-by: Soohwan Kim <sookim@microsoft.com>

* Fixing linting errors for MHSM R4036 - ImplementPrivateEndpointAPIs (Azure#13822)

* Fixing linting errors for MHSM R4036 - ImplementPrivateEndpointAPIs

(cherry picked from commit c1c5aeb)

* prettier fix

* Add suppression for SystemData (Azure#13835)

* Add suppression for SystemData

* Fix linting error R4036 - ImplementPrivateEndpointAPIs

* specify the suppression for SystemData

* Revert "specify the suppression for SystemData"

This reverts commit cbebab8.

Co-authored-by: jiacheng-L <71623842+jiacheng-L@users.noreply.github.com>
Co-authored-by: kim-soohwan <40476315+kim-soohwan@users.noreply.github.com>
Co-authored-by: Soohwan Kim <sookim@microsoft.com>
Co-authored-by: Arthur Ning <57385816+akning-ms@users.noreply.github.com>
  • Loading branch information
5 people authored and dabenhamMic committed May 4, 2021
1 parent de02775 commit 0e4abb8
Show file tree
Hide file tree
Showing 46 changed files with 6,804 additions and 4 deletions.
39 changes: 39 additions & 0 deletions custom-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2142,3 +2142,42 @@ ziplist
Zoho
zoneinfo
zset
tpgs
ProviderHub
checkin
regionality
BRCPF
IDRG
EUGPS
PLREGON
ESDNI
USUK
Resource
metdata
Metastores
maintenancewindows
Logix
Redirector
destaging
appendpos
appendblock
Exprired
azureasyncoperations
saskey
vmsize
CheckfeatureSupport
Checkfeature
lifecycles
backuptype
FSLogix
privatelinkservice
natgateway
customhostnames
zipdeploy
defanged
Ruleproperties
zset
BMSAAD
managedHSMs
MHSM
MHSMIP
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"swagger": "2.0",
"info": {
"version": "2021-04-01-preview",
"title": "KeyVaultManagementClient",
"description": "The Azure management API provides a RESTful set of web services that interact with Azure Key Vault."
},
"paths": {},
"definitions": {
"CloudError": {
"description": "An error response from Key Vault resource provider",
"properties": {
"error": {
"$ref": "#/definitions/CloudErrorBody"
}
},
"x-ms-external": true
},
"CloudErrorBody": {
"description": "An error response from Key Vault resource provider",
"properties": {
"code": {
"type": "string",
"description": "Error code. This is a mnemonic that can be consumed programmatically."
},
"message": {
"type": "string",
"description": "User friendly error message. The message is typically localized and may vary with service version."
}
},
"x-ms-external": true
},
"SystemData": {
"description": "Metadata pertaining to creation and last modification of the key vault resource.",
"readOnly": true,
"properties": {
"createdBy": {
"type": "string",
"description": "The identity that created the key vault resource."
},
"createdByType": {
"description": "The type of identity that created the key vault resource.",
"$ref": "#/definitions/IdentityType"
},
"createdAt": {
"type": "string",
"format": "date-time",
"description": "The timestamp of the key vault resource creation (UTC)."
},
"lastModifiedBy": {
"type": "string",
"description": "The identity that last modified the key vault resource."
},
"lastModifiedByType": {
"description": "The type of identity that last modified the key vault resource.",
"$ref": "#/definitions/IdentityType"
},
"lastModifiedAt": {
"type": "string",
"format": "date-time",
"description": "The timestamp of the key vault resource last modification (UTC)."
}
}
},
"IdentityType": {
"type": "string",
"description": "The type of identity.",
"enum": [
"User",
"Application",
"ManagedIdentity",
"Key"
],
"x-ms-enum": {
"name": "identityType",
"modelAsString": true
}
}
},
"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"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"parameters": {
"name": "hsm1",
"location": "westus",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"api-version": "2021-04-01-preview"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedManagedHSMs/hsm1",
"name": "vault-agile-drawer-6404",
"type": "Microsoft.KeyVault/deletedManagedHSMs",
"properties": {
"mhsmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.KeyVault/managedHSMs/hsm1",
"location": "westus",
"deletionDate": "2021-04-01T00:00:59Z",
"scheduledPurgeDate": "2021-04-01T00:00:59Z",
"purgeProtectionEnabled": true,
"tags": {
"Dept": "hsm",
"Environment": "production"
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"parameters": {
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"api-version": "2021-04-01-preview"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedManagedHSMs/hsm1",
"name": "vault-agile-drawer-6404",
"type": "Microsoft.KeyVault/deletedManagedHSMs",
"properties": {
"mhsmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.KeyVault/managedHSMs/hsm1",
"location": "westus",
"deletionDate": "2021-04-01T00:00:59Z",
"scheduledPurgeDate": "2021-04-01T00:00:59Z",
"purgeProtectionEnabled": true,
"tags": {
"Dept": "hsm",
"Environment": "production"
}
}
},
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedManagedHSMs/hsm2",
"name": "vault-agile-drawer-6404",
"type": "Microsoft.KeyVault/deletedManagedHSMs",
"properties": {
"mhsmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.KeyVault/managedHSMs/hsm2",
"location": "westus",
"deletionDate": "2021-04-01T00:00:59Z",
"scheduledPurgeDate": "2021-04-01T00:00:59Z",
"purgeProtectionEnabled": true,
"tags": {
"Dept": "hsm",
"Environment": "production"
}
}
}
],
"nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedManagedHSMs?api-version=2021-04-01-preview&$skiptoken=dmF1bHQtcGVza3ktanVyeS03MzA3Ng=="
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"parameters": {
"name": "hsm1",
"location": "westus",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"api-version": "2021-04-01-preview"
},
"responses": {
"202": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"parameters": {
"resourceGroupName": "hsm-group",
"name": "hsm1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"api-version": "2021-04-01-preview",
"parameters": {
"properties": {
"tenantId": "00000000-0000-0000-0000-000000000000",
"initialAdminObjectIds": [
"00000000-0000-0000-0000-000000000000"
],
"enableSoftDelete": true,
"softDeleteRetentionInDays": 90,
"enablePurgeProtection": true
},
"location": "westus",
"sku": {
"family": "B",
"name": "Standard_B1"
},
"tags": {
"Dept": "hsm",
"Environment": "dogfood"
}
}
},
"responses": {
"202": {
"body": {
"properties": {
"tenantId": "00000000-0000-0000-0000-000000000000",
"initialAdminObjectIds": [
"00000000-0000-0000-0000-000000000000"
],
"enableSoftDelete": true,
"softDeleteRetentionInDays": 90,
"enablePurgeProtection": true,
"hsmUri": null,
"provisioningState": "Provisioning",
"statusMessage": "Allocating hardware"
},
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.KeyVault/managedHSMs/hsm1",
"name": "hsm1",
"type": "Microsoft.KeyVault/managedHSMs",
"location": "westus",
"sku": {
"family": "B",
"name": "Standard_B1"
},
"tags": {
"Dept": "hsm",
"Environment": "dogfood"
}
}
},
"200": {
"body": {
"properties": {
"tenantId": "00000000-0000-0000-0000-000000000000",
"initialAdminObjectIds": [
"00000000-0000-0000-0000-000000000000"
],
"enableSoftDelete": true,
"softDeleteRetentionInDays": 90,
"enablePurgeProtection": true,
"hsmUri": "https://westus.hsm1.managedhsm.azure.net",
"provisioningState": "Succeeded",
"statusMessage": "ManagedHsm is functional."
},
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.KeyVault/managedHSMs/hsm1",
"name": "hsm1",
"type": "Microsoft.KeyVault/managedHSMs",
"location": "westus",
"sku": {
"family": "B",
"name": "Standard_B1"
},
"tags": {
"Dept": "hsm",
"Environment": "dogfood"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"parameters": {
"resourceGroupName": "hsm-group",
"name": "hsm1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"api-version": "2021-04-01-preview"
},
"responses": {
"200": {},
"202": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"parameters": {
"resourceGroupName": "hsm-group",
"name": "hsm1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"api-version": "2021-04-01-preview"
},
"responses": {
"200": {
"body": {
"properties": {
"tenantId": "00000000-0000-0000-0000-000000000000",
"initialAdminObjectIds": [
"00000000-0000-0000-0000-000000000000"
],
"enableSoftDelete": true,
"softDeleteRetentionInDays": 90,
"enablePurgeProtection": true,
"hsmUri": "https://westus.hsm1.managedhsm.azure.net",
"provisioningState": "Succeeded",
"statusMessage": "ManagedHsm is functional."
},
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.KeyVault/managedHSMs/hsm1",
"name": "hsm1",
"type": "Microsoft.KeyVault/managedHSMs",
"location": "westus",
"sku": {
"family": "B",
"name": "Standard_B1"
},
"tags": {
"Dept": "hsm",
"Environment": "dogfood"
}
}
},
"202": {
"headers": {
"Retry-After": "60",
"Location": "https://some.endpoint.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.KeyVault/managedHSMs/hsm1?api-version=2021-04-01-preview&kv-operation=abJjb2RkIjoiAGVsZXRlTWFuYWdlZEhzbUFzeW5jYm9"
}
},
"204": {}
}
}
Loading

0 comments on commit 0e4abb8

Please sign in to comment.