diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/checkVaultNameAvailability.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/checkVaultNameAvailability.json new file mode 100644 index 000000000000..166d4252ac9e --- /dev/null +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/checkVaultNameAvailability.json @@ -0,0 +1,17 @@ +{ + "parameters":{ + "subscriptionId":"00000000-0000-0000-0000-000000000000", + "api-version":"2018-02-14-preview", + "vaultName":{ + "name":"sample-vault", + "type":"Microsoft.KeyVault/vaults" + } + }, + "responses":{ + "200":{ + "body":{ + "nameAvailable":true + } + } + } +} \ No newline at end of file diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/createSecret.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/createSecret.json new file mode 100644 index 000000000000..df1d0566a19c --- /dev/null +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/createSecret.json @@ -0,0 +1,50 @@ +{ + "parameters":{ + "resourceGroupName":"sample-group", + "vaultName":"sample-vault", + "secretName":"secret-name", + "subscriptionId":"00000000-0000-0000-0000-000000000000", + "api-version":"2018-02-14-preview", + "parameters":{ + "properties":{ + "value": "secret-value" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-group/providers/Microsoft.KeyVault/vaults/sample-vault/secrets/secret-name", + "name": "secret-name", + "type": "Microsoft.KeyVault/vaults/secrets", + "location": "westus", + "properties": { + "attributes": { + "enabled": true, + "created": 1514938738, + "updated": 1514938738 + }, + "secretUri": "https://sample-vault.vault.azure.net/secrets/secret-name", + "secretUriWithVersion": "https:/sample-vault.vault.azure.net/secrets/secret-name/baf6de32c4774c7c81345f6476cf90a4" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-group/providers/Microsoft.KeyVault/vaults/sample-vault/secrets/secret-name", + "name": "secret-name", + "type": "Microsoft.KeyVault/vaults/secrets", + "location": "westus", + "properties": { + "attributes": { + "enabled": true, + "created": 1514938738, + "updated": 1514938738 + }, + "secretUri": "https://sample-vault.vault.azure.net/secrets/secret-name", + "secretUriWithVersion": "https:/sample-vault.vault.azure.net/secrets/secret-name/baf6de32c4774c7c81345f6476cf90a4" + } + } + } + } +} \ No newline at end of file diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/createVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/createVault.json new file mode 100644 index 000000000000..4dcd72358e5e --- /dev/null +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/createVault.json @@ -0,0 +1,204 @@ +{ + "parameters":{ + "resourceGroupName":"sample-resource-group", + "vaultName":"sample-vault", + "subscriptionId":"00000000-0000-0000-0000-000000000000", + "api-version":"2018-02-14-preview", + "parameters":{ + "location": "westus", + "properties":{ + "tenantId": "00000000-0000-0000-0000-000000000000", + "sku": {"family": "A", "name": "standard"}, + "accessPolicies":[{ + "tenantId": "00000000-0000-0000-0000-000000000000", + "objectId": "00000000-0000-0000-0000-000000000000", + "permissions": { + "keys": [ + "encrypt", + "decrypt", + "wrapKey", + "unwrapKey", + "sign", + "verify", + "get", + "list", + "create", + "update", + "import", + "delete", + "backup", + "restore", + "recover", + "purge" + ], + "secrets":[ + "get", + "list", + "set", + "delete", + "backup", + "restore", + "recover", + "purge" + ], + "certificates":[ + "get", + "list", + "delete", + "create", + "import", + "update", + "managecontacts", + "getissuers", + "listissuers", + "setissuers", + "deleteissuers", + "manageissuers", + "recover", + "purge" + ] + } + }], + "enabledForDeployment": true, + "enabledForDiskEncryption": true, + "enabledForTemplateDeployment": true + } + } + }, + "responses":{ + "200":{ + "body":{ + "id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-resource-group/providers/Microsoft.KeyVault/vaults/sample-vault", + "name":"sample-vault", + "type":"Microsoft.KeyVault/vaults", + "location":"westus", + "tags":{}, + "properties":{ + "sku":{"family":"A","name":"standard"}, + "tenantId":"00000000-0000-0000-0000-000000000000", + "accessPolicies":[{ + "tenantId": "00000000-0000-0000-0000-000000000000", + "objectId": "00000000-0000-0000-0000-000000000000", + "permissions": { + "keys": [ + "encrypt", + "decrypt", + "wrapKey", + "unwrapKey", + "sign", + "verify", + "get", + "list", + "create", + "update", + "import", + "delete", + "backup", + "restore", + "recover", + "purge" + ], + "secrets":[ + "get", + "list", + "set", + "delete", + "backup", + "restore", + "recover", + "purge" + ], + "certificates":[ + "get", + "list", + "delete", + "create", + "import", + "update", + "managecontacts", + "getissuers", + "listissuers", + "setissuers", + "deleteissuers", + "manageissuers", + "recover", + "purge" + ] + } + }], + "enabledForDeployment":true, + "enabledForDiskEncryption":true, + "enabledForTemplateDeployment":true, + "vaultUri":"https://sample-vault.vault.azure.net" + } + } + }, + "201":{ + "body":{ + "id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-resource-group/providers/Microsoft.KeyVault/vaults/sample-vault", + "name":"sample-vault", + "type":"Microsoft.KeyVault/vaults", + "location":"westus", + "tags":{}, + "properties":{ + "sku":{"family":"A","name":"standard"}, + "tenantId":"00000000-0000-0000-0000-000000000000", + "accessPolicies":[{ + "tenantId": "00000000-0000-0000-0000-000000000000", + "objectId": "00000000-0000-0000-0000-000000000000", + "permissions": { + "keys": [ + "encrypt", + "decrypt", + "wrapKey", + "unwrapKey", + "sign", + "verify", + "get", + "list", + "create", + "update", + "import", + "delete", + "backup", + "restore", + "recover", + "purge" + ], + "secrets":[ + "get", + "list", + "set", + "delete", + "backup", + "restore", + "recover", + "purge" + ], + "certificates":[ + "get", + "list", + "delete", + "create", + "import", + "update", + "managecontacts", + "getissuers", + "listissuers", + "setissuers", + "deleteissuers", + "manageissuers", + "recover", + "purge" + ] + } + }], + "enabledForDeployment":true, + "enabledForDiskEncryption":true, + "enabledForTemplateDeployment":true, + "vaultUri":"https://sample-vault.vault.azure.net" + } + } + } + } +} \ No newline at end of file diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/createVaultWithNetworkAcls.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/createVaultWithNetworkAcls.json new file mode 100644 index 000000000000..333df26372f4 --- /dev/null +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/createVaultWithNetworkAcls.json @@ -0,0 +1,87 @@ +{ + "parameters":{ + "resourceGroupName":"sample-resource-group", + "vaultName":"sample-vault", + "subscriptionId":"00000000-0000-0000-0000-000000000000", + "api-version":"2018-02-14-preview", + "parameters":{ + "location": "westus", + "properties":{ + "tenantId": "00000000-0000-0000-0000-000000000000", + "sku": {"family": "A", "name": "standard"}, + "networkAcls": { + "defaultAction": "Deny", + "bypass": "AzureServices", + "ipRules": [ + { "value": "124.56.78.91" }, + { "value": "'10.91.4.0/24'" } + ], + "virtualNetworkRules": [ + { "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1" } + ] + }, + "enabledForDeployment": true, + "enabledForDiskEncryption": true, + "enabledForTemplateDeployment": true + } + } + }, + "responses":{ + "200":{ + "body":{ + "id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-resource-group/providers/Microsoft.KeyVault/vaults/sample-vault", + "name":"sample-vault", + "type":"Microsoft.KeyVault/vaults", + "location":"westus", + "tags":{}, + "properties":{ + "sku":{"family":"A","name":"standard"}, + "tenantId":"00000000-0000-0000-0000-000000000000", + "networkAcls": { + "defaultAction": "Deny", + "bypass": "AzureServices", + "ipRules": [ + { "value": "124.56.78.91/32" }, + { "value": "'10.91.4.0/24'" } + ], + "virtualNetworkRules": [ + { "id": "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.network/virtualnetworks/test-vnet/subnets/subnet1" } + ] + }, + "enabledForDeployment":true, + "enabledForDiskEncryption":true, + "enabledForTemplateDeployment":true, + "vaultUri":"https://sample-vault.vault.azure.net" + } + } + }, + "201":{ + "body":{ + "id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-resource-group/providers/Microsoft.KeyVault/vaults/sample-vault", + "name":"sample-vault", + "type":"Microsoft.KeyVault/vaults", + "location":"westus", + "tags":{}, + "properties":{ + "sku":{"family":"A","name":"standard"}, + "tenantId":"00000000-0000-0000-0000-000000000000", + "networkAcls": { + "defaultAction": "Deny", + "bypass": "AzureServices", + "ipRules": [ + { "value": "124.56.78.91/32" }, + { "value": "'10.91.4.0/24'" } + ], + "virtualNetworkRules": [ + { "id": "/subscriptions/subid/resourcegroups/rg1/providers/microsoft.network/virtualnetworks/test-vnet/subnets/subnet1" } + ] + }, + "enabledForDeployment":true, + "enabledForDiskEncryption":true, + "enabledForTemplateDeployment":true, + "vaultUri":"https://sample-vault.vault.azure.net" + } + } + } + } +} \ No newline at end of file diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/deleteVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/deleteVault.json new file mode 100644 index 000000000000..ac38daf44940 --- /dev/null +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/deleteVault.json @@ -0,0 +1,14 @@ +{ + "parameters":{ + "resourceGroupName":"sample-resource-group", + "vaultName":"sample-vault", + "subscriptionId":"00000000-0000-0000-0000-000000000000", + "api-version":"2018-02-14-preview" + }, + "responses":{ + "200":{ + "headers":{}, + "body":"" + } + } +} \ No newline at end of file diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/getDeletedVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/getDeletedVault.json new file mode 100644 index 000000000000..e3b04b4773b5 --- /dev/null +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/getDeletedVault.json @@ -0,0 +1,25 @@ +{ + "parameters":{ + "vaultName":"sample-vault", + "location":"westus", + "subscriptionId":"00000000-0000-0000-0000-000000000000", + "api-version":"2018-02-14-preview" + }, + "responses":{ + "200":{ + "headers":{}, + "body":{ + "id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/sample-vault", + "name":"sample-vault", + "type":"Microsoft.KeyVault/deletedVaults", + "properties":{ + "vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-group/providers/Microsoft.KeyVault/vaults/sample-vault", + "location":"westus", + "tags":{}, + "deletionDate":"2017-01-01T00:00:59Z", + "scheduledPurgeDate":"2017-04-01T00:00:59Z" + } + } + } + } +} \ No newline at end of file diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/getSecret.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/getSecret.json new file mode 100644 index 000000000000..e009e8546dae --- /dev/null +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/getSecret.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "resourceGroupName": "sample-group", + "vaultName": "sample-vault", + "secretName":"secret-name", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "api-version": "2018-02-14-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-group/providers/Microsoft.KeyVault/vaults/sample-vault/secrets/secret-name", + "name": "secret-name", + "type": "Microsoft.KeyVault/vaults/secrets", + "location": "westus", + "properties": { + "attributes": { + "enabled": true, + "created": 1514940950, + "updated": 1514940950 + }, + "secretUri": "https://sample-vault.vault.azure.net/secrets/secret-name", + "secretUriWithVersion": "https://sample-vault.vault.azure.net/secrets/secret-name/77445834f7de41bab81d0723bf996860" + } + } + } + } +} \ No newline at end of file diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/getVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/getVault.json new file mode 100644 index 000000000000..3891eec591e3 --- /dev/null +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/getVault.json @@ -0,0 +1,77 @@ +{ + "parameters":{ + "resourceGroupName":"sample-resource-group", + "vaultName":"sample-vault", + "subscriptionId":"00000000-0000-0000-0000-000000000000", + "api-version":"2018-02-14-preview" + }, + "responses":{ + "200":{ + "body":{ + "id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-resource-group/providers/Microsoft.KeyVault/vaults/sample-vault", + "name":"sample-vault", + "type":"Microsoft.KeyVault/vaults", + "location":"westus", + "tags":{}, + "properties":{ + "sku":{"family":"A","name":"standard"}, + "tenantId":"00000000-0000-0000-0000-000000000000", + "accessPolicies":[{ + "tenantId": "00000000-0000-0000-0000-000000000000", + "objectId": "00000000-0000-0000-0000-000000000000", + "permissions": { + "keys": [ + "encrypt", + "decrypt", + "wrapKey", + "unwrapKey", + "sign", + "verify", + "get", + "list", + "create", + "update", + "import", + "delete", + "backup", + "restore", + "recover", + "purge" + ], + "secrets":[ + "get", + "list", + "set", + "delete", + "backup", + "restore", + "recover", + "purge" + ], + "certificates":[ + "get", + "list", + "delete", + "create", + "import", + "update", + "managecontacts", + "getissuers", + "listissuers", + "setissuers", + "deleteissuers", + "manageissuers", + "recover", + "purge" + ] + } + }], + "enabledForDeployment":true, + "enabledForDiskEncryption":true, + "enabledForTemplateDeployment":true, + "vaultUri":"https://sample-vault.vault.azure.net" + } + } + } + } +} \ No newline at end of file diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/listDeletedVaults.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/listDeletedVaults.json new file mode 100644 index 000000000000..0bece3cd6558 --- /dev/null +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/listDeletedVaults.json @@ -0,0 +1,28 @@ +{ + "parameters":{ + "$top":1, + "subscriptionId":"00000000-0000-0000-0000-000000000000", + "api-version":"2018-02-14-preview" + }, + "responses":{ + "200":{ + "body":{ + "value":[ + { + "id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/sample-vault", + "name":"vault-agile-drawer-6404", + "type":"Microsoft.KeyVault/deletedVaults", + "properties":{ + "vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-group/providers/Microsoft.KeyVault/vaults/sample-vault", + "location":"westus", + "tags":{}, + "deletionDate":"2017-01-01T00:00:59Z", + "scheduledPurgeDate":"2017-04-01T00:00:59Z" + } + } + ], + "nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2018-02-14-preview&%24skiptoken=HY3RaoMwAEX%2fRcbeYhJrnRXKYNWOuqpME0sfNcYui0Yxade19N8ne7hcDlzOvVuKX81eKKmt4G4dooLQwgqsL2NGHUDYV6o68Z4rY1e388RtNvRQn2vNJjEaMSgNvcbneMUcsKg8BFwft8DndQ0w9hu2QOiFLRs4TsNFNHzSMBFsGvTQGvuD%2f5bVuTOw4R03vPkH%2fVqNAlzm5SxfOwh7ACOA8POTlvPjILlaU1ke8jImOc23JCppQVfZnna0DXc4ISc3vSVuRo5zJE6%2bj25C3vwk2v2kEV2mMn7PyOc1DbtNGkonnzuLym1G400uI5QRZj0efw%3d%3d" + } + } + } +} \ No newline at end of file diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/listOperations.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/listOperations.json new file mode 100644 index 000000000000..fedc22b2dfb3 --- /dev/null +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/listOperations.json @@ -0,0 +1,249 @@ +{ + "parameters": { + "api-version": "2018-02-14-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.KeyVault/vaults/read", + "display": { + "provider": "Microsoft Key Vault", + "resource": "Key Vault", + "operation": "View Key Vault", + "description": "View the properties of a key vault" + } + }, + { + "name": "Microsoft.KeyVault/vaults/write", + "display": { + "provider": "Microsoft Key Vault", + "resource": "Key Vault", + "operation": "Update Key Vault", + "description": "Create a new key vault or update the properties of an existing key vault" + } + }, + { + "name": "Microsoft.KeyVault/vaults/delete", + "display": { + "provider": "Microsoft Key Vault", + "resource": "Key Vault", + "operation": "Delete Key Vault", + "description": "Delete a key vault" + } + }, + { + "name": "Microsoft.KeyVault/vaults/deploy/action", + "display": { + "provider": "Microsoft Key Vault", + "resource": "Key Vault", + "operation": "Use Vault for Azure Deployments", + "description": "Enables access to secrets in a key vault when deploying Azure resources" + } + }, + { + "name": "Microsoft.KeyVault/vaults/secrets/read", + "display": { + "provider": "Microsoft Key Vault", + "resource": "Secret", + "operation": "View Secret Properties", + "description": "View the properties of a secret, but not its value" + } + }, + { + "name": "Microsoft.KeyVault/vaults/secrets/write", + "display": { + "provider": "Microsoft Key Vault", + "resource": "Secret", + "operation": "Update Secret", + "description": "Create a new secret or update the value of an existing secret" + } + }, + { + "name": "Microsoft.KeyVault/vaults/accessPolicies/write", + "display": { + "provider": "Microsoft Key Vault", + "resource": "Access Policy", + "operation": "Update Access Policy", + "description": "Update an existing access policy by merging or replacing, or add a new access policy to a vault." + } + }, + { + "origin": "system", + "name": "Microsoft.KeyVault/vaults/providers/Microsoft.Insights/logDefinitions/read", + "display": { + "provider": "Microsoft Key Vault", + "resource": "Key Vault Log Definition", + "operation": "Read log definition", + "description": "Gets the available logs for a key vault" + }, + "properties": { + "serviceSpecification": { + "logSpecifications": [ + { + "name": "AuditEvent", + "displayName": "Audit Logs", + "blobDuration": "PT1H" + } + ] + } + } + }, + { + "origin": "system", + "name": "Microsoft.KeyVault/vaults/providers/Microsoft.Insights/diagnosticSettings/Read", + "display": { + "provider": "Microsoft Key Vault", + "resource": "Key Vault Diagnostic Settings", + "operation": "Read diagnostic setting", + "description": "Gets the diagnostic setting for the resource" + } + }, + { + "origin": "system", + "name": "Microsoft.KeyVault/vaults/providers/Microsoft.Insights/diagnosticSettings/Write", + "display": { + "provider": "Microsoft Key Vault", + "resource": "Key Vault Diagnostic Settings", + "operation": "Write diagnostic setting", + "description": "Creates or updates the diagnostic setting for the resource" + } + }, + { + "name": "Microsoft.KeyVault/register/action", + "display": { + "provider": "Microsoft Key Vault", + "resource": "Subscription", + "operation": "Register Subscription", + "description": "Registers a subscription" + } + }, + { + "name": "Microsoft.KeyVault/unregister/action", + "display": { + "provider": "Microsoft Key Vault", + "resource": "Subscription", + "operation": "Unregister Subscription", + "description": "Unregisters a subscription" + } + }, + { + "name": "Microsoft.KeyVault/operations/read", + "display": { + "provider": "Microsoft Key Vault", + "resource": "Operations", + "operation": "Available Key Vault Operations", + "description": "Lists operations available on Microsoft.KeyVault resource provider" + } + }, + { + "name": "Microsoft.KeyVault/checkNameAvailability/read", + "display": { + "provider": "Microsoft Key Vault", + "resource": "Name Availability", + "operation": "Check Name Availability", + "description": "Checks that a key vault name is valid and is not in use" + } + }, + { + "name": "Microsoft.KeyVault/deletedVaults/read", + "display": { + "provider": "Microsoft Key Vault", + "resource": "Soft Deleted Key Vault", + "operation": "View Soft Deleted Vaults", + "description": "View the properties of soft deleted key vaults" + } + }, + { + "name": "Microsoft.KeyVault/locations/deletedVaults/read", + "display": { + "provider": "Microsoft Key Vault", + "resource": "Soft Deleted Key Vault", + "operation": "View Soft Deleted Key Vault", + "description": "View the properties of a soft deleted key vault" + } + }, + { + "name": "Microsoft.KeyVault/locations/deletedVaults/purge/action", + "display": { + "provider": "Microsoft Key Vault", + "resource": "Soft Deleted Key Vault", + "operation": "Purge Soft Deleted Key Vault", + "description": "Purge a soft deleted key vault" + } + }, + { + "name": "Microsoft.KeyVault/locations/operationResults/read", + "display": { + "provider": "Microsoft Key Vault", + "resource": "Long Run Operation Result", + "operation": "Check Operation Result", + "description": "Check the result of a long run operation" + } + }, + { + "name": "Microsoft.KeyVault/hsmPools/read", + "display": { + "provider": "Microsoft Key Vault", + "resource": "HSM pool", + "operation": "View HSM pool", + "description": "View the properties of an HSM pool" + } + }, + { + "name": "Microsoft.KeyVault/hsmPools/write", + "display": { + "provider": "Microsoft Key Vault", + "resource": "HSM pool", + "operation": "Create or Update HSM pool", + "description": "Create a new HSM pool of update the properties of an existing HSM pool" + } + }, + { + "name": "Microsoft.KeyVault/hsmPools/delete", + "display": { + "provider": "Microsoft Key Vault", + "resource": "HSM pool", + "operation": "Delete HSM pool", + "description": "Delete an HSM pool" + } + }, + { + "name": "Microsoft.KeyVault/hsmPools/joinVault/action", + "display": { + "provider": "Microsoft Key Vault", + "resource": "HSM pool", + "operation": "Join KeyVault to HSM pool", + "description": "Join a key vault to an HSM pool" + } + }, + { + "origin": "system", + "name": "Microsoft.KeyVault/vaults/providers/Microsoft.Insights/metricDefinitions/read", + "display": { + "provider": "Microsoft Key Vault", + "resource": "Key Vault Metric Definition", + "operation": "Read metric definition", + "description": "Gets the available metrics for a key vault" + }, + "properties": { + "serviceSpecification": { + } + } + }, + { + "origin": "system", + "name": "Microsoft.KeyVault/locations/deleteVirtualNetworkOrSubnets/action", + "display": { + "provider": "Microsoft Key Vault", + "resource": "Location", + "operation": "Modify Network ACLs containing the deleted Vitual Network or Subnet ", + "description": "Notifies Microsoft.KeyVault that a virtual network or subnet is being deleted" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/listSecrets.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/listSecrets.json new file mode 100644 index 000000000000..f4232d269e71 --- /dev/null +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/listSecrets.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "resourceGroupName": "sample-group", + "vaultName": "sample-vault", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "api-version": "2018-02-14-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-group/providers/Microsoft.KeyVault/vaults/sample-vault/secrets/secret-name", + "name": "secret-name", + "type": "Microsoft.KeyVault/vaults/secrets", + "location": "westus", + "properties": { + "attributes": { + "enabled": true, + "created": 1514941476, + "updated": 1514941476 + }, + "secretUri": "https://sample-vault.vault.azure.net/secrets/secret-name", + "secretUriWithVersion": "https://sample-vault.vault.azure.net/secrets/secret-name/40af42fbc10047f8a756a73211492f56" + } + }, + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-group/providers/Microsoft.KeyVault/vaults/sample-vault/secrets/secret-name2", + "name": "secret-name2", + "type": "Microsoft.KeyVault/vaults/secrets", + "location": "westus", + "properties": { + "attributes": { + "enabled": true, + "created": 1514941476, + "updated": 1514941476 + }, + "secretUri": "https://sample-vault.vault.azure.net/secrets/secret-name2", + "secretUriWithVersion": "https://sample-vault.vault.azure.net/secrets/secret-name2/cd7264a6f56c44d1b594423c80609aae" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/listVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/listVault.json new file mode 100644 index 000000000000..51691cccfee5 --- /dev/null +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/listVault.json @@ -0,0 +1,24 @@ +{ + "parameters":{ + "$filter":"resourceType eq 'Microsoft.KeyVault/vaults'", + "$top":1, + "subscriptionId":"00000000-0000-0000-0000-000000000000", + "api-version":"2015-11-01" + }, + "responses":{ + "200":{ + "body":{ + "value":[ + { + "id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-group/providers/Microsoft.KeyVault/vaults/sample-vault", + "name":"sample-vault", + "type":"Microsoft.KeyVault/vaults", + "location":"westus", + "tags":{} + } + ], + "nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?%24filter=resourceType+eq+%27Microsoft.KeyVault%2fvaults%27&%24top=4&api-version=2015-11-01&%24skiptoken=eyJuZXh0UGFydGl0aW9uS2V5IjoiMSE4IVEwTTJNVGMtIiwibmV4dFJvd0tleSI6IjEhMTMyIU5rUTRSVEU1UXpJelFUWXdORGd4UmpoRlFrSXhNVGhFUXpNd01EZEROVVJmVkVkT1RDMU5TVU5TVDFOUFJsUTZNa1ZMUlZsV1FWVk1WRG95UmxaQlZVeFVVeTFUVTFKSExVcEpUVG95UkZSRlUxUTZNa1JXUVZWTVZDMVhSVk5VVlZNLSJ9" + } + } + } +} \ No newline at end of file diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/listVaultByResourceGroup.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/listVaultByResourceGroup.json new file mode 100644 index 000000000000..8bb4435a4360 --- /dev/null +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/listVaultByResourceGroup.json @@ -0,0 +1,82 @@ +{ + "parameters":{ + "$top":1, + "subscriptionId":"00000000-0000-0000-0000-000000000000", + "resourceGroupName":"sample-group", + "api-version":"2018-02-14-preview" + }, + "responses":{ + "200":{ + "body":{ + "value":[ + { + "id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-group/providers/Microsoft.KeyVault/vaults/sample-vault", + "name":"sample-vault", + "type":"Microsoft.KeyVault/vaults", + "location":"westus", + "tags":{}, + "properties":{ + "sku":{"family":"A","name":"premium"}, + "tenantId":"00000000-0000-0000-0000-000000000000", + "accessPolicies":[ + { + "tenantId":"00000000-0000-0000-0000-000000000000", + "objectId":"00000000-0000-0000-0000-000000000000", + "permissions":{ + "keys":[ + "encrypt", + "decrypt", + "wrapKey", + "unwrapKey", + "sign", + "verify", + "get", + "list", + "create", + "update", + "import", + "delete", + "backup", + "restore", + "recover", + "purge"], + "secrets":[ + "get", + "list", + "set", + "delete", + "backup", + "restore", + "recover", + "purge"], + "certificates":[ + "get", + "list", + "delete", + "create", + "import", + "update", + "managecontacts", + "getissuers", + "listissuers", + "setissuers", + "deleteissuers", + "manageissuers", + "recover", + "purge"] + } + } + ], + "enabledForDeployment":true, + "enabledForDiskEncryption":true, + "enabledForTemplateDeployment":true, + "enableSoftDelete":true, + "vaultUri":"https://sample-vault.vault.azure.net/" + } + } + ], + "nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-group/providers/Microsoft.KeyVault/vaults?api-version=2018-02-14-preview&$skiptoken=dmF1bHQtcGVza3ktanVyeS03MzA3Ng==" + } + } + } +} \ No newline at end of file diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/listVaultBySubscription.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/listVaultBySubscription.json new file mode 100644 index 000000000000..770b9bc74c65 --- /dev/null +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/listVaultBySubscription.json @@ -0,0 +1,81 @@ +{ + "parameters":{ + "$top":1, + "subscriptionId":"00000000-0000-0000-0000-000000000000", + "api-version":"2018-02-14-preview" + }, + "responses":{ + "200":{ + "body":{ + "value":[ + { + "id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-group/providers/Microsoft.KeyVault/vaults/sample-vault", + "name":"sample-vault", + "type":"Microsoft.KeyVault/vaults", + "location":"westus", + "tags":{}, + "properties":{ + "sku":{"family":"A","name":"premium"}, + "tenantId":"00000000-0000-0000-0000-000000000000", + "accessPolicies":[ + { + "tenantId":"00000000-0000-0000-0000-000000000000", + "objectId":"00000000-0000-0000-0000-000000000000", + "permissions":{ + "keys":[ + "encrypt", + "decrypt", + "wrapKey", + "unwrapKey", + "sign", + "verify", + "get", + "list", + "create", + "update", + "import", + "delete", + "backup", + "restore", + "recover", + "purge"], + "secrets":[ + "get", + "list", + "set", + "delete", + "backup", + "restore", + "recover", + "purge"], + "certificates":[ + "get", + "list", + "delete", + "create", + "import", + "update", + "managecontacts", + "getissuers", + "listissuers", + "setissuers", + "deleteissuers", + "manageissuers", + "recover", + "purge"] + } + } + ], + "enabledForDeployment":true, + "enabledForDiskEncryption":true, + "enabledForTemplateDeployment":true, + "enableSoftDelete":true, + "vaultUri":"https://sample-vault.vault.azure.net/" + } + } + ], + "nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?api-version=22018-02-14-preview&$skiptoken=dmF1bHQtcGVza3ktanVyeS03MzA3Ng==" + } + } + } +} \ No newline at end of file diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/purgeDeletedVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/purgeDeletedVault.json new file mode 100644 index 000000000000..7623e31a79c3 --- /dev/null +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/purgeDeletedVault.json @@ -0,0 +1,16 @@ +{ + "parameters":{ + "vaultName":"sample-vault", + "location":"westus", + "subscriptionId":"00000000-0000-0000-0000-000000000000", + "api-version":"2018-02-14-preview" + }, + "responses":{ + "200":{ + "body":"" + }, + "202":{ + "body":"" + } + } +} \ No newline at end of file diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/updateAccessPoliciesAdd.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/updateAccessPoliciesAdd.json new file mode 100644 index 000000000000..351ce0e84ef4 --- /dev/null +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/updateAccessPoliciesAdd.json @@ -0,0 +1,64 @@ +{ + "parameters":{ + "resourceGroupName": "sample-group", + "vaultName": "sample-vault", + "operationKind": "add", + "subscriptionId":"00000000-0000-0000-0000-000000000000", + "api-version":"2018-02-14-preview", + "parameters":{ + "properties":{ + "accessPolicies":[ + { + "tenantId": "00000000-0000-0000-0000-000000000000", + "objectId": "00000000-0000-0000-0000-000000000000", + "permissions":{ + "keys": ["encrypt"], + "secrets": ["get"], + "certificates": ["get"] + } + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-group/providers/Microsoft.KeyVault/vaults/sample-vault/accessPolicies/", + "type": "Microsoft.KeyVault/vaults/accessPolicies", + "properties": { + "accessPolicies": [ + { + "tenantId": "00000000-0000-0000-0000-000000000000", + "objectId": "00000000-0000-0000-0000-000000000000", + "permissions":{ + "keys": ["encrypt"], + "secrets": ["get"], + "certificates": ["get"] + } + } + ] + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-group/providers/Microsoft.KeyVault/vaults/sample-vault/accessPolicies/", + "type": "Microsoft.KeyVault/vaults/accessPolicies", + "properties": { + "accessPolicies": [ + { + "tenantId": "00000000-0000-0000-0000-000000000000", + "objectId": "00000000-0000-0000-0000-000000000000", + "permissions":{ + "keys": ["encrypt"], + "secrets": ["get"], + "certificates": ["get"] + } + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/updateSecret.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/updateSecret.json new file mode 100644 index 000000000000..8e72e89dd515 --- /dev/null +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/updateSecret.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "resourceGroupName": "sample-group", + "vaultName": "sample-vault", + "secretName":"secret-name", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "api-version": "2018-02-14-preview", + "parameters": { + "properties": {"value": "secret-value2"} + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-group/providers/Microsoft.KeyVault/vaults/sample-vault/secrets/secret-name", + "name": "secret-name", + "type": "Microsoft.KeyVault/vaults/secrets", + "location": "westus", + "properties": { + "attributes": { + "enabled": true, + "created": 1514940684, + "updated": 1514940698 + }, + "secretUri": "https://sample-vault.vault.azure.net/secrets/secret-name", + "secretUriWithVersion": "https://sample-vault.vault.azure.net/secrets/secret-name/b8c802f549764f2d97885d152f92ee9d" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-group/providers/Microsoft.KeyVault/vaults/sample-vault/secrets/secret-name", + "name": "secret-name", + "type": "Microsoft.KeyVault/vaults/secrets", + "location": "westus", + "properties": { + "attributes": { + "enabled": true, + "created": 1514940684, + "updated": 1514940698 + }, + "secretUri": "https://sample-vault.vault.azure.net/secrets/secret-name", + "secretUriWithVersion": "https://sample-vault.vault.azure.net/secrets/secret-name/b8c802f549764f2d97885d152f92ee9d" + } + } + } + } +} \ No newline at end of file diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/updateVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/updateVault.json new file mode 100644 index 000000000000..c1b9c1dc88ef --- /dev/null +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/examples/updateVault.json @@ -0,0 +1,203 @@ +{ + "parameters":{ + "resourceGroupName":"sample-resource-group", + "vaultName":"sample-vault", + "subscriptionId":"00000000-0000-0000-0000-000000000000", + "api-version":"2018-02-14-preview", + "parameters":{ + "properties":{ + "tenantId": "00000000-0000-0000-0000-000000000000", + "sku": {"family": "A", "name": "standard"}, + "accessPolicies":[{ + "tenantId": "00000000-0000-0000-0000-000000000000", + "objectId": "00000000-0000-0000-0000-000000000000", + "permissions": { + "keys": [ + "encrypt", + "decrypt", + "wrapKey", + "unwrapKey", + "sign", + "verify", + "get", + "list", + "create", + "update", + "import", + "delete", + "backup", + "restore", + "recover", + "purge" + ], + "secrets":[ + "get", + "list", + "set", + "delete", + "backup", + "restore", + "recover", + "purge" + ], + "certificates":[ + "get", + "list", + "delete", + "create", + "import", + "update", + "managecontacts", + "getissuers", + "listissuers", + "setissuers", + "deleteissuers", + "manageissuers", + "recover", + "purge" + ] + } + }], + "enabledForDeployment": true, + "enabledForDiskEncryption": true, + "enabledForTemplateDeployment": true + } + } + }, + "responses":{ + "200":{ + "body":{ + "id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-resource-group/providers/Microsoft.KeyVault/vaults/sample-vault", + "name":"sample-vault", + "type":"Microsoft.KeyVault/vaults", + "location":"westus", + "tags":{}, + "properties":{ + "sku":{"family":"A","name":"standard"}, + "tenantId":"00000000-0000-0000-0000-000000000000", + "accessPolicies":[{ + "tenantId": "00000000-0000-0000-0000-000000000000", + "objectId": "00000000-0000-0000-0000-000000000000", + "permissions": { + "keys": [ + "encrypt", + "decrypt", + "wrapKey", + "unwrapKey", + "sign", + "verify", + "get", + "list", + "create", + "update", + "import", + "delete", + "backup", + "restore", + "recover", + "purge" + ], + "secrets":[ + "get", + "list", + "set", + "delete", + "backup", + "restore", + "recover", + "purge" + ], + "certificates":[ + "get", + "list", + "delete", + "create", + "import", + "update", + "managecontacts", + "getissuers", + "listissuers", + "setissuers", + "deleteissuers", + "manageissuers", + "recover", + "purge" + ] + } + }], + "enabledForDeployment":true, + "enabledForDiskEncryption":true, + "enabledForTemplateDeployment":true, + "vaultUri":"https://sample-vault.vault.azure.net" + } + } + }, + "201":{ + "body":{ + "id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-resource-group/providers/Microsoft.KeyVault/vaults/sample-vault", + "name":"sample-vault", + "type":"Microsoft.KeyVault/vaults", + "location":"westus", + "tags":{}, + "properties":{ + "sku":{"family":"A","name":"standard"}, + "tenantId":"00000000-0000-0000-0000-000000000000", + "accessPolicies":[{ + "tenantId": "00000000-0000-0000-0000-000000000000", + "objectId": "00000000-0000-0000-0000-000000000000", + "permissions": { + "keys": [ + "encrypt", + "decrypt", + "wrapKey", + "unwrapKey", + "sign", + "verify", + "get", + "list", + "create", + "update", + "import", + "delete", + "backup", + "restore", + "recover", + "purge" + ], + "secrets":[ + "get", + "list", + "set", + "delete", + "backup", + "restore", + "recover", + "purge" + ], + "certificates":[ + "get", + "list", + "delete", + "create", + "import", + "update", + "managecontacts", + "getissuers", + "listissuers", + "setissuers", + "deleteissuers", + "manageissuers", + "recover", + "purge" + ] + } + }], + "enabledForDeployment":true, + "enabledForDiskEncryption":true, + "enabledForTemplateDeployment":true, + "vaultUri":"https://sample-vault.vault.azure.net" + } + } + } + } +} \ No newline at end of file diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/keyvault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/keyvault.json new file mode 100644 index 000000000000..4e6fc6ab77fb --- /dev/null +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/keyvault.json @@ -0,0 +1,1359 @@ +{ + "swagger": "2.0", + "info": { + "version": "2018-02-14-preview", + "title": "KeyVaultManagementClient", + "description": "The Azure management API provides a RESTful set of web services that interact with Azure Key Vault." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}": { + "put": { + "tags": [ + "Vaults" + ], + "operationId": "Vaults_CreateOrUpdate", + "x-ms-long-running-operation": true, + "description": "Create or update a key vault in the specified subscription.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Resource Group to which the server belongs." + }, + { + "name": "vaultName", + "in": "path", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$", + "description": "Name of the vault" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/VaultCreateOrUpdateParameters" + }, + "description": "Parameters to create or update the vault" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "201": { + "description": "Created or updated vault", + "schema": { + "$ref": "#/definitions/Vault" + } + }, + "200": { + "description": "Created or updated vault", + "schema": { + "$ref": "#/definitions/Vault" + } + } + }, + "x-ms-examples": { + "Create a new vault or update an existing vault": { + "$ref": "./examples//createVault.json" + }, + "Create or update a vault with network acls": { + "$ref": "./examples//createVaultWithNetworkAcls.json" + } + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ] + }, + "patch": { + "tags": [ + "Vaults" + ], + "operationId": "Vaults_Update", + "description": "Update a key vault in the specified subscription.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Resource Group to which the server belongs." + }, + { + "name": "vaultName", + "in": "path", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$", + "description": "Name of the vault" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/VaultPatchParameters" + }, + "description": "Parameters to patch the vault" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "201": { + "description": "Patched vault", + "schema": { + "$ref": "#/definitions/Vault" + } + }, + "200": { + "description": "Patched vault", + "schema": { + "$ref": "#/definitions/Vault" + } + } + }, + "x-ms-examples": { + "Update an existing vault": { + "$ref": "./examples//updateVault.json" + } + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ] + }, + "delete": { + "tags": [ + "Vaults" + ], + "operationId": "Vaults_Delete", + "description": "Deletes the specified Azure key vault.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Resource Group to which the vault belongs." + }, + { + "name": "vaultName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the vault to delete" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK Response." + } + }, + "x-ms-examples": { + "Delete a vault": { + "$ref": "./examples//deleteVault.json" + } + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ] + }, + "get": { + "tags": [ + "Vaults" + ], + "operationId": "Vaults_Get", + "description": "Gets the specified Azure key vault.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Resource Group to which the vault belongs." + }, + { + "name": "vaultName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the vault." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Retrieved vault", + "schema": { + "$ref": "#/definitions/Vault" + } + } + }, + "x-ms-examples": { + "Retrieve a vault": { + "$ref": "./examples//getVault.json" + } + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ] + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/accessPolicies/{operationKind}": { + "put": { + "tags": [ + "Vaults" + ], + "operationId": "Vaults_UpdateAccessPolicy", + "description": "Update access policies in a key vault in the specified subscription.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Resource Group to which the vault belongs." + }, + { + "name": "vaultName", + "in": "path", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$", + "description": "Name of the vault" + }, + { + "name": "operationKind", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "add", + "replace", + "remove" + ], + "x-ms-enum": { + "name": "AccessPolicyUpdateKind", + "modelAsString": false + }, + "description": "Name of the operation" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/VaultAccessPolicyParameters" + }, + "description": "Access policy to merge into the vault" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "201": { + "description": "The updated access policies", + "schema": { + "$ref": "#/definitions/VaultAccessPolicyParameters" + } + }, + "200": { + "description": "The updated access policies", + "schema": { + "$ref": "#/definitions/VaultAccessPolicyParameters" + } + } + }, + "x-ms-examples": { + "Add an access policy, or update an access policy with new permissions": { + "$ref": "./examples//updateAccessPoliciesAdd.json" + } + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ] + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults": { + "get": { + "tags": [ + "Vaults" + ], + "operationId": "Vaults_ListByResourceGroup", + "description": "The List operation gets information about the vaults associated with the subscription and within the specified resource group.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Resource Group to which the vault belongs." + }, + { + "name": "$top", + "in": "query", + "type": "integer", + "format": "int32", + "description": "Maximum number of results to return." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Get information about all key vaults in the specified resource group.", + "schema": { + "$ref": "#/definitions/VaultListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List vaults in the specified resource group": { + "$ref": "./examples//listVaultByResourceGroup.json" + } + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ] + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/vaults": { + "get": { + "tags": [ + "Vaults" + ], + "operationId": "Vaults_ListBySubscription", + "description": "The List operation gets information about the vaults associated with the subscription.", + "parameters": [ + { + "name": "$top", + "in": "query", + "type": "integer", + "format": "int32", + "description": "Maximum number of results to return." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Get information about all key vaults in the specified subscription.", + "schema": { + "$ref": "#/definitions/VaultListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List vaults in the specified subscription": { + "$ref": "./examples//listVaultBySubscription.json" + } + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ] + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/deletedVaults": { + "get": { + "tags": [ + "Vaults" + ], + "operationId": "Vaults_ListDeleted", + "description": "Gets information about the deleted vaults in a subscription.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Retrieved information about all deleted key vaults in a subscription.", + "schema": { + "$ref": "#/definitions/DeletedVaultListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List deleted vaults in the specified subscription": { + "$ref": "./examples//listDeletedVaults.json" + } + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ] + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedVaults/{vaultName}": { + "get": { + "tags": [ + "Vaults" + ], + "operationId": "Vaults_GetDeleted", + "description": "Gets the deleted Azure key vault.", + "parameters": [ + { + "name": "vaultName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the vault." + }, + { + "name": "location", + "in": "path", + "required": true, + "type": "string", + "description": "The location of the deleted vault." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Retrieved information about the deleted vault.", + "schema": { + "$ref": "#/definitions/DeletedVault" + } + } + }, + "x-ms-examples": { + "Retrieve a deleted vault": { + "$ref": "./examples//getDeletedVault.json" + } + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ] + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedVaults/{vaultName}/purge": { + "post": { + "tags": [ + "Vaults" + ], + "operationId": "Vaults_PurgeDeleted", + "x-ms-long-running-operation": true, + "description": "Permanently deletes the specified vault. aka Purges the deleted Azure key vault.", + "parameters": [ + { + "name": "vaultName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the soft-deleted vault." + }, + { + "name": "location", + "in": "path", + "required": true, + "type": "string", + "description": "The location of the soft-deleted vault." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "The vault is purged." + }, + "202": { + "description": "Vault is being purged." + } + }, + "x-ms-examples": { + "Purge a deleted vault": { + "$ref": "./examples//purgeDeletedVault.json" + } + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ] + } + }, + "/subscriptions/{subscriptionId}/resources": { + "get": { + "tags": [ + "Vaults" + ], + "operationId": "Vaults_List", + "description": "The List operation gets information about the vaults associated with the subscription.", + "parameters": [ + { + "name": "$filter", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "resourceType eq 'Microsoft.KeyVault/vaults'" + ], + "description": "The filter to apply on the operation." + }, + { + "name": "$top", + "in": "query", + "type": "integer", + "format": "int32", + "description": "Maximum number of results to return." + }, + { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "2015-11-01" + ], + "description": "Azure Resource Manager Api Version." + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Get information about all key vaults in the subscription.", + "schema": { + "$ref": "#/definitions/ResourceListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List vaults in the specified subscription": { + "$ref": "./examples//listVault.json" + } + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ] + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/checkNameAvailability": { + "post": { + "tags": [ + "Vaults" + ], + "operationId": "Vaults_CheckNameAvailability", + "description": "Checks that the vault name is valid and is not already in use.", + "parameters": [ + { + "name": "vaultName", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/VaultCheckNameAvailabilityParameters" + }, + "description": "The name of the vault." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK -- Operation to check the vault name availability was successful.", + "schema": { + "$ref": "#/definitions/CheckNameAvailabilityResult" + } + } + }, + "x-ms-examples": { + "Validate a vault name": { + "$ref": "./examples//checkVaultNameAvailability.json" + } + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ] + } + } + }, + "definitions": { + "Sku": { + "properties": { + "family": { + "type": "string", + "description": "SKU family name", + "enum": [ + "A" + ], + "x-ms-enum": { + "name": "SkuFamily", + "modelAsString": true + } + }, + "name": { + "type": "string", + "description": "SKU name to specify whether the key vault is a standard vault or a premium vault.", + "enum": [ + "standard", + "premium" + ], + "x-ms-enum": { + "name": "SkuName", + "modelAsString": false + } + } + }, + "description": "SKU details", + "required": [ + "name", + "family" + ] + }, + "AccessPolicyEntry": { + "properties": { + "tenantId": { + "type": "string", + "format": "uuid", + "description": "The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault." + }, + "objectId": { + "type": "string", + "description": "The object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. The object ID must be unique for the list of access policies." + }, + "applicationId": { + "type": "string", + "format": "uuid", + "description": " Application ID of the client making request on behalf of a principal" + }, + "permissions": { + "$ref": "#/definitions/Permissions", + "description": "Permissions the identity has for keys, secrets and certificates." + } + }, + "description": "An identity that have access to the key vault. All identities in the array must use the same tenant ID as the key vault's tenant ID.", + "required": [ + "tenantId", + "objectId", + "permissions" + ] + }, + "Permissions": { + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "encrypt", + "decrypt", + "wrapKey", + "unwrapKey", + "sign", + "verify", + "get", + "list", + "create", + "update", + "import", + "delete", + "backup", + "restore", + "recover", + "purge" + ], + "x-ms-enum": { + "name": "KeyPermissions", + "modelAsString": true + } + }, + "description": "Permissions to keys" + }, + "secrets": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "get", + "list", + "set", + "delete", + "backup", + "restore", + "recover", + "purge" + ], + "x-ms-enum": { + "name": "SecretPermissions", + "modelAsString": true + } + }, + "description": "Permissions to secrets" + }, + "certificates": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "get", + "list", + "delete", + "create", + "import", + "update", + "managecontacts", + "getissuers", + "listissuers", + "setissuers", + "deleteissuers", + "manageissuers", + "recover", + "purge" + ], + "x-ms-enum": { + "name": "CertificatePermissions", + "modelAsString": true + } + }, + "description": "Permissions to certificates" + }, + "storage": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "get", + "list", + "delete", + "set", + "update", + "regeneratekey", + "recover", + "purge", + "backup", + "restore", + "setsas", + "listsas", + "getsas", + "deletesas" + ], + "x-ms-enum": { + "name": "StoragePermissions", + "modelAsString": true + } + }, + "description": "Permissions to storage accounts" + } + }, + "description": "Permissions the identity has for keys, secrets, certificates and storage." + }, + "VaultProperties": { + "properties": { + "tenantId": { + "type": "string", + "format": "uuid", + "description": "The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault." + }, + "sku": { + "$ref": "#/definitions/Sku", + "description": "SKU details" + }, + "accessPolicies": { + "type": "array", + "items": { + "$ref": "#/definitions/AccessPolicyEntry" + }, + "description": "An array of 0 to 16 identities that have access to the key vault. All identities in the array must use the same tenant ID as the key vault's tenant ID." + }, + "vaultUri": { + "type": "string", + "description": "The URI of the vault for performing operations on keys and secrets.", + "readOnly": true + }, + "enabledForDeployment": { + "type": "boolean", + "description": "Property to specify whether Azure Virtual Machines are permitted to retrieve certificates stored as secrets from the key vault." + }, + "enabledForDiskEncryption": { + "type": "boolean", + "description": "Property to specify whether Azure Disk Encryption is permitted to retrieve secrets from the vault and unwrap keys." + }, + "enabledForTemplateDeployment": { + "type": "boolean", + "description": "Property to specify whether Azure Resource Manager is permitted to retrieve secrets from the key vault." + }, + "enableSoftDelete": { + "type": "boolean", + "description": "Property to specify whether the 'soft delete' functionality is enabled for this key vault. It does not accept false value." + }, + "createMode": { + "type": "string", + "description": "The vault's create mode to indicate whether the vault need to be recovered or not.", + "enum": [ + "recover", + "default" + ], + "x-ms-enum": { + "name": "CreateMode", + "modelAsString": false + } + }, + "enablePurgeProtection": { + "type": "boolean", + "description": "Property specifying whether protection against purge is enabled for this vault. Setting this property to true activates protection against purge for this vault and its content - only the Key Vault service may initiate a hard, irrecoverable deletion. The setting is effective only if soft delete is also enabled. Enabling this functionality is irreversible - that is, the property does not accept false as its value." + }, + "networkAcls": { + "$ref": "#/definitions/NetworkRuleSet", + "description": "A collection of rules governing the accessibility of the vault from specific network locations." + } + }, + "required": [ + "tenantId", + "sku" + ], + "description": "Properties of the vault" + }, + "VaultPatchProperties": { + "properties": { + "tenantId": { + "type": "string", + "format": "uuid", + "description": "The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault." + }, + "sku": { + "$ref": "#/definitions/Sku", + "description": "SKU details" + }, + "accessPolicies": { + "type": "array", + "items": { + "$ref": "#/definitions/AccessPolicyEntry" + }, + "description": "An array of 0 to 16 identities that have access to the key vault. All identities in the array must use the same tenant ID as the key vault's tenant ID." + }, + "enabledForDeployment": { + "type": "boolean", + "description": "Property to specify whether Azure Virtual Machines are permitted to retrieve certificates stored as secrets from the key vault." + }, + "enabledForDiskEncryption": { + "type": "boolean", + "description": "Property to specify whether Azure Disk Encryption is permitted to retrieve secrets from the vault and unwrap keys." + }, + "enabledForTemplateDeployment": { + "type": "boolean", + "description": "Property to specify whether Azure Resource Manager is permitted to retrieve secrets from the key vault." + }, + "enableSoftDelete": { + "type": "boolean", + "description": "Property to specify whether the 'soft delete' functionality is enabled for this key vault. It does not accept false value." + }, + "createMode": { + "type": "string", + "description": "The vault's create mode to indicate whether the vault need to be recovered or not.", + "enum": [ + "recover", + "default" + ], + "x-ms-enum": { + "name": "CreateMode", + "modelAsString": false + } + }, + "enablePurgeProtection": { + "type": "boolean", + "description": "Property specifying whether protection against purge is enabled for this vault. Setting this property to true activates protection against purge for this vault and its content - only the Key Vault service may initiate a hard, irrecoverable deletion. The setting is effective only if soft delete is also enabled. Enabling this functionality is irreversible - that is, the property does not accept false as its value." + }, + "networkAcls": { + "$ref": "#/definitions/NetworkRuleSet", + "description": "A collection of rules governing the accessibility of the vault from specific network locations." + } + }, + "description": "Properties of the vault" + }, + "VaultAccessPolicyProperties": { + "properties": { + "accessPolicies": { + "type": "array", + "items": { + "$ref": "#/definitions/AccessPolicyEntry" + }, + "description": "An array of 0 to 16 identities that have access to the key vault. All identities in the array must use the same tenant ID as the key vault's tenant ID." + } + }, + "required": [ + "accessPolicies" + ], + "description": "Properties of the vault access policy" + }, + "DeletedVaultProperties": { + "properties": { + "vaultId": { + "readOnly": true, + "type": "string", + "description": "The resource id of the original vault." + }, + "location": { + "readOnly": true, + "type": "string", + "description": "The location of the original vault." + }, + "deletionDate": { + "readOnly": true, + "type": "string", + "format": "date-time", + "description": "The deleted date." + }, + "scheduledPurgeDate": { + "readOnly": true, + "type": "string", + "format": "date-time", + "description": "The scheduled purged date." + }, + "tags": { + "readOnly": true, + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Tags of the original vault." + } + }, + "description": "Properties of the deleted vault." + }, + "VaultCreateOrUpdateParameters": { + "properties": { + "location": { + "type": "string", + "description": "The supported Azure location where the key vault should be created." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The tags that will be assigned to the key vault." + }, + "properties": { + "$ref": "#/definitions/VaultProperties", + "description": "Properties of the vault" + } + }, + "description": "Parameters for creating or updating a vault", + "required": [ + "location", + "properties" + ], + "x-ms-azure-resource": true + }, + "VaultPatchParameters": { + "properties": { + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The tags that will be assigned to the key vault. " + }, + "properties": { + "$ref": "#/definitions/VaultPatchProperties", + "description": "Properties of the vault" + } + }, + "description": "Parameters for creating or updating a vault", + "x-ms-azure-resource": true + }, + "VaultAccessPolicyParameters": { + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "The resource id of the access policy." + }, + "name": { + "readOnly": true, + "type": "string", + "description": "The resource name of the access policy." + }, + "type": { + "readOnly": true, + "type": "string", + "description": "The resource name of the access policy." + }, + "location": { + "readOnly": true, + "type": "string", + "description": "The resource type of the the access policy." + }, + "properties": { + "$ref": "#/definitions/VaultAccessPolicyProperties", + "description": "Properties of the access policy" + } + }, + "description": "Parameters for updating the access policy in a vault", + "required": [ + "properties" + ], + "x-ms-azure-resource": true + }, + "Vault": { + "properties": { + "properties": { + "$ref": "#/definitions/VaultProperties", + "description": "Properties of the vault" + } + }, + "required": [ + "properties" + ], + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "description": "Resource information with extended details." + }, + "DeletedVault": { + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "The resource ID for the deleted key vault." + }, + "name": { + "readOnly": true, + "type": "string", + "description": "The name of the key vault." + }, + "type": { + "readOnly": true, + "type": "string", + "description": "The resource type of the key vault." + }, + "properties": { + "$ref": "#/definitions/DeletedVaultProperties", + "description": "Properties of the vault" + } + }, + "description": "Deleted vault information with extended details." + }, + "VaultListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Vault" + }, + "description": "The list of vaults." + }, + "nextLink": { + "type": "string", + "description": "The URL to get the next set of vaults." + } + }, + "description": "List of vaults" + }, + "DeletedVaultListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/DeletedVault" + }, + "description": "The list of deleted vaults." + }, + "nextLink": { + "type": "string", + "description": "The URL to get the next set of deleted vaults." + } + }, + "description": "List of vaults" + }, + "ResourceListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Resource" + }, + "description": "The list of vault resources." + }, + "nextLink": { + "type": "string", + "description": "The URL to get the next set of vault resources." + } + }, + "description": "List of vault resources." + }, + "Resource": { + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "The Azure Resource Manager resource ID for the key vault." + }, + "name": { + "readOnly": true, + "type": "string", + "description": "The name of the key vault." + }, + "type": { + "readOnly": true, + "type": "string", + "description": "The resource type of the key vault." + }, + "location": { + "type": "string", + "description": "The supported Azure location where the key vault should be created." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The tags that will be assigned to the key vault. " + } + }, + "description": "Key Vault resource", + "required": [ + "location" + ], + "x-ms-azure-resource": true + }, + "VaultCheckNameAvailabilityParameters": { + "properties": { + "name": { + "type": "string", + "description": "The vault name." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.KeyVault/vaults" + ], + "x-ms-enum": { + "name": "Type", + "modelAsString": false + }, + "description": "The type of resource, Microsoft.KeyVault/vaults" + } + }, + "required": [ + "name", + "type" + ], + "description": "The parameters used to check the availabity of the vault name." + }, + "CheckNameAvailabilityResult": { + "properties": { + "nameAvailable": { + "readOnly": true, + "type": "boolean", + "description": "A boolean value that indicates whether the name is available for you to use. If true, the name is available. If false, the name has already been taken or is invalid and cannot be used." + }, + "reason": { + "readOnly": true, + "type": "string", + "description": "The reason that a vault name could not be used. The Reason element is only returned if NameAvailable is false.", + "enum": [ + "AccountNameInvalid", + "AlreadyExists" + ], + "x-ms-enum": { + "name": "Reason", + "modelAsString": false + } + }, + "message": { + "readOnly": true, + "type": "string", + "description": "An error message explaining the Reason value in more detail." + } + }, + "description": "The CheckNameAvailability operation response." + }, + "NetworkRuleSet": { + "properties": { + "bypass": { + "type": "string", + "description": "Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not specified the default is 'AzureServices'.", + "enum": [ + "AzureServices", + "None" + ], + "x-ms-enum": { + "name": "NetworkRuleBypassOptions", + "modelAsString": true + } + }, + "defaultAction": { + "type": "string", + "description": "The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property has been evaluated.", + "enum": [ + "Allow", + "Deny" + ], + "x-ms-enum": { + "name": "NetworkRuleAction", + "modelAsString": true + } + }, + "ipRules": { + "type": "array", + "items": { + "$ref": "#/definitions/IPRule" + }, + "description": "The list of IP address rules." + }, + "virtualNetworkRules": { + "type": "array", + "items": { + "$ref": "#/definitions/VirtualNetworkRule" + }, + "description": "The list of virtual network rules." + } + }, + "description": "A set of rules governing the network accessibility of a vault." + }, + "IPRule": { + "properties": { + "value": { + "type": "string", + "description": "An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or '124.56.78.0/24' (all addresses that start with 124.56.78)." + } + }, + "required": [ + "value" + ], + "description": "A rule governing the accesibility of a vault from a specific ip address or ip range." + }, + "VirtualNetworkRule": { + "properties": { + "id": { + "type": "string", + "description": "Full resource id of a vnet subnet, such as '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'." + } + }, + "required": [ + "id" + ], + "description": "A rule governing the accesibility of a vault from a specific virtual network." + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call." + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client Api Version." + } + }, + "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" + } + } + } +} \ No newline at end of file diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/providers.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/providers.json new file mode 100644 index 000000000000..d87f095207da --- /dev/null +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/providers.json @@ -0,0 +1,180 @@ +{ + "swagger": "2.0", + "info": { + "version": "2018-02-14-preview", + "title": "KeyVaultManagementClient", + "description": "The Azure management API provides a RESTful set of web services that interact with Azure Key Vault." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "paths": { + "/providers/Microsoft.KeyVault/operations": { + "get": { + "tags": [ + "Operations" + ], + "description": "Lists all of the available Key Vault Rest API operations.", + "operationId": "Operations_List", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Lists available Rest API operations.": { + "$ref": "./examples//listOperations.json" + } + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ] + } + } + }, + "definitions": { + "OperationListResult": { + "description": "Result of the request to list Storage operations. It contains a list of operations and a URL link to get the next set of results.", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + }, + "description": "List of Storage operations supported by the Storage resource provider." + }, + "nextLink": { + "type": "string", + "description": "The URL to get the next set of operations." + } + } + }, + "Operation": { + "description": "Key Vault REST API operation definition.", + "type": "object", + "properties": { + "name": { + "description": "Operation name: {provider}/{resource}/{operation}", + "type": "string" + }, + "display": { + "description": "Display metadata associated with the operation.", + "properties": { + "provider": { + "description": "Service provider: Microsoft Key Vault.", + "type": "string" + }, + "resource": { + "description": "Resource on which the operation is performed etc.", + "type": "string" + }, + "operation": { + "description": "Type of operation: get, read, delete, etc.", + "type": "string" + }, + "description": { + "description": "Decription of operation.", + "type": "string" + } + } + }, + "origin": { + "type": "string", + "description": "The origin of operations." + }, + "properties": { + "description": "Properties of operation, include metric specifications.", + "x-ms-client-flatten": true, + "x-ms-client-name": "OperationProperties", + "$ref": "#/definitions/OperationProperties" + } + } + }, + "OperationProperties": { + "description": "Properties of operation, include metric specifications.", + "properties": { + "serviceSpecification": { + "$ref": "#/definitions/ServiceSpecification", + "description": "One property of operation, include metric specifications." + } + } + }, + "ServiceSpecification": { + "description": "One property of operation, include log specifications.", + "properties": { + "logSpecifications": { + "description": "Log specifications of operation.", + "type": "array", + "items": { + "$ref": "#/definitions/LogSpecification" + } + } + } + }, + "LogSpecification": { + "description": "Log specification of operation.", + "properties": { + "name": { + "type": "string", + "description": "Name of log specification." + }, + "displayName": { + "type": "string", + "description": "Display name of log specification." + }, + "blobDuration": { + "type": "string", + "description": "Blob duration of specification." + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call." + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client Api Version." + } + }, + "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" + } + } + } +} \ No newline at end of file diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/secrets.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/secrets.json new file mode 100644 index 000000000000..178fd23b0299 --- /dev/null +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2018-02-14-preview/secrets.json @@ -0,0 +1,459 @@ +{ + "swagger": "2.0", + "info": { + "version": "2018-02-14-preview", + "title": "KeyVaultManagementClient", + "description": "The Azure management API provides a RESTful set of web services that interact with Azure Key Vault." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{secretName}": { + "put": { + "tags": [ + "Secrets" + ], + "operationId": "Secrets_CreateOrUpdate", + "description": "Create or update a secret in a key vault in the specified subscription. NOTE: This API is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Resource Group to which the vault belongs." + }, + { + "name": "vaultName", + "in": "path", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$", + "description": "Name of the vault" + }, + { + "name": "secretName", + "in": "path", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{1,127}$", + "description": "Name of the secret" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SecretCreateOrUpdateParameters" + }, + "description": "Parameters to create or update the secret" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "201": { + "description": "Created or updated vault", + "schema": { + "$ref": "#/definitions/Secret" + } + }, + "200": { + "description": "Created or updated secret", + "schema": { + "$ref": "#/definitions/Secret" + } + } + }, + "x-ms-examples": { + "Create a secret": { + "$ref": "./examples//createSecret.json" + } + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ] + }, + "patch": { + "tags": [ + "Secrets" + ], + "operationId": "Secrets_Update", + "description": "Update a secret in the specified subscription. NOTE: This API is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Resource Group to which the vault belongs." + }, + { + "name": "vaultName", + "in": "path", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$", + "description": "Name of the vault" + }, + { + "name": "secretName", + "in": "path", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{1,127}$", + "description": "Name of the secret" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SecretPatchParameters" + }, + "description": "Parameters to patch the secret" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "201": { + "description": "Patched secret", + "schema": { + "$ref": "#/definitions/Secret" + } + }, + "200": { + "description": "Patched secret", + "schema": { + "$ref": "#/definitions/Secret" + } + } + }, + "x-ms-examples": { + "Update a secret": { + "$ref": "./examples//updateSecret.json" + } + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ] + }, + "get": { + "tags": [ + "Secrets" + ], + "operationId": "Secrets_Get", + "description": "Gets the specified secret. NOTE: This API is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Resource Group to which the vault belongs." + }, + { + "name": "vaultName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the vault." + }, + { + "name": "secretName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the secret." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Retrieved secret", + "schema": { + "$ref": "#/definitions/Secret" + } + } + }, + "x-ms-examples": { + "Get a secret": { + "$ref": "./examples//getSecret.json" + } + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ] + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets": { + "get": { + "tags": [ + "Secrets" + ], + "operationId": "Secrets_List", + "description": "The List operation gets information about the secrets in a vault. NOTE: This API is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Resource Group to which the vault belongs." + }, + { + "name": "vaultName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the vault." + }, + { + "name": "$top", + "in": "query", + "type": "integer", + "format": "int32", + "description": "Maximum number of results to return." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Get information about secrets in the specified vault.", + "schema": { + "$ref": "#/definitions/SecretListResult" + } + } + }, + "x-ms-examples": { + "List secrets in the vault": { + "$ref": "./examples//listSecrets.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ] + } + } + }, + "definitions": { + "Attributes": { + "properties": { + "enabled": { + "type": "boolean", + "description": "Determines whether the object is enabled." + }, + "nbf": { + "x-ms-client-name": "NotBefore", + "type": "integer", + "format": "unixtime", + "description": "Not before date in UTC." + }, + "exp": { + "x-ms-client-name": "Expires", + "type": "integer", + "format": "unixtime", + "description": "Expiry date in UTC." + }, + "created": { + "type": "integer", + "format": "unixtime", + "readOnly": true, + "description": "Creation time in UTC." + }, + "updated": { + "type": "integer", + "format": "unixtime", + "readOnly": true, + "description": "Last updated time in UTC." + } + }, + "description": "The object attributes managed by the KeyVault service." + }, + "SecretProperties": { + "properties": { + "value": { + "type": "string", + "description": "The value of the secret. NOTE: 'value' will never be returned from the service, as APIs using this model are is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets." + }, + "contentType": { + "type": "string", + "description": "The content type of the secret." + }, + "attributes": { + "$ref": "#/definitions/SecretAttributes", + "description": "The attributes of the secret." + }, + "secretUri": { + "type": "string", + "description": "The URI to retrieve the current version of the secret.", + "readOnly": true + }, + "secretUriWithVersion": { + "type": "string", + "description": "The URI to retrieve the specific version of the secret.", + "readOnly": true + } + }, + "description": "Properties of the secret" + }, + "SecretPatchProperties": { + "properties": { + "value": { + "type": "string", + "description": "The value of the secret." + }, + "contentType": { + "type": "string", + "description": "The content type of the secret." + }, + "attributes": { + "$ref": "#/definitions/SecretAttributes", + "description": "The attributes of the secret." + } + }, + "description": "Properties of the secret" + }, + "SecretAttributes": { + "allOf": [ + { + "$ref": "#/definitions/Attributes" + } + ], + "description": "The secret management attributes." + }, + "SecretCreateOrUpdateParameters": { + "properties": { + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The tags that will be assigned to the secret. " + }, + "properties": { + "$ref": "#/definitions/SecretProperties", + "description": "Properties of the secret" + } + }, + "description": "Parameters for creating or updating a secret", + "required": [ + "properties" + ], + "x-ms-azure-resource": true + }, + "SecretPatchParameters": { + "properties": { + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The tags that will be assigned to the secret. " + }, + "properties": { + "$ref": "#/definitions/SecretPatchProperties", + "description": "Properties of the secret" + } + }, + "description": "Parameters for patching a secret", + "x-ms-azure-resource": true + }, + "Secret": { + "properties": { + "properties": { + "$ref": "#/definitions/SecretProperties", + "description": "Properties of the secret" + } + }, + "required": [ + "properties" + ], + "allOf": [ + { + "$ref": "./keyvault.json#/definitions/Resource" + } + ], + "description": "Resource information with extended details." + }, + "SecretListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Secret" + }, + "description": "The list of secrets." + }, + "nextLink": { + "type": "string", + "description": "The URL to get the next set of secrets." + } + }, + "description": "List of secrets" + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call." + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client Api Version." + } + }, + "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" + } + } + } +} \ No newline at end of file diff --git a/specification/keyvault/resource-manager/readme.md b/specification/keyvault/resource-manager/readme.md index 4d3a66b472f3..77ccec02bea8 100644 --- a/specification/keyvault/resource-manager/readme.md +++ b/specification/keyvault/resource-manager/readme.md @@ -26,10 +26,22 @@ These are the global settings for the KeyVault API. ``` yaml openapi-type: arm -tag: package-2016-10 +tag: package-2018-02 ``` +### Tag: package-2018-02 + +These settings apply only when `--tag=package-2018-02` is specified on the command line. + +``` yaml $(tag) == 'package-2018-02' +input-file: +- Microsoft.KeyVault/preview/2018-02-14-preview/keyvault.json +- Microsoft.KeyVault/preview/2018-02-14-preview/providers.json +``` + + + ### Tag: package-2016-10 These settings apply only when `--tag=package-2016-10` is specified on the command line.