diff --git a/sdk/keyvault/arm-keyvault/LICENSE.txt b/sdk/keyvault/arm-keyvault/LICENSE.txt index b73b4a1293c3..2d3163745319 100644 --- a/sdk/keyvault/arm-keyvault/LICENSE.txt +++ b/sdk/keyvault/arm-keyvault/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 Microsoft +Copyright (c) 2021 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/keyvault/arm-keyvault/README.md b/sdk/keyvault/arm-keyvault/README.md index cb4e1c2970d8..abf737ad9c2c 100644 --- a/sdk/keyvault/arm-keyvault/README.md +++ b/sdk/keyvault/arm-keyvault/README.md @@ -1,11 +1,11 @@ ## Azure KeyVaultManagementClient SDK for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for KeyVaultManagementClient. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for KeyVaultManagementClient. ### Currently supported environments - [LTS versions of Node.js](https://nodejs.org/about/releases/) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. ### Prerequisites @@ -21,7 +21,6 @@ Install both packages using the below command: ```bash npm install --save @azure/arm-keyvault @azure/identity ``` - > **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. @@ -37,8 +36,7 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/ In the below samples, we pass the credential and the Azure subscription id to instantiate the client. Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. - -#### nodejs - Authentication, client creation, and get vaults as an example written in JavaScript. +#### nodejs - Authentication, client creation, and get keys as an example written in JavaScript. ##### Sample code @@ -53,7 +51,8 @@ const creds = new DefaultAzureCredential(); const client = new KeyVaultManagementClient(creds, subscriptionId); const resourceGroupName = "testresourceGroupName"; const vaultName = "testvaultName"; -client.vaults.get(resourceGroupName, vaultName).then((result) => { +const keyName = "testkeyName"; +client.keys.get(resourceGroupName, vaultName, keyName).then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { @@ -62,7 +61,7 @@ client.vaults.get(resourceGroupName, vaultName).then((result) => { }); ``` -#### browser - Authentication, client creation, and get vaults as an example written in JavaScript. +#### browser - Authentication, client creation, and get keys as an example written in JavaScript. In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. @@ -87,12 +86,13 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t const credential = new InteractiveBrowserCredential( { clientId: "", - tenantId: "" + tenant: "" }); const client = new Azure.ArmKeyvault.KeyVaultManagementClient(creds, subscriptionId); const resourceGroupName = "testresourceGroupName"; const vaultName = "testvaultName"; - client.vaults.get(resourceGroupName, vaultName).then((result) => { + const keyName = "testkeyName"; + client.keys.get(resourceGroupName, vaultName, keyName).then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { @@ -109,4 +109,4 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/.\sdk\keyvault\arm-keyvault\/README.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/keyvault/arm-keyvault/README.png) diff --git a/sdk/keyvault/arm-keyvault/package.json b/sdk/keyvault/arm-keyvault/package.json index 3ba64338f1bc..ce37258bb363 100644 --- a/sdk/keyvault/arm-keyvault/package.json +++ b/sdk/keyvault/arm-keyvault/package.json @@ -4,10 +4,10 @@ "description": "KeyVaultManagementClient Library with typescript type definitions for node.js and browser.", "version": "1.3.2", "dependencies": { - "@azure/ms-rest-azure-js": "^1.4.0", - "@azure/ms-rest-js": "^1.11.0", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", "@azure/core-auth": "^1.1.4", - "tslib": "^1.9.3" + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -22,18 +22,18 @@ "types": "./esm/keyVaultManagementClient.d.ts", "devDependencies": { "typescript": "^3.6.0", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", - "uglify-js": "^3.4.9" + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/keyvault/arm-keyvault", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/keyvault/arm-keyvault", "repository": { "type": "git", - "url": "https://github.com/azure/azure-sdk-for-js.git" + "url": "https://github.com/Azure/azure-sdk-for-js.git" }, "bugs": { - "url": "https://github.com/azure/azure-sdk-for-js/issues" + "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", diff --git a/sdk/keyvault/arm-keyvault/rollup.config.js b/sdk/keyvault/arm-keyvault/rollup.config.js index fdc2d21a8733..70cbe1c376cf 100644 --- a/sdk/keyvault/arm-keyvault/rollup.config.js +++ b/sdk/keyvault/arm-keyvault/rollup.config.js @@ -21,15 +21,15 @@ const config = { "@azure/ms-rest-azure-js": "msRestAzure" }, banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, plugins: [ - nodeResolve({ module: true }), + nodeResolve({ mainFields: ['module', 'main'] }), sourcemaps() ] }; diff --git a/sdk/keyvault/arm-keyvault/src/keyVaultManagementClient.ts b/sdk/keyvault/arm-keyvault/src/keyVaultManagementClient.ts index de68187485e8..098a60249ea5 100644 --- a/sdk/keyvault/arm-keyvault/src/keyVaultManagementClient.ts +++ b/sdk/keyvault/arm-keyvault/src/keyVaultManagementClient.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -18,8 +17,15 @@ import { KeyVaultManagementClientContext } from "./keyVaultManagementClientConte class KeyVaultManagementClient extends KeyVaultManagementClientContext { // Operation groups + keys: operations.Keys; vaults: operations.Vaults; + privateEndpointConnections: operations.PrivateEndpointConnections; + privateLinkResources: operations.PrivateLinkResources; + managedHsms: operations.ManagedHsms; + mHSMPrivateEndpointConnections: operations.MHSMPrivateEndpointConnections; + mHSMPrivateLinkResources: operations.MHSMPrivateLinkResources; operations: operations.Operations; + secrets: operations.Secrets; /** * Initializes a new instance of the KeyVaultManagementClient class. @@ -35,8 +41,15 @@ class KeyVaultManagementClient extends KeyVaultManagementClientContext { */ constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.KeyVaultManagementClientOptions) { super(credentials, subscriptionId, options); + this.keys = new operations.Keys(this); this.vaults = new operations.Vaults(this); + this.privateEndpointConnections = new operations.PrivateEndpointConnections(this); + this.privateLinkResources = new operations.PrivateLinkResources(this); + this.managedHsms = new operations.ManagedHsms(this); + this.mHSMPrivateEndpointConnections = new operations.MHSMPrivateEndpointConnections(this); + this.mHSMPrivateLinkResources = new operations.MHSMPrivateLinkResources(this); this.operations = new operations.Operations(this); + this.secrets = new operations.Secrets(this); } } diff --git a/sdk/keyvault/arm-keyvault/src/keyVaultManagementClientContext.ts b/sdk/keyvault/arm-keyvault/src/keyVaultManagementClientContext.ts index f2372d7d28a2..36bbde146c84 100644 --- a/sdk/keyvault/arm-keyvault/src/keyVaultManagementClientContext.ts +++ b/sdk/keyvault/arm-keyvault/src/keyVaultManagementClientContext.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -10,8 +9,8 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-keyvault"; const packageVersion = "1.3.2"; @@ -51,7 +50,7 @@ export class KeyVaultManagementClientContext extends msRestAzure.AzureServiceCli super(credentials, options); - this.apiVersion = '2018-02-14'; + this.apiVersion = '2021-06-01-preview'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/keyvault/arm-keyvault/src/models/index.ts b/sdk/keyvault/arm-keyvault/src/models/index.ts index f6d55103853c..e6a682850c11 100644 --- a/sdk/keyvault/arm-keyvault/src/models/index.ts +++ b/sdk/keyvault/arm-keyvault/src/models/index.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -11,6 +11,373 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; +/** + * Metadata pertaining to creation and last modification of the key vault resource. + */ +export interface SystemData { + /** + * The identity that created the key vault resource. + */ + createdBy?: string; + /** + * The type of identity that created the key vault resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + createdByType?: IdentityType; + /** + * The timestamp of the key vault resource creation (UTC). + */ + createdAt?: Date; + /** + * The identity that last modified the key vault resource. + */ + lastModifiedBy?: string; + /** + * The type of identity that last modified the key vault resource. Possible values include: + * 'User', 'Application', 'ManagedIdentity', 'Key' + */ + lastModifiedByType?: IdentityType; + /** + * The timestamp of the key vault resource last modification (UTC). + */ + lastModifiedAt?: Date; +} + +/** + * The object attributes managed by the Azure Key Vault service. + */ +export interface KeyAttributes { + /** + * Determines whether or not the object is enabled. + */ + enabled?: boolean; + /** + * Not before date in seconds since 1970-01-01T00:00:00Z. + */ + notBefore?: number; + /** + * Expiry date in seconds since 1970-01-01T00:00:00Z. + */ + expires?: number; + /** + * Creation time in seconds since 1970-01-01T00:00:00Z. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly created?: number; + /** + * Last updated time in seconds since 1970-01-01T00:00:00Z. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly updated?: number; + /** + * The deletion recovery level currently in effect for the object. If it contains 'Purgeable', + * then the object can be permanently deleted by a privileged user; otherwise, only the system + * can purge the object at the end of the retention interval. Possible values include: + * 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', 'Recoverable+ProtectedSubscription' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly recoveryLevel?: DeletionRecoveryLevel; + /** + * Indicates if the private key can be exported. + */ + exportable?: boolean; +} + +/** + * An interface representing KeyRotationPolicyAttributes. + */ +export interface KeyRotationPolicyAttributes { + /** + * Creation time in seconds since 1970-01-01T00:00:00Z. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly created?: number; + /** + * Last updated time in seconds since 1970-01-01T00:00:00Z. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly updated?: number; + /** + * The expiration time for the new key version. It should be in ISO8601 format. Eg: 'P90D', + * 'P1Y'. + */ + expiryTime?: string; +} + +/** + * An interface representing Trigger. + */ +export interface Trigger { + /** + * The time duration after key creation to rotate the key. It only applies to rotate. It will be + * in ISO 8601 duration format. Eg: 'P90D', 'P1Y'. + */ + timeAfterCreate?: string; + /** + * The time duration before key expiring to rotate or notify. It will be in ISO 8601 duration + * format. Eg: 'P90D', 'P1Y'. + */ + timeBeforeExpiry?: string; +} + +/** + * An interface representing Action. + */ +export interface Action { + /** + * The type of action. Possible values include: 'rotate', 'notify' + */ + type?: KeyRotationPolicyActionType; +} + +/** + * An interface representing LifetimeAction. + */ +export interface LifetimeAction { + /** + * The trigger of key rotation policy lifetimeAction. + */ + trigger?: Trigger; + /** + * The action of key rotation policy lifetimeAction. + */ + action?: Action; +} + +/** + * An interface representing RotationPolicy. + */ +export interface RotationPolicy { + /** + * The attributes of key rotation policy. + */ + attributes?: KeyRotationPolicyAttributes; + /** + * The lifetimeActions for key rotation action. + */ + lifetimeActions?: LifetimeAction[]; +} + +/** + * An interface representing KeyReleasePolicy. + */ +export interface KeyReleasePolicy { + /** + * Content type and version of key release policy. Default value: 'application/json; + * charset=utf-8'. + */ + contentType?: string; + /** + * Blob encoding the policy rules under which the key can be released. + */ + data?: Uint8Array; +} + +/** + * The properties of the key. + */ +export interface KeyProperties { + /** + * The attributes of the key. + */ + attributes?: KeyAttributes; + /** + * The type of the key. For valid values, see JsonWebKeyType. Possible values include: 'EC', + * 'EC-HSM', 'RSA', 'RSA-HSM' + */ + kty?: JsonWebKeyType; + keyOps?: JsonWebKeyOperation[]; + /** + * The key size in bits. For example: 2048, 3072, or 4096 for RSA. + */ + keySize?: number; + /** + * The elliptic curve name. For valid values, see JsonWebKeyCurveName. Possible values include: + * 'P-256', 'P-384', 'P-521', 'P-256K' + */ + curveName?: JsonWebKeyCurveName; + /** + * The URI to retrieve the current version of the key. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly keyUri?: string; + /** + * The URI to retrieve the specific version of the key. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly keyUriWithVersion?: string; + /** + * Key rotation policy in response. It will be used for both output and input. Omitted if empty + */ + rotationPolicy?: RotationPolicy; + /** + * Key release policy in response. It will be used for both output and input. Omitted if empty + */ + releasePolicy?: KeyReleasePolicy; +} + +/** + * The parameters used to create a key. + */ +export interface KeyCreateParameters extends BaseResource { + /** + * The tags that will be assigned to the key. + */ + tags?: { [propertyName: string]: string }; + /** + * The properties of the key to be created. + */ + properties: KeyProperties; +} + +/** + * Key Vault resource + */ +export interface Resource extends BaseResource { + /** + * Fully qualified identifier of the key vault resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Name of the key vault resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Resource type of the key vault resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Azure location of the key vault resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly location?: string; + /** + * Tags assigned to the key vault resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tags?: { [propertyName: string]: string }; +} + +/** + * The key resource. + */ +export interface Key extends Resource { + /** + * The attributes of the key. + */ + attributes?: KeyAttributes; + /** + * The type of the key. For valid values, see JsonWebKeyType. Possible values include: 'EC', + * 'EC-HSM', 'RSA', 'RSA-HSM' + */ + kty?: JsonWebKeyType; + keyOps?: JsonWebKeyOperation[]; + /** + * The key size in bits. For example: 2048, 3072, or 4096 for RSA. + */ + keySize?: number; + /** + * The elliptic curve name. For valid values, see JsonWebKeyCurveName. Possible values include: + * 'P-256', 'P-384', 'P-521', 'P-256K' + */ + curveName?: JsonWebKeyCurveName; + /** + * The URI to retrieve the current version of the key. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly keyUri?: string; + /** + * The URI to retrieve the specific version of the key. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly keyUriWithVersion?: string; + /** + * Key rotation policy in response. It will be used for both output and input. Omitted if empty + */ + rotationPolicy?: RotationPolicy; + /** + * Key release policy in response. It will be used for both output and input. Omitted if empty + */ + releasePolicy?: KeyReleasePolicy; +} + +/** + * A private link resource + */ +export interface PrivateLinkResource extends Resource { + /** + * Group identifier of private link resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly groupId?: string; + /** + * Required member names of private link resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly requiredMembers?: string[]; + /** + * Required DNS zone names of the the private link resource. + */ + requiredZoneNames?: string[]; +} + +/** + * An object that represents the approval state of the private link connection. + */ +export interface PrivateLinkServiceConnectionState { + /** + * Indicates whether the connection has been approved, rejected or removed by the key vault + * owner. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' + */ + status?: PrivateEndpointServiceConnectionStatus; + /** + * The reason for approval or rejection. + */ + description?: string; + /** + * A message indicating if changes on the service provider require any updates on the consumer. + * Possible values include: 'None' + */ + actionsRequired?: ActionsRequired; +} + +/** + * Private endpoint object properties. + */ +export interface PrivateEndpoint { + /** + * Full identifier of the private endpoint resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; +} + +/** + * Private endpoint connection resource. + */ +export interface PrivateEndpointConnection extends BaseResource { + /** + * Properties of the private endpoint object. + */ + privateEndpoint?: PrivateEndpoint; + /** + * Approval state of the private link connection. + */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; + /** + * Provisioning state of the private endpoint connection. Possible values include: 'Succeeded', + * 'Creating', 'Updating', 'Deleting', 'Failed', 'Disconnected' + */ + provisioningState?: PrivateEndpointConnectionProvisioningState; + /** + * Modified whenever there is a change in the state of private endpoint connection. + */ + etag?: string; +} + /** * SKU details */ @@ -89,6 +456,11 @@ export interface VirtualNetworkRule { * '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. */ id: string; + /** + * Property to specify whether NRP will ignore the check if parent subnet has serviceEndpoints + * configured. + */ + ignoreMissingVnetServiceEndpoint?: boolean; } /** @@ -115,6 +487,33 @@ export interface NetworkRuleSet { virtualNetworkRules?: VirtualNetworkRule[]; } +/** + * Private endpoint connection item. + */ +export interface PrivateEndpointConnectionItem { + /** + * Id of private endpoint connection. + */ + id?: string; + /** + * Modified whenever there is a change in the state of private endpoint connection. + */ + etag?: string; + /** + * Properties of the private endpoint object. + */ + privateEndpoint?: PrivateEndpoint; + /** + * Approval state of the private link connection. + */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; + /** + * Provisioning state of the private endpoint connection. Possible values include: 'Succeeded', + * 'Creating', 'Updating', 'Deleting', 'Failed', 'Disconnected' + */ + provisioningState?: PrivateEndpointConnectionProvisioningState; +} + /** * Properties of the vault */ @@ -129,8 +528,8 @@ export interface VaultProperties { */ sku: Sku; /** - * 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. When `createMode` is set to + * An array of 0 to 1024 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. When `createMode` is set to * `recover`, access policies are not required. Otherwise, access policies are required. */ accessPolicies?: AccessPolicyEntry[]; @@ -138,6 +537,11 @@ export interface VaultProperties { * The URI of the vault for performing operations on keys and secrets. */ vaultUri?: string; + /** + * The resource id of HSM Pool. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly hsmPoolResourceId?: string; /** * Property to specify whether Azure Virtual Machines are permitted to retrieve certificates * stored as secrets from the key vault. @@ -154,10 +558,25 @@ export interface VaultProperties { */ enabledForTemplateDeployment?: boolean; /** - * Property to specify whether the 'soft delete' functionality is enabled for this key vault. It - * does not accept false value. + * Property to specify whether the 'soft delete' functionality is enabled for this key vault. If + * it's not set to any value(true or false) when creating new key vault, it will be set to true + * by default. Once set to true, it cannot be reverted to false. Default value: true. */ enableSoftDelete?: boolean; + /** + * softDelete data retention days. It accepts >=7 and <=90. Default value: 90. + */ + softDeleteRetentionInDays?: number; + /** + * Property that controls how data actions are authorized. When true, the key vault will use Role + * Based Access Control (RBAC) for authorization of data actions, and the access policies + * specified in vault properties will be ignored (warning: this is a preview feature). When + * false, the key vault will use the access policies specified in vault properties, and any + * policy stored on Azure Resource Manager will be ignored. If null or not specified, the vault + * is created with the default value of false. Note that management actions are always authorized + * with RBAC. Default value: false. + */ + enableRbacAuthorization?: boolean; /** * The vault's create mode to indicate whether the vault need to be recovered or not. Possible * values include: 'recover', 'default' @@ -172,10 +591,25 @@ export interface VaultProperties { */ enablePurgeProtection?: boolean; /** - * A collection of rules governing the accessibility of the vault from specific network - * locations. + * Rules governing the accessibility of the key vault from specific network locations. */ networkAcls?: NetworkRuleSet; + /** + * Provisioning state of the vault. Possible values include: 'Succeeded', 'RegisteringDns' + */ + provisioningState?: VaultProvisioningState; + /** + * List of private endpoint connections associated with the key vault. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly privateEndpointConnections?: PrivateEndpointConnectionItem[]; + /** + * Property to specify whether the vault will accept traffic from public internet. If set to + * 'disabled' all traffic except private endpoint traffic and that that originates from trusted + * services will be blocked. This will override the set firewall rules, meaning that even if the + * firewall rules are present we will not honor the rules. Default value: 'enabled'. + */ + publicNetworkAccess?: string; } /** @@ -212,10 +646,23 @@ export interface VaultPatchProperties { */ enabledForTemplateDeployment?: boolean; /** - * Property to specify whether the 'soft delete' functionality is enabled for this key vault. It - * does not accept false value. + * Property to specify whether the 'soft delete' functionality is enabled for this key vault. + * Once set to true, it cannot be reverted to false. */ enableSoftDelete?: boolean; + /** + * Property that controls how data actions are authorized. When true, the key vault will use Role + * Based Access Control (RBAC) for authorization of data actions, and the access policies + * specified in vault properties will be ignored (warning: this is a preview feature). When + * false, the key vault will use the access policies specified in vault properties, and any + * policy stored on Azure Resource Manager will be ignored. If null or not specified, the value + * of this property will not change. + */ + enableRbacAuthorization?: boolean; + /** + * softDelete data retention days. It accepts >=7 and <=90. + */ + softDeleteRetentionInDays?: number; /** * The vault's create mode to indicate whether the vault need to be recovered or not. Possible * values include: 'recover', 'default' @@ -234,6 +681,13 @@ export interface VaultPatchProperties { * locations. */ networkAcls?: NetworkRuleSet; + /** + * Property to specify whether the vault will accept traffic from public internet. If set to + * 'disabled' all traffic except private endpoint traffic and that that originates from trusted + * services will be blocked. This will override the set firewall rules, meaning that even if the + * firewall rules are present we will not honor the rules. + */ + publicNetworkAccess?: string; } /** @@ -276,6 +730,11 @@ export interface DeletedVaultProperties { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly tags?: { [propertyName: string]: string }; + /** + * Purge protection status of the original vault. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly purgeProtectionEnabled?: boolean; } /** @@ -341,38 +800,36 @@ export interface VaultAccessPolicyParameters extends BaseResource { } /** - * Key Vault resource + * Resource information with extended details. */ -export interface Resource extends BaseResource { +export interface Vault extends BaseResource { /** - * The Azure Resource Manager resource ID for the key vault. + * Fully qualified identifier of the key vault resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * The name of the key vault. + * Name of the key vault resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * The resource type of the key vault. + * Resource type of the key vault resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; /** - * The supported Azure location where the key vault should be created. + * Azure location of the key vault resource. */ - location: string; + location?: string; /** - * The tags that will be assigned to the key vault. + * Tags assigned to the key vault resource. */ tags?: { [propertyName: string]: string }; -} - -/** - * Resource information with extended details. - */ -export interface Vault extends Resource { + /** + * System metadata for the key vault. + */ + systemData?: SystemData; /** * Properties of the vault */ @@ -438,251 +895,1891 @@ export interface CheckNameAvailabilityResult { } /** - * Display metadata associated with the operation. + * A list of private link resources */ -export interface OperationDisplay { +export interface PrivateLinkResourceListResult { /** - * Service provider: Microsoft Key Vault. + * Array of private link resources */ - provider?: string; + value?: PrivateLinkResource[]; +} + +/** + * SKU details + */ +export interface ManagedHsmSku { /** - * Resource on which the operation is performed etc. + * SKU of the managed HSM Pool. Possible values include: 'Standard_B1', 'Custom_B32' */ - resource?: string; + name: ManagedHsmSkuName; +} + +/** + * A rule governing the accessibility of a managed hsm pool from a specific ip address or ip range. + */ +export interface MHSMIPRule { /** - * Type of operation: get, read, delete, etc. + * 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). */ - operation?: string; + value: string; +} + +/** + * A rule governing the accessibility of a managed hsm pool from a specific virtual network. + */ +export interface MHSMVirtualNetworkRule { /** - * Description of operation. + * Full resource id of a vnet subnet, such as + * '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. + */ + id: string; +} + +/** + * A set of rules governing the network accessibility of a managed hsm pool. + */ +export interface MHSMNetworkRuleSet { + /** + * Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not + * specified the default is 'AzureServices'. Possible values include: 'AzureServices', 'None' + */ + bypass?: NetworkRuleBypassOptions; + /** + * The default action when no rule from ipRules and from virtualNetworkRules match. This is only + * used after the bypass property has been evaluated. Possible values include: 'Allow', 'Deny' + */ + defaultAction?: NetworkRuleAction; + /** + * The list of IP address rules. + */ + ipRules?: MHSMIPRule[]; + /** + * The list of virtual network rules. + */ + virtualNetworkRules?: MHSMVirtualNetworkRule[]; +} + +/** + * Private endpoint object properties. + */ +export interface MHSMPrivateEndpoint { + /** + * Full identifier of the private endpoint resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; +} + +/** + * An object that represents the approval state of the private link connection. + */ +export interface MHSMPrivateLinkServiceConnectionState { + /** + * Indicates whether the connection has been approved, rejected or removed by the key vault + * owner. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' + */ + status?: PrivateEndpointServiceConnectionStatus; + /** + * The reason for approval or rejection. */ description?: string; + /** + * A message indicating if changes on the service provider require any updates on the consumer. + * Possible values include: 'None' + */ + actionsRequired?: ActionsRequired; } /** - * Log specification of operation. + * Private endpoint connection item. */ -export interface LogSpecification { +export interface MHSMPrivateEndpointConnectionItem { /** - * Name of log specification. + * Properties of the private endpoint object. */ - name?: string; + privateEndpoint?: MHSMPrivateEndpoint; /** - * Display name of log specification. + * Approval state of the private link connection. */ - displayName?: string; + privateLinkServiceConnectionState?: MHSMPrivateLinkServiceConnectionState; /** - * Blob duration of specification. + * Provisioning state of the private endpoint connection. Possible values include: 'Succeeded', + * 'Creating', 'Updating', 'Deleting', 'Failed', 'Disconnected' */ - blobDuration?: string; + provisioningState?: PrivateEndpointConnectionProvisioningState; } /** - * One property of operation, include log specifications. + * Properties of the managed HSM Pool */ -export interface ServiceSpecification { +export interface ManagedHsmProperties { /** - * Log specifications of operation. + * The Azure Active Directory tenant ID that should be used for authenticating requests to the + * managed HSM pool. */ - logSpecifications?: LogSpecification[]; + tenantId?: string; + /** + * Array of initial administrators object ids for this managed hsm pool. + */ + initialAdminObjectIds?: string[]; + /** + * The URI of the managed hsm pool for performing operations on keys. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly hsmUri?: string; + /** + * Property to specify whether the 'soft delete' functionality is enabled for this managed HSM + * pool. If it's not set to any value(true or false) when creating new managed HSM pool, it will + * be set to true by default. Once set to true, it cannot be reverted to false. Default value: + * true. + */ + enableSoftDelete?: boolean; + /** + * softDelete data retention days. It accepts >=7 and <=90. Default value: 90. + */ + softDeleteRetentionInDays?: number; + /** + * Property specifying whether protection against purge is enabled for this managed HSM pool. + * Setting this property to true activates protection against purge for this managed HSM pool and + * its content - only the Managed HSM service may initiate a hard, irrecoverable deletion. The + * setting is effective only if soft delete is also enabled. Enabling this functionality is + * irreversible. Default value: true. + */ + enablePurgeProtection?: boolean; + /** + * The create mode to indicate whether the resource is being created or is being recovered from a + * deleted resource. Possible values include: 'recover', 'default' + */ + createMode?: CreateMode; + /** + * Resource Status Message. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly statusMessage?: string; + /** + * Provisioning state. Possible values include: 'Succeeded', 'Provisioning', 'Failed', + * 'Updating', 'Deleting', 'Activated', 'SecurityDomainRestore', 'Restoring' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ProvisioningState; + /** + * Rules governing the accessibility of the key vault from specific network locations. + */ + networkAcls?: MHSMNetworkRuleSet; + /** + * List of private endpoint connections associated with the managed hsm pool. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly privateEndpointConnections?: MHSMPrivateEndpointConnectionItem[]; + /** + * Control permission for data plane traffic coming from public networks while private endpoint + * is enabled. Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccess; + /** + * The scheduled purge date in UTC. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly scheduledPurgeDate?: Date; } /** - * Key Vault REST API operation definition. + * Managed HSM resource */ -export interface Operation { +export interface ManagedHsmResource extends BaseResource { /** - * Operation name: {provider}/{resource}/{operation} + * The Azure Resource Manager resource ID for the managed HSM Pool. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - name?: string; + readonly id?: string; /** - * Display metadata associated with the operation. + * The name of the managed HSM Pool. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - display?: OperationDisplay; + readonly name?: string; /** - * The origin of operations. + * The resource type of the managed HSM Pool. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - origin?: string; + readonly type?: string; /** - * One property of operation, include metric specifications. + * The supported Azure location where the managed HSM Pool should be created. */ - serviceSpecification?: ServiceSpecification; + location?: string; + /** + * SKU details + */ + sku?: ManagedHsmSku; + /** + * Resource tags + */ + tags?: { [propertyName: string]: string }; + systemData?: SystemData; } /** - * Optional Parameters. + * Resource information with extended details. */ -export interface VaultsListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { +export interface ManagedHsm extends ManagedHsmResource { /** - * Maximum number of results to return. + * Properties of the managed HSM */ - top?: number; + properties?: ManagedHsmProperties; } /** - * Optional Parameters. + * Private endpoint connection resource. */ -export interface VaultsListBySubscriptionOptionalParams extends msRest.RequestOptionsBase { +export interface MHSMPrivateEndpointConnection extends BaseResource { /** - * Maximum number of results to return. + * Properties of the private endpoint object. */ - top?: number; + privateEndpoint?: MHSMPrivateEndpoint; + /** + * Approval state of the private link connection. + */ + privateLinkServiceConnectionState?: MHSMPrivateLinkServiceConnectionState; + /** + * Provisioning state of the private endpoint connection. Possible values include: 'Succeeded', + * 'Creating', 'Updating', 'Deleting', 'Failed', 'Disconnected' + */ + provisioningState?: PrivateEndpointConnectionProvisioningState; + /** + * Modified whenever there is a change in the state of private endpoint connection. + */ + etag?: string; } /** - * Optional Parameters. + * The server error. */ -export interface VaultsListOptionalParams extends msRest.RequestOptionsBase { +export interface ErrorModel { /** - * Maximum number of results to return. + * The error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top?: number; + readonly code?: string; + /** + * The error message. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly message?: string; + /** + * The inner error, contains a more specific error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly innerError?: ErrorModel; } /** - * An interface representing KeyVaultManagementClientOptions. + * The error exception. */ -export interface KeyVaultManagementClientOptions extends AzureServiceClientOptions { - baseUri?: string; +export interface ManagedHsmError { + /** + * The server error. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly error?: ErrorModel; } /** - * @interface - * List of vaults - * @extends Array + * Properties of the deleted managed HSM. */ -export interface VaultListResult extends Array { +export interface DeletedManagedHsmProperties { /** - * The URL to get the next set of vaults. + * The resource id of the original managed HSM. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - nextLink?: string; + readonly mhsmId?: string; + /** + * The location of the original managed HSM. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly location?: string; + /** + * The deleted date. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly deletionDate?: Date; + /** + * The scheduled purged date. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly scheduledPurgeDate?: Date; + /** + * Purge protection status of the original managed HSM. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly purgeProtectionEnabled?: boolean; + /** + * Tags of the original managed HSM. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tags?: { [propertyName: string]: string }; +} + +/** + * An interface representing DeletedManagedHsm. + */ +export interface DeletedManagedHsm { + /** + * The Azure Resource Manager resource ID for the deleted managed HSM Pool. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The name of the managed HSM Pool. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The resource type of the managed HSM Pool. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Properties of the deleted managed HSM + */ + properties?: DeletedManagedHsmProperties; } /** - * @interface - * List of vaults - * @extends Array + * A private link resource + */ +export interface MHSMPrivateLinkResource extends ManagedHsmResource { + /** + * Group identifier of private link resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly groupId?: string; + /** + * Required member names of private link resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly requiredMembers?: string[]; + /** + * Required DNS zone names of the the private link resource. + */ + requiredZoneNames?: string[]; +} + +/** + * A list of private link resources + */ +export interface MHSMPrivateLinkResourceListResult { + /** + * Array of private link resources + */ + value?: MHSMPrivateLinkResource[]; +} + +/** + * Display metadata associated with the operation. + */ +export interface OperationDisplay { + /** + * Service provider: Microsoft Key Vault. + */ + provider?: string; + /** + * Resource on which the operation is performed etc. + */ + resource?: string; + /** + * Type of operation: get, read, delete, etc. + */ + operation?: string; + /** + * Description of operation. + */ + description?: string; +} + +/** + * Log specification of operation. + */ +export interface LogSpecification { + /** + * Name of log specification. + */ + name?: string; + /** + * Display name of log specification. + */ + displayName?: string; + /** + * Blob duration of specification. + */ + blobDuration?: string; +} + +/** + * Type of operation: get, read, delete, etc. + */ +export interface DimensionProperties { + /** + * Name of dimension. + */ + name?: string; + /** + * Display name of dimension. + */ + displayName?: string; + /** + * Property to specify whether the dimension should be exported for Shoebox. + */ + toBeExportedForShoebox?: boolean; +} + +/** + * Metric specification of operation. + */ +export interface MetricSpecification { + /** + * Name of metric specification. + */ + name?: string; + /** + * Display name of metric specification. + */ + displayName?: string; + /** + * Display description of metric specification. + */ + displayDescription?: string; + /** + * The metric unit. Possible values include: 'Bytes', 'Count', 'Milliseconds'. + */ + unit?: string; + /** + * The metric aggregation type. Possible values include: 'Average', 'Count', 'Total'. + */ + aggregationType?: string; + /** + * The supported aggregation types for the metrics. + */ + supportedAggregationTypes?: string[]; + /** + * The supported time grain types for the metrics. + */ + supportedTimeGrainTypes?: string[]; + /** + * The metric lock aggregation type. + */ + lockAggregationType?: string; + /** + * The dimensions of metric + */ + dimensions?: DimensionProperties[]; + /** + * Property to specify whether to fill gap with zero. + */ + fillGapWithZero?: boolean; + /** + * The internal metric name. + */ + internalMetricName?: string; +} + +/** + * One property of operation, include log specifications. + */ +export interface ServiceSpecification { + /** + * Log specifications of operation. + */ + logSpecifications?: LogSpecification[]; + /** + * Metric specifications of operation. + */ + metricSpecifications?: MetricSpecification[]; +} + +/** + * Key Vault REST API operation definition. + */ +export interface Operation { + /** + * Operation name: {provider}/{resource}/{operation} + */ + name?: string; + /** + * Display metadata associated with the operation. + */ + display?: OperationDisplay; + /** + * The origin of operations. + */ + origin?: string; + /** + * One property of operation, include metric specifications. + */ + serviceSpecification?: ServiceSpecification; + /** + * Property to specify whether the action is a data action. + */ + isDataAction?: boolean; +} + +/** + * The object attributes managed by the KeyVault service. + */ +export interface Attributes { + /** + * Determines whether the object is enabled. + */ + enabled?: boolean; + /** + * Not before date in seconds since 1970-01-01T00:00:00Z. + */ + notBefore?: Date; + /** + * Expiry date in seconds since 1970-01-01T00:00:00Z. + */ + expires?: Date; + /** + * Creation time in seconds since 1970-01-01T00:00:00Z. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly created?: Date; + /** + * Last updated time in seconds since 1970-01-01T00:00:00Z. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly updated?: Date; +} + +/** + * The secret management attributes. + */ +export interface SecretAttributes extends Attributes { +} + +/** + * Properties of the secret + */ +export interface SecretProperties { + /** + * 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. + */ + value?: string; + /** + * The content type of the secret. + */ + contentType?: string; + /** + * The attributes of the secret. + */ + attributes?: SecretAttributes; + /** + * The URI to retrieve the current version of the secret. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly secretUri?: string; + /** + * The URI to retrieve the specific version of the secret. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly secretUriWithVersion?: string; +} + +/** + * Properties of the secret + */ +export interface SecretPatchProperties { + /** + * The value of the secret. + */ + value?: string; + /** + * The content type of the secret. + */ + contentType?: string; + /** + * The attributes of the secret. + */ + attributes?: SecretAttributes; +} + +/** + * Parameters for creating or updating a secret + */ +export interface SecretCreateOrUpdateParameters extends BaseResource { + /** + * The tags that will be assigned to the secret. + */ + tags?: { [propertyName: string]: string }; + /** + * Properties of the secret + */ + properties: SecretProperties; +} + +/** + * Parameters for patching a secret + */ +export interface SecretPatchParameters extends BaseResource { + /** + * The tags that will be assigned to the secret. + */ + tags?: { [propertyName: string]: string }; + /** + * Properties of the secret + */ + properties?: SecretPatchProperties; +} + +/** + * Resource information with extended details. + */ +export interface Secret extends Resource { + /** + * Properties of the secret + */ + properties: SecretProperties; +} + +/** + * Optional Parameters. + */ +export interface VaultsListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { + /** + * Maximum number of results to return. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface VaultsListBySubscriptionOptionalParams extends msRest.RequestOptionsBase { + /** + * Maximum number of results to return. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface VaultsListOptionalParams extends msRest.RequestOptionsBase { + /** + * Maximum number of results to return. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface VaultsListByResourceGroupNextOptionalParams extends msRest.RequestOptionsBase { + /** + * Maximum number of results to return. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface VaultsListBySubscriptionNextOptionalParams extends msRest.RequestOptionsBase { + /** + * Maximum number of results to return. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface VaultsListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * Maximum number of results to return. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface ManagedHsmsListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { + /** + * Maximum number of results to return. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface ManagedHsmsListBySubscriptionOptionalParams extends msRest.RequestOptionsBase { + /** + * Maximum number of results to return. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface ManagedHsmsListByResourceGroupNextOptionalParams extends msRest.RequestOptionsBase { + /** + * Maximum number of results to return. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface ManagedHsmsListBySubscriptionNextOptionalParams extends msRest.RequestOptionsBase { + /** + * Maximum number of results to return. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface SecretsListOptionalParams extends msRest.RequestOptionsBase { + /** + * Maximum number of results to return. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface SecretsListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * Maximum number of results to return. + */ + top?: number; +} + +/** + * An interface representing KeyVaultManagementClientOptions. + */ +export interface KeyVaultManagementClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * Defines headers for Put operation. + */ +export interface PrivateEndpointConnectionsPutHeaders { + /** + * (specified only if operation does not finish synchronously) The recommended number of seconds + * to wait before calling the URI specified in Azure-AsyncOperation. + */ + retryAfter: number; + /** + * (specified only if operation does not finish synchronously) The URI to poll for completion + * status. The response of this URI may be synchronous or asynchronous. + */ + azureAsyncOperation: string; +} + +/** + * Defines headers for Delete operation. + */ +export interface PrivateEndpointConnectionsDeleteHeaders { + /** + * The recommended number of seconds to wait before calling the URI specified in the location + * header. + */ + retryAfter: number; + /** + * The URI to poll for completion status. + */ + locationHeader: string; +} + +/** + * Defines headers for Put operation. + */ +export interface MHSMPrivateEndpointConnectionsPutHeaders { + /** + * (specified only if operation does not finish synchronously) The recommended number of seconds + * to wait before calling the URI specified in Azure-AsyncOperation. + */ + retryAfter: number; + /** + * (specified only if operation does not finish synchronously) The URI to poll for completion + * status. The response of this URI may be synchronous or asynchronous. + */ + azureAsyncOperation: string; +} + +/** + * Defines headers for Delete operation. + */ +export interface MHSMPrivateEndpointConnectionsDeleteHeaders { + /** + * The recommended number of seconds to wait before calling the URI specified in the location + * header. + */ + retryAfter: number; + /** + * The URI to poll for completion status. + */ + locationHeader: string; +} + +/** + * @interface + * The page of keys. + * @extends Array + */ +export interface KeyListResult extends Array { + /** + * The URL to get the next page of keys. + */ + nextLink?: string; +} + +/** + * @interface + * List of vaults + * @extends Array + */ +export interface VaultListResult extends Array { + /** + * The URL to get the next set of vaults. + */ + nextLink?: string; +} + +/** + * @interface + * List of vaults + * @extends Array + */ +export interface DeletedVaultListResult extends Array { + /** + * The URL to get the next set of deleted vaults. + */ + nextLink?: string; +} + +/** + * @interface + * List of vault resources. + * @extends Array + */ +export interface ResourceListResult extends Array { + /** + * The URL to get the next set of vault resources. + */ + nextLink?: string; +} + +/** + * @interface + * List of private endpoint connections. + * @extends Array + */ +export interface PrivateEndpointConnectionListResult extends Array { + /** + * The URL to get the next set of private endpoint connections. + */ + nextLink?: string; +} + +/** + * @interface + * List of managed HSM Pools + * @extends Array + */ +export interface ManagedHsmListResult extends Array { + /** + * The URL to get the next set of managed HSM Pools. + */ + nextLink?: string; +} + +/** + * @interface + * List of deleted managed HSM Pools + * @extends Array + */ +export interface DeletedManagedHsmListResult extends Array { + /** + * The URL to get the next set of deleted managed HSM Pools. + */ + nextLink?: string; +} + +/** + * @interface + * List of private endpoint connections associated with a managed HSM Pools + * @extends Array + */ +export interface MHSMPrivateEndpointConnectionsListResult extends Array { + /** + * The URL to get the next set of managed HSM Pools. + */ + nextLink?: string; +} + +/** + * @interface + * 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. + * @extends Array + */ +export interface OperationListResult extends Array { + /** + * The URL to get the next set of operations. + */ + nextLink?: string; +} + +/** + * @interface + * List of secrets + * @extends Array + */ +export interface SecretListResult extends Array { + /** + * The URL to get the next set of secrets. + */ + nextLink?: string; +} + +/** + * Defines values for IdentityType. + * Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + * @readonly + * @enum {string} + */ +export type IdentityType = 'User' | 'Application' | 'ManagedIdentity' | 'Key'; + +/** + * Defines values for DeletionRecoveryLevel. + * Possible values include: 'Purgeable', 'Recoverable+Purgeable', 'Recoverable', + * 'Recoverable+ProtectedSubscription' + * @readonly + * @enum {string} + */ +export type DeletionRecoveryLevel = 'Purgeable' | 'Recoverable+Purgeable' | 'Recoverable' | 'Recoverable+ProtectedSubscription'; + +/** + * Defines values for JsonWebKeyType. + * Possible values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM' + * @readonly + * @enum {string} + */ +export type JsonWebKeyType = 'EC' | 'EC-HSM' | 'RSA' | 'RSA-HSM'; + +/** + * Defines values for JsonWebKeyOperation. + * Possible values include: 'encrypt', 'decrypt', 'sign', 'verify', 'wrapKey', 'unwrapKey', + * 'import' + * @readonly + * @enum {string} + */ +export type JsonWebKeyOperation = 'encrypt' | 'decrypt' | 'sign' | 'verify' | 'wrapKey' | 'unwrapKey' | 'import'; + +/** + * Defines values for JsonWebKeyCurveName. + * Possible values include: 'P-256', 'P-384', 'P-521', 'P-256K' + * @readonly + * @enum {string} + */ +export type JsonWebKeyCurveName = 'P-256' | 'P-384' | 'P-521' | 'P-256K'; + +/** + * Defines values for KeyRotationPolicyActionType. + * Possible values include: 'rotate', 'notify' + * @readonly + * @enum {string} + */ +export type KeyRotationPolicyActionType = 'rotate' | 'notify'; + +/** + * Defines values for PrivateEndpointConnectionProvisioningState. + * Possible values include: 'Succeeded', 'Creating', 'Updating', 'Deleting', 'Failed', + * 'Disconnected' + * @readonly + * @enum {string} + */ +export type PrivateEndpointConnectionProvisioningState = 'Succeeded' | 'Creating' | 'Updating' | 'Deleting' | 'Failed' | 'Disconnected'; + +/** + * Defines values for PrivateEndpointServiceConnectionStatus. + * Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' + * @readonly + * @enum {string} + */ +export type PrivateEndpointServiceConnectionStatus = 'Pending' | 'Approved' | 'Rejected' | 'Disconnected'; + +/** + * Defines values for ActionsRequired. + * Possible values include: 'None' + * @readonly + * @enum {string} + */ +export type ActionsRequired = 'None'; + +/** + * Defines values for SkuName. + * Possible values include: 'standard', 'premium' + * @readonly + * @enum {string} + */ +export type SkuName = 'standard' | 'premium'; + +/** + * Defines values for KeyPermissions. + * Possible values include: 'all', 'encrypt', 'decrypt', 'wrapKey', 'unwrapKey', 'sign', 'verify', + * 'get', 'list', 'create', 'update', 'import', 'delete', 'backup', 'restore', 'recover', 'purge', + * 'release', 'rotate' + * @readonly + * @enum {string} + */ +export type KeyPermissions = 'all' | 'encrypt' | 'decrypt' | 'wrapKey' | 'unwrapKey' | 'sign' | 'verify' | 'get' | 'list' | 'create' | 'update' | 'import' | 'delete' | 'backup' | 'restore' | 'recover' | 'purge' | 'release' | 'rotate'; + +/** + * Defines values for SecretPermissions. + * Possible values include: 'all', 'get', 'list', 'set', 'delete', 'backup', 'restore', 'recover', + * 'purge' + * @readonly + * @enum {string} + */ +export type SecretPermissions = 'all' | 'get' | 'list' | 'set' | 'delete' | 'backup' | 'restore' | 'recover' | 'purge'; + +/** + * Defines values for CertificatePermissions. + * Possible values include: 'all', 'get', 'list', 'delete', 'create', 'import', 'update', + * 'managecontacts', 'getissuers', 'listissuers', 'setissuers', 'deleteissuers', 'manageissuers', + * 'recover', 'purge', 'backup', 'restore' + * @readonly + * @enum {string} + */ +export type CertificatePermissions = 'all' | 'get' | 'list' | 'delete' | 'create' | 'import' | 'update' | 'managecontacts' | 'getissuers' | 'listissuers' | 'setissuers' | 'deleteissuers' | 'manageissuers' | 'recover' | 'purge' | 'backup' | 'restore'; + +/** + * Defines values for StoragePermissions. + * Possible values include: 'all', 'get', 'list', 'delete', 'set', 'update', 'regeneratekey', + * 'recover', 'purge', 'backup', 'restore', 'setsas', 'listsas', 'getsas', 'deletesas' + * @readonly + * @enum {string} + */ +export type StoragePermissions = 'all' | 'get' | 'list' | 'delete' | 'set' | 'update' | 'regeneratekey' | 'recover' | 'purge' | 'backup' | 'restore' | 'setsas' | 'listsas' | 'getsas' | 'deletesas'; + +/** + * Defines values for CreateMode. + * Possible values include: 'recover', 'default' + * @readonly + * @enum {string} + */ +export type CreateMode = 'recover' | 'default'; + +/** + * Defines values for NetworkRuleBypassOptions. + * Possible values include: 'AzureServices', 'None' + * @readonly + * @enum {string} + */ +export type NetworkRuleBypassOptions = 'AzureServices' | 'None'; + +/** + * Defines values for NetworkRuleAction. + * Possible values include: 'Allow', 'Deny' + * @readonly + * @enum {string} + */ +export type NetworkRuleAction = 'Allow' | 'Deny'; + +/** + * Defines values for VaultProvisioningState. + * Possible values include: 'Succeeded', 'RegisteringDns' + * @readonly + * @enum {string} + */ +export type VaultProvisioningState = 'Succeeded' | 'RegisteringDns'; + +/** + * Defines values for Reason. + * Possible values include: 'AccountNameInvalid', 'AlreadyExists' + * @readonly + * @enum {string} + */ +export type Reason = 'AccountNameInvalid' | 'AlreadyExists'; + +/** + * Defines values for ManagedHsmSkuName. + * Possible values include: 'Standard_B1', 'Custom_B32' + * @readonly + * @enum {string} + */ +export type ManagedHsmSkuName = 'Standard_B1' | 'Custom_B32'; + +/** + * Defines values for ProvisioningState. + * Possible values include: 'Succeeded', 'Provisioning', 'Failed', 'Updating', 'Deleting', + * 'Activated', 'SecurityDomainRestore', 'Restoring' + * @readonly + * @enum {string} + */ +export type ProvisioningState = 'Succeeded' | 'Provisioning' | 'Failed' | 'Updating' | 'Deleting' | 'Activated' | 'SecurityDomainRestore' | 'Restoring'; + +/** + * Defines values for PublicNetworkAccess. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type PublicNetworkAccess = 'Enabled' | 'Disabled'; + +/** + * Defines values for AccessPolicyUpdateKind. + * Possible values include: 'add', 'replace', 'remove' + * @readonly + * @enum {string} + */ +export type AccessPolicyUpdateKind = 'add' | 'replace' | 'remove'; + +/** + * Contains response data for the createIfNotExist operation. + */ +export type KeysCreateIfNotExistResponse = Key & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Key; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type KeysGetResponse = Key & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Key; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type KeysListResponse = KeyListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: KeyListResult; + }; +}; + +/** + * Contains response data for the getVersion operation. + */ +export type KeysGetVersionResponse = Key & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Key; + }; +}; + +/** + * Contains response data for the listVersions operation. + */ +export type KeysListVersionsResponse = KeyListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: KeyListResult; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type KeysListNextResponse = KeyListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: KeyListResult; + }; +}; + +/** + * Contains response data for the listVersionsNext operation. + */ +export type KeysListVersionsNextResponse = KeyListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: KeyListResult; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type VaultsCreateOrUpdateResponse = Vault & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Vault; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type VaultsUpdateResponse = Vault & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Vault; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type VaultsGetResponse = Vault & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Vault; + }; +}; + +/** + * Contains response data for the updateAccessPolicy operation. + */ +export type VaultsUpdateAccessPolicyResponse = VaultAccessPolicyParameters & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: VaultAccessPolicyParameters; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type VaultsListByResourceGroupResponse = VaultListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: VaultListResult; + }; +}; + +/** + * Contains response data for the listBySubscription operation. + */ +export type VaultsListBySubscriptionResponse = VaultListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: VaultListResult; + }; +}; + +/** + * Contains response data for the listDeleted operation. + */ +export type VaultsListDeletedResponse = DeletedVaultListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DeletedVaultListResult; + }; +}; + +/** + * Contains response data for the getDeleted operation. + */ +export type VaultsGetDeletedResponse = DeletedVault & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DeletedVault; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type VaultsListResponse = ResourceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ResourceListResult; + }; +}; + +/** + * Contains response data for the checkNameAvailability operation. + */ +export type VaultsCheckNameAvailabilityResponse = CheckNameAvailabilityResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CheckNameAvailabilityResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type VaultsBeginCreateOrUpdateResponse = Vault & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Vault; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type VaultsListByResourceGroupNextResponse = VaultListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: VaultListResult; + }; +}; + +/** + * Contains response data for the listBySubscriptionNext operation. + */ +export type VaultsListBySubscriptionNextResponse = VaultListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: VaultListResult; + }; +}; + +/** + * Contains response data for the listDeletedNext operation. + */ +export type VaultsListDeletedNextResponse = DeletedVaultListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DeletedVaultListResult; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type VaultsListNextResponse = ResourceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ResourceListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the put operation. + */ +export type PrivateEndpointConnectionsPutResponse = PrivateEndpointConnection & PrivateEndpointConnectionsPutHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: PrivateEndpointConnectionsPutHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the deleteMethod operation. + */ +export type PrivateEndpointConnectionsDeleteResponse = PrivateEndpointConnection & PrivateEndpointConnectionsDeleteHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: PrivateEndpointConnectionsDeleteHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the listByResource operation. + */ +export type PrivateEndpointConnectionsListByResourceResponse = PrivateEndpointConnectionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnectionListResult; + }; +}; + +/** + * Contains response data for the listByResourceNext operation. + */ +export type PrivateEndpointConnectionsListByResourceNextResponse = PrivateEndpointConnectionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnectionListResult; + }; +}; + +/** + * Contains response data for the listByVault operation. + */ +export type PrivateLinkResourcesListByVaultResponse = PrivateLinkResourceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateLinkResourceListResult; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. */ -export interface DeletedVaultListResult extends Array { +export type ManagedHsmsCreateOrUpdateResponse = ManagedHsm & { /** - * The URL to get the next set of deleted vaults. + * The underlying HTTP response. */ - nextLink?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedHsm; + }; +}; /** - * @interface - * List of vault resources. - * @extends Array + * Contains response data for the update operation. */ -export interface ResourceListResult extends Array { +export type ManagedHsmsUpdateResponse = ManagedHsm & { /** - * The URL to get the next set of vault resources. + * The underlying HTTP response. */ - nextLink?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedHsm; + }; +}; /** - * @interface - * 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. - * @extends Array + * Contains response data for the get operation. */ -export interface OperationListResult extends Array { +export type ManagedHsmsGetResponse = ManagedHsm & { /** - * The URL to get the next set of operations. + * The underlying HTTP response. */ - nextLink?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for SkuName. - * Possible values include: 'standard', 'premium' - * @readonly - * @enum {string} - */ -export type SkuName = 'standard' | 'premium'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedHsm; + }; +}; /** - * Defines values for KeyPermissions. - * Possible values include: 'encrypt', 'decrypt', 'wrapKey', 'unwrapKey', 'sign', 'verify', 'get', - * 'list', 'create', 'update', 'import', 'delete', 'backup', 'restore', 'recover', 'purge' - * @readonly - * @enum {string} + * Contains response data for the listByResourceGroup operation. */ -export type KeyPermissions = 'encrypt' | 'decrypt' | 'wrapKey' | 'unwrapKey' | 'sign' | 'verify' | 'get' | 'list' | 'create' | 'update' | 'import' | 'delete' | 'backup' | 'restore' | 'recover' | 'purge'; +export type ManagedHsmsListByResourceGroupResponse = ManagedHsmListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for SecretPermissions. - * Possible values include: 'get', 'list', 'set', 'delete', 'backup', 'restore', 'recover', 'purge' - * @readonly - * @enum {string} - */ -export type SecretPermissions = 'get' | 'list' | 'set' | 'delete' | 'backup' | 'restore' | 'recover' | 'purge'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedHsmListResult; + }; +}; /** - * Defines values for CertificatePermissions. - * Possible values include: 'get', 'list', 'delete', 'create', 'import', 'update', - * 'managecontacts', 'getissuers', 'listissuers', 'setissuers', 'deleteissuers', 'manageissuers', - * 'recover', 'purge', 'backup', 'restore' - * @readonly - * @enum {string} + * Contains response data for the listBySubscription operation. */ -export type CertificatePermissions = 'get' | 'list' | 'delete' | 'create' | 'import' | 'update' | 'managecontacts' | 'getissuers' | 'listissuers' | 'setissuers' | 'deleteissuers' | 'manageissuers' | 'recover' | 'purge' | 'backup' | 'restore'; +export type ManagedHsmsListBySubscriptionResponse = ManagedHsmListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for StoragePermissions. - * Possible values include: 'get', 'list', 'delete', 'set', 'update', 'regeneratekey', 'recover', - * 'purge', 'backup', 'restore', 'setsas', 'listsas', 'getsas', 'deletesas' - * @readonly - * @enum {string} - */ -export type StoragePermissions = 'get' | 'list' | 'delete' | 'set' | 'update' | 'regeneratekey' | 'recover' | 'purge' | 'backup' | 'restore' | 'setsas' | 'listsas' | 'getsas' | 'deletesas'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedHsmListResult; + }; +}; /** - * Defines values for CreateMode. - * Possible values include: 'recover', 'default' - * @readonly - * @enum {string} + * Contains response data for the listDeleted operation. */ -export type CreateMode = 'recover' | 'default'; +export type ManagedHsmsListDeletedResponse = DeletedManagedHsmListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for NetworkRuleBypassOptions. - * Possible values include: 'AzureServices', 'None' - * @readonly - * @enum {string} - */ -export type NetworkRuleBypassOptions = 'AzureServices' | 'None'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DeletedManagedHsmListResult; + }; +}; /** - * Defines values for NetworkRuleAction. - * Possible values include: 'Allow', 'Deny' - * @readonly - * @enum {string} + * Contains response data for the getDeleted operation. */ -export type NetworkRuleAction = 'Allow' | 'Deny'; +export type ManagedHsmsGetDeletedResponse = DeletedManagedHsm & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for Reason. - * Possible values include: 'AccountNameInvalid', 'AlreadyExists' - * @readonly - * @enum {string} - */ -export type Reason = 'AccountNameInvalid' | 'AlreadyExists'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DeletedManagedHsm; + }; +}; /** - * Defines values for AccessPolicyUpdateKind. - * Possible values include: 'add', 'replace', 'remove' - * @readonly - * @enum {string} + * Contains response data for the beginCreateOrUpdate operation. */ -export type AccessPolicyUpdateKind = 'add' | 'replace' | 'remove'; +export type ManagedHsmsBeginCreateOrUpdateResponse = ManagedHsm & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedHsm; + }; +}; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the beginUpdate operation. */ -export type VaultsCreateOrUpdateResponse = Vault & { +export type ManagedHsmsBeginUpdateResponse = ManagedHsm & { /** * The underlying HTTP response. */ @@ -695,14 +2792,14 @@ export type VaultsCreateOrUpdateResponse = Vault & { /** * The response body as parsed JSON or XML */ - parsedBody: Vault; + parsedBody: ManagedHsm; }; }; /** - * Contains response data for the update operation. + * Contains response data for the listByResourceGroupNext operation. */ -export type VaultsUpdateResponse = Vault & { +export type ManagedHsmsListByResourceGroupNextResponse = ManagedHsmListResult & { /** * The underlying HTTP response. */ @@ -715,14 +2812,14 @@ export type VaultsUpdateResponse = Vault & { /** * The response body as parsed JSON or XML */ - parsedBody: Vault; + parsedBody: ManagedHsmListResult; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listBySubscriptionNext operation. */ -export type VaultsGetResponse = Vault & { +export type ManagedHsmsListBySubscriptionNextResponse = ManagedHsmListResult & { /** * The underlying HTTP response. */ @@ -735,14 +2832,14 @@ export type VaultsGetResponse = Vault & { /** * The response body as parsed JSON or XML */ - parsedBody: Vault; + parsedBody: ManagedHsmListResult; }; }; /** - * Contains response data for the updateAccessPolicy operation. + * Contains response data for the listDeletedNext operation. */ -export type VaultsUpdateAccessPolicyResponse = VaultAccessPolicyParameters & { +export type ManagedHsmsListDeletedNextResponse = DeletedManagedHsmListResult & { /** * The underlying HTTP response. */ @@ -755,14 +2852,14 @@ export type VaultsUpdateAccessPolicyResponse = VaultAccessPolicyParameters & { /** * The response body as parsed JSON or XML */ - parsedBody: VaultAccessPolicyParameters; + parsedBody: DeletedManagedHsmListResult; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the listByResource operation. */ -export type VaultsListByResourceGroupResponse = VaultListResult & { +export type MHSMPrivateEndpointConnectionsListByResourceResponse = MHSMPrivateEndpointConnectionsListResult & { /** * The underlying HTTP response. */ @@ -775,14 +2872,14 @@ export type VaultsListByResourceGroupResponse = VaultListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: VaultListResult; + parsedBody: MHSMPrivateEndpointConnectionsListResult; }; }; /** - * Contains response data for the listBySubscription operation. + * Contains response data for the get operation. */ -export type VaultsListBySubscriptionResponse = VaultListResult & { +export type MHSMPrivateEndpointConnectionsGetResponse = MHSMPrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -795,18 +2892,23 @@ export type VaultsListBySubscriptionResponse = VaultListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: VaultListResult; + parsedBody: MHSMPrivateEndpointConnection; }; }; /** - * Contains response data for the listDeleted operation. + * Contains response data for the put operation. */ -export type VaultsListDeletedResponse = DeletedVaultListResult & { +export type MHSMPrivateEndpointConnectionsPutResponse = MHSMPrivateEndpointConnection & MHSMPrivateEndpointConnectionsPutHeaders & { /** * The underlying HTTP response. */ _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: MHSMPrivateEndpointConnectionsPutHeaders; + /** * The response body as text (string format) */ @@ -815,18 +2917,23 @@ export type VaultsListDeletedResponse = DeletedVaultListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: DeletedVaultListResult; + parsedBody: MHSMPrivateEndpointConnection; }; }; /** - * Contains response data for the getDeleted operation. + * Contains response data for the deleteMethod operation. */ -export type VaultsGetDeletedResponse = DeletedVault & { +export type MHSMPrivateEndpointConnectionsDeleteResponse = MHSMPrivateEndpointConnection & MHSMPrivateEndpointConnectionsDeleteHeaders & { /** * The underlying HTTP response. */ _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: MHSMPrivateEndpointConnectionsDeleteHeaders; + /** * The response body as text (string format) */ @@ -835,14 +2942,14 @@ export type VaultsGetDeletedResponse = DeletedVault & { /** * The response body as parsed JSON or XML */ - parsedBody: DeletedVault; + parsedBody: MHSMPrivateEndpointConnection; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByResourceNext operation. */ -export type VaultsListResponse = ResourceListResult & { +export type MHSMPrivateEndpointConnectionsListByResourceNextResponse = MHSMPrivateEndpointConnectionsListResult & { /** * The underlying HTTP response. */ @@ -855,14 +2962,14 @@ export type VaultsListResponse = ResourceListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ResourceListResult; + parsedBody: MHSMPrivateEndpointConnectionsListResult; }; }; /** - * Contains response data for the checkNameAvailability operation. + * Contains response data for the listByMHSMResource operation. */ -export type VaultsCheckNameAvailabilityResponse = CheckNameAvailabilityResult & { +export type MHSMPrivateLinkResourcesListByMHSMResourceResponse = MHSMPrivateLinkResourceListResult & { /** * The underlying HTTP response. */ @@ -875,14 +2982,14 @@ export type VaultsCheckNameAvailabilityResponse = CheckNameAvailabilityResult & /** * The response body as parsed JSON or XML */ - parsedBody: CheckNameAvailabilityResult; + parsedBody: MHSMPrivateLinkResourceListResult; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the list operation. */ -export type VaultsBeginCreateOrUpdateResponse = Vault & { +export type OperationsListResponse = OperationListResult & { /** * The underlying HTTP response. */ @@ -895,14 +3002,14 @@ export type VaultsBeginCreateOrUpdateResponse = Vault & { /** * The response body as parsed JSON or XML */ - parsedBody: Vault; + parsedBody: OperationListResult; }; }; /** - * Contains response data for the listByResourceGroupNext operation. + * Contains response data for the listNext operation. */ -export type VaultsListByResourceGroupNextResponse = VaultListResult & { +export type OperationsListNextResponse = OperationListResult & { /** * The underlying HTTP response. */ @@ -915,14 +3022,14 @@ export type VaultsListByResourceGroupNextResponse = VaultListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: VaultListResult; + parsedBody: OperationListResult; }; }; /** - * Contains response data for the listBySubscriptionNext operation. + * Contains response data for the createOrUpdate operation. */ -export type VaultsListBySubscriptionNextResponse = VaultListResult & { +export type SecretsCreateOrUpdateResponse = Secret & { /** * The underlying HTTP response. */ @@ -935,14 +3042,14 @@ export type VaultsListBySubscriptionNextResponse = VaultListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: VaultListResult; + parsedBody: Secret; }; }; /** - * Contains response data for the listDeletedNext operation. + * Contains response data for the update operation. */ -export type VaultsListDeletedNextResponse = DeletedVaultListResult & { +export type SecretsUpdateResponse = Secret & { /** * The underlying HTTP response. */ @@ -955,14 +3062,14 @@ export type VaultsListDeletedNextResponse = DeletedVaultListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: DeletedVaultListResult; + parsedBody: Secret; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the get operation. */ -export type VaultsListNextResponse = ResourceListResult & { +export type SecretsGetResponse = Secret & { /** * The underlying HTTP response. */ @@ -975,14 +3082,14 @@ export type VaultsListNextResponse = ResourceListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ResourceListResult; + parsedBody: Secret; }; }; /** * Contains response data for the list operation. */ -export type OperationsListResponse = OperationListResult & { +export type SecretsListResponse = SecretListResult & { /** * The underlying HTTP response. */ @@ -995,14 +3102,14 @@ export type OperationsListResponse = OperationListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationListResult; + parsedBody: SecretListResult; }; }; /** * Contains response data for the listNext operation. */ -export type OperationsListNextResponse = OperationListResult & { +export type SecretsListNextResponse = SecretListResult & { /** * The underlying HTTP response. */ @@ -1015,6 +3122,6 @@ export type OperationsListNextResponse = OperationListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationListResult; + parsedBody: SecretListResult; }; }; diff --git a/sdk/keyvault/arm-keyvault/src/models/keysMappers.ts b/sdk/keyvault/arm-keyvault/src/models/keysMappers.ts new file mode 100644 index 000000000000..d755cba5f02b --- /dev/null +++ b/sdk/keyvault/arm-keyvault/src/models/keysMappers.ts @@ -0,0 +1,62 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AccessPolicyEntry, + Action, + Attributes, + BaseResource, + CloudError, + IPRule, + Key, + KeyAttributes, + KeyCreateParameters, + KeyListResult, + KeyProperties, + KeyReleasePolicy, + KeyRotationPolicyAttributes, + LifetimeAction, + ManagedHsm, + ManagedHsmProperties, + ManagedHsmResource, + ManagedHsmSku, + MHSMIPRule, + MHSMNetworkRuleSet, + MHSMPrivateEndpoint, + MHSMPrivateEndpointConnection, + MHSMPrivateEndpointConnectionItem, + MHSMPrivateLinkResource, + MHSMPrivateLinkServiceConnectionState, + MHSMVirtualNetworkRule, + NetworkRuleSet, + Permissions, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionItem, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + Resource, + RotationPolicy, + Secret, + SecretAttributes, + SecretCreateOrUpdateParameters, + SecretPatchParameters, + SecretPatchProperties, + SecretProperties, + Sku, + SystemData, + Trigger, + Vault, + VaultAccessPolicyParameters, + VaultAccessPolicyProperties, + VaultCreateOrUpdateParameters, + VaultPatchParameters, + VaultPatchProperties, + VaultProperties, + VirtualNetworkRule +} from "../models/mappers"; diff --git a/sdk/keyvault/arm-keyvault/src/models/mHSMPrivateEndpointConnectionsMappers.ts b/sdk/keyvault/arm-keyvault/src/models/mHSMPrivateEndpointConnectionsMappers.ts new file mode 100644 index 000000000000..b549282bec9c --- /dev/null +++ b/sdk/keyvault/arm-keyvault/src/models/mHSMPrivateEndpointConnectionsMappers.ts @@ -0,0 +1,66 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AccessPolicyEntry, + Action, + Attributes, + BaseResource, + CloudError, + ErrorModel, + IPRule, + Key, + KeyAttributes, + KeyCreateParameters, + KeyProperties, + KeyReleasePolicy, + KeyRotationPolicyAttributes, + LifetimeAction, + ManagedHsm, + ManagedHsmError, + ManagedHsmProperties, + ManagedHsmResource, + ManagedHsmSku, + MHSMIPRule, + MHSMNetworkRuleSet, + MHSMPrivateEndpoint, + MHSMPrivateEndpointConnection, + MHSMPrivateEndpointConnectionItem, + MHSMPrivateEndpointConnectionsDeleteHeaders, + MHSMPrivateEndpointConnectionsListResult, + MHSMPrivateEndpointConnectionsPutHeaders, + MHSMPrivateLinkResource, + MHSMPrivateLinkServiceConnectionState, + MHSMVirtualNetworkRule, + NetworkRuleSet, + Permissions, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionItem, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + Resource, + RotationPolicy, + Secret, + SecretAttributes, + SecretCreateOrUpdateParameters, + SecretPatchParameters, + SecretPatchProperties, + SecretProperties, + Sku, + SystemData, + Trigger, + Vault, + VaultAccessPolicyParameters, + VaultAccessPolicyProperties, + VaultCreateOrUpdateParameters, + VaultPatchParameters, + VaultPatchProperties, + VaultProperties, + VirtualNetworkRule +} from "../models/mappers"; diff --git a/sdk/keyvault/arm-keyvault/src/models/mHSMPrivateLinkResourcesMappers.ts b/sdk/keyvault/arm-keyvault/src/models/mHSMPrivateLinkResourcesMappers.ts new file mode 100644 index 000000000000..98ca92627c2a --- /dev/null +++ b/sdk/keyvault/arm-keyvault/src/models/mHSMPrivateLinkResourcesMappers.ts @@ -0,0 +1,62 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AccessPolicyEntry, + Action, + Attributes, + BaseResource, + CloudError, + IPRule, + Key, + KeyAttributes, + KeyCreateParameters, + KeyProperties, + KeyReleasePolicy, + KeyRotationPolicyAttributes, + LifetimeAction, + ManagedHsm, + ManagedHsmProperties, + ManagedHsmResource, + ManagedHsmSku, + MHSMIPRule, + MHSMNetworkRuleSet, + MHSMPrivateEndpoint, + MHSMPrivateEndpointConnection, + MHSMPrivateEndpointConnectionItem, + MHSMPrivateLinkResource, + MHSMPrivateLinkResourceListResult, + MHSMPrivateLinkServiceConnectionState, + MHSMVirtualNetworkRule, + NetworkRuleSet, + Permissions, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionItem, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + Resource, + RotationPolicy, + Secret, + SecretAttributes, + SecretCreateOrUpdateParameters, + SecretPatchParameters, + SecretPatchProperties, + SecretProperties, + Sku, + SystemData, + Trigger, + Vault, + VaultAccessPolicyParameters, + VaultAccessPolicyProperties, + VaultCreateOrUpdateParameters, + VaultPatchParameters, + VaultPatchProperties, + VaultProperties, + VirtualNetworkRule +} from "../models/mappers"; diff --git a/sdk/keyvault/arm-keyvault/src/models/managedHsmsMappers.ts b/sdk/keyvault/arm-keyvault/src/models/managedHsmsMappers.ts new file mode 100644 index 000000000000..877683c7a902 --- /dev/null +++ b/sdk/keyvault/arm-keyvault/src/models/managedHsmsMappers.ts @@ -0,0 +1,66 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AccessPolicyEntry, + Action, + Attributes, + BaseResource, + DeletedManagedHsm, + DeletedManagedHsmListResult, + DeletedManagedHsmProperties, + ErrorModel, + IPRule, + Key, + KeyAttributes, + KeyCreateParameters, + KeyProperties, + KeyReleasePolicy, + KeyRotationPolicyAttributes, + LifetimeAction, + ManagedHsm, + ManagedHsmError, + ManagedHsmListResult, + ManagedHsmProperties, + ManagedHsmResource, + ManagedHsmSku, + MHSMIPRule, + MHSMNetworkRuleSet, + MHSMPrivateEndpoint, + MHSMPrivateEndpointConnection, + MHSMPrivateEndpointConnectionItem, + MHSMPrivateLinkResource, + MHSMPrivateLinkServiceConnectionState, + MHSMVirtualNetworkRule, + NetworkRuleSet, + Permissions, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionItem, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + Resource, + RotationPolicy, + Secret, + SecretAttributes, + SecretCreateOrUpdateParameters, + SecretPatchParameters, + SecretPatchProperties, + SecretProperties, + Sku, + SystemData, + Trigger, + Vault, + VaultAccessPolicyParameters, + VaultAccessPolicyProperties, + VaultCreateOrUpdateParameters, + VaultPatchParameters, + VaultPatchProperties, + VaultProperties, + VirtualNetworkRule +} from "../models/mappers"; diff --git a/sdk/keyvault/arm-keyvault/src/models/mappers.ts b/sdk/keyvault/arm-keyvault/src/models/mappers.ts index 1442fb113e16..c655bae9dbe9 100644 --- a/sdk/keyvault/arm-keyvault/src/models/mappers.ts +++ b/sdk/keyvault/arm-keyvault/src/models/mappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -12,137 +12,152 @@ import * as msRest from "@azure/ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; -export const Sku: msRest.CompositeMapper = { - serializedName: "Sku", +export const SystemData: msRest.CompositeMapper = { + serializedName: "SystemData", type: { name: "Composite", - className: "Sku", + className: "SystemData", modelProperties: { - family: { - required: true, - isConstant: true, - serializedName: "family", - defaultValue: 'A', + createdBy: { + serializedName: "createdBy", type: { name: "String" } }, - name: { - required: true, - serializedName: "name", + createdByType: { + serializedName: "createdByType", type: { - name: "Enum", - allowedValues: [ - "standard", - "premium" - ] + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" } } } } }; -export const Permissions: msRest.CompositeMapper = { - serializedName: "Permissions", +export const KeyAttributes: msRest.CompositeMapper = { + serializedName: "KeyAttributes", type: { name: "Composite", - className: "Permissions", + className: "KeyAttributes", modelProperties: { - keys: { - serializedName: "keys", + enabled: { + serializedName: "enabled", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Boolean" } }, - secrets: { - serializedName: "secrets", + notBefore: { + serializedName: "nbf", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Number" } }, - certificates: { - serializedName: "certificates", + expires: { + serializedName: "exp", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Number" } }, - storage: { - serializedName: "storage", + created: { + readOnly: true, + serializedName: "created", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Number" + } + }, + updated: { + readOnly: true, + serializedName: "updated", + type: { + name: "Number" + } + }, + recoveryLevel: { + nullable: false, + readOnly: true, + serializedName: "recoveryLevel", + type: { + name: "String" + } + }, + exportable: { + serializedName: "exportable", + type: { + name: "Boolean" } } } } }; -export const AccessPolicyEntry: msRest.CompositeMapper = { - serializedName: "AccessPolicyEntry", +export const KeyRotationPolicyAttributes: msRest.CompositeMapper = { + serializedName: "KeyRotationPolicyAttributes", type: { name: "Composite", - className: "AccessPolicyEntry", + className: "KeyRotationPolicyAttributes", modelProperties: { - tenantId: { - required: true, - serializedName: "tenantId", - type: { - name: "Uuid" - } - }, - objectId: { - required: true, - serializedName: "objectId", + created: { + readOnly: true, + serializedName: "created", type: { - name: "String" + name: "Number" } }, - applicationId: { - serializedName: "applicationId", + updated: { + readOnly: true, + serializedName: "updated", type: { - name: "Uuid" + name: "Number" } }, - permissions: { - required: true, - serializedName: "permissions", + expiryTime: { + serializedName: "expiryTime", type: { - name: "Composite", - className: "Permissions" + name: "String" } } } } }; -export const IPRule: msRest.CompositeMapper = { - serializedName: "IPRule", +export const Trigger: msRest.CompositeMapper = { + serializedName: "Trigger", type: { name: "Composite", - className: "IPRule", + className: "Trigger", modelProperties: { - value: { - required: true, - serializedName: "value", + timeAfterCreate: { + serializedName: "timeAfterCreate", + type: { + name: "String" + } + }, + timeBeforeExpiry: { + serializedName: "timeBeforeExpiry", type: { name: "String" } @@ -151,61 +166,71 @@ export const IPRule: msRest.CompositeMapper = { } }; -export const VirtualNetworkRule: msRest.CompositeMapper = { - serializedName: "VirtualNetworkRule", +export const Action: msRest.CompositeMapper = { + serializedName: "Action", type: { name: "Composite", - className: "VirtualNetworkRule", + className: "Action", modelProperties: { - id: { - required: true, - serializedName: "id", + type: { + serializedName: "type", type: { - name: "String" + name: "Enum", + allowedValues: [ + "rotate", + "notify" + ] } } } } }; -export const NetworkRuleSet: msRest.CompositeMapper = { - serializedName: "NetworkRuleSet", +export const LifetimeAction: msRest.CompositeMapper = { + serializedName: "LifetimeAction", type: { name: "Composite", - className: "NetworkRuleSet", + className: "LifetimeAction", modelProperties: { - bypass: { - serializedName: "bypass", + trigger: { + serializedName: "trigger", type: { - name: "String" + name: "Composite", + className: "Trigger" } }, - defaultAction: { - serializedName: "defaultAction", + action: { + serializedName: "action", type: { - name: "String" + name: "Composite", + className: "Action" } - }, - ipRules: { - serializedName: "ipRules", + } + } + } +}; + +export const RotationPolicy: msRest.CompositeMapper = { + serializedName: "RotationPolicy", + type: { + name: "Composite", + className: "RotationPolicy", + modelProperties: { + attributes: { + serializedName: "attributes", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IPRule" - } - } + name: "Composite", + className: "KeyRotationPolicyAttributes" } }, - virtualNetworkRules: { - serializedName: "virtualNetworkRules", + lifetimeActions: { + serializedName: "lifetimeActions", type: { name: "Sequence", element: { type: { name: "Composite", - className: "VirtualNetworkRule" + className: "LifetimeAction" } } } @@ -214,194 +239,2079 @@ export const NetworkRuleSet: msRest.CompositeMapper = { } }; -export const VaultProperties: msRest.CompositeMapper = { - serializedName: "VaultProperties", +export const KeyReleasePolicy: msRest.CompositeMapper = { + serializedName: "KeyReleasePolicy", type: { name: "Composite", - className: "VaultProperties", + className: "KeyReleasePolicy", modelProperties: { - tenantId: { - required: true, - serializedName: "tenantId", + contentType: { + serializedName: "contentType", + defaultValue: 'application/json; charset=utf-8', type: { - name: "Uuid" + name: "String" } }, - sku: { - required: true, - serializedName: "sku", - defaultValue: {}, + data: { + serializedName: "data", + type: { + name: "Base64Url" + } + } + } + } +}; + +export const KeyProperties: msRest.CompositeMapper = { + serializedName: "KeyProperties", + type: { + name: "Composite", + className: "KeyProperties", + modelProperties: { + attributes: { + serializedName: "attributes", type: { name: "Composite", - className: "Sku" + className: "KeyAttributes" } }, - accessPolicies: { - serializedName: "accessPolicies", + kty: { + serializedName: "kty", + constraints: { + MinLength: 1 + }, + type: { + name: "String" + } + }, + keyOps: { + serializedName: "keyOps", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "AccessPolicyEntry" + name: "String" } } } }, - vaultUri: { - serializedName: "vaultUri", + keySize: { + serializedName: "keySize", + type: { + name: "Number" + } + }, + curveName: { + serializedName: "curveName", type: { name: "String" } }, - enabledForDeployment: { - serializedName: "enabledForDeployment", + keyUri: { + readOnly: true, + serializedName: "keyUri", type: { - name: "Boolean" + name: "String" } }, - enabledForDiskEncryption: { - serializedName: "enabledForDiskEncryption", + keyUriWithVersion: { + readOnly: true, + serializedName: "keyUriWithVersion", type: { - name: "Boolean" + name: "String" } }, - enabledForTemplateDeployment: { - serializedName: "enabledForTemplateDeployment", + rotationPolicy: { + serializedName: "rotationPolicy", type: { - name: "Boolean" + name: "Composite", + className: "RotationPolicy" } }, - enableSoftDelete: { - serializedName: "enableSoftDelete", + releasePolicy: { + serializedName: "release_policy", type: { - name: "Boolean" + name: "Composite", + className: "KeyReleasePolicy" + } + } + } + } +}; + +export const KeyCreateParameters: msRest.CompositeMapper = { + serializedName: "KeyCreateParameters", + type: { + name: "Composite", + className: "KeyCreateParameters", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } } }, - createMode: { - serializedName: "createMode", + properties: { + required: true, + serializedName: "properties", type: { - name: "Enum", - allowedValues: [ - "recover", - "default" - ] + name: "Composite", + className: "KeyProperties" + } + } + } + } +}; + +export const Resource: msRest.CompositeMapper = { + serializedName: "Resource", + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + tags: { + readOnly: true, + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const Key: msRest.CompositeMapper = { + serializedName: "Key", + type: { + name: "Composite", + className: "Key", + modelProperties: { + ...Resource.type.modelProperties, + attributes: { + serializedName: "properties.attributes", + type: { + name: "Composite", + className: "KeyAttributes" + } + }, + kty: { + serializedName: "properties.kty", + constraints: { + MinLength: 1 + }, + type: { + name: "String" + } + }, + keyOps: { + serializedName: "properties.keyOps", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + keySize: { + serializedName: "properties.keySize", + type: { + name: "Number" + } + }, + curveName: { + serializedName: "properties.curveName", + type: { + name: "String" + } + }, + keyUri: { + readOnly: true, + serializedName: "properties.keyUri", + type: { + name: "String" + } + }, + keyUriWithVersion: { + readOnly: true, + serializedName: "properties.keyUriWithVersion", + type: { + name: "String" + } + }, + rotationPolicy: { + serializedName: "properties.rotationPolicy", + type: { + name: "Composite", + className: "RotationPolicy" + } + }, + releasePolicy: { + serializedName: "properties.release_policy", + type: { + name: "Composite", + className: "KeyReleasePolicy" + } + } + } + } +}; + +export const PrivateLinkResource: msRest.CompositeMapper = { + serializedName: "PrivateLinkResource", + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + ...Resource.type.modelProperties, + groupId: { + readOnly: true, + serializedName: "properties.groupId", + type: { + name: "String" + } + }, + requiredMembers: { + readOnly: true, + serializedName: "properties.requiredMembers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + requiredZoneNames: { + serializedName: "properties.requiredZoneNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const PrivateLinkServiceConnectionState: msRest.CompositeMapper = { + serializedName: "PrivateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + actionsRequired: { + serializedName: "actionsRequired", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpoint: msRest.CompositeMapper = { + serializedName: "PrivateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnection: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnection", + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + privateEndpoint: { + serializedName: "properties.privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint" + } + }, + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + } + } + } +}; + +export const Sku: msRest.CompositeMapper = { + serializedName: "Sku", + type: { + name: "Composite", + className: "Sku", + modelProperties: { + family: { + required: true, + isConstant: true, + serializedName: "family", + defaultValue: 'A', + type: { + name: "String" + } + }, + name: { + required: true, + serializedName: "name", + type: { + name: "Enum", + allowedValues: [ + "standard", + "premium" + ] + } + } + } + } +}; + +export const Permissions: msRest.CompositeMapper = { + serializedName: "Permissions", + type: { + name: "Composite", + className: "Permissions", + modelProperties: { + keys: { + serializedName: "keys", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + secrets: { + serializedName: "secrets", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + certificates: { + serializedName: "certificates", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + storage: { + serializedName: "storage", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const AccessPolicyEntry: msRest.CompositeMapper = { + serializedName: "AccessPolicyEntry", + type: { + name: "Composite", + className: "AccessPolicyEntry", + modelProperties: { + tenantId: { + required: true, + serializedName: "tenantId", + type: { + name: "Uuid" + } + }, + objectId: { + required: true, + serializedName: "objectId", + type: { + name: "String" + } + }, + applicationId: { + serializedName: "applicationId", + type: { + name: "Uuid" + } + }, + permissions: { + required: true, + serializedName: "permissions", + type: { + name: "Composite", + className: "Permissions" + } + } + } + } +}; + +export const IPRule: msRest.CompositeMapper = { + serializedName: "IPRule", + type: { + name: "Composite", + className: "IPRule", + modelProperties: { + value: { + required: true, + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualNetworkRule: msRest.CompositeMapper = { + serializedName: "VirtualNetworkRule", + type: { + name: "Composite", + className: "VirtualNetworkRule", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + }, + ignoreMissingVnetServiceEndpoint: { + serializedName: "ignoreMissingVnetServiceEndpoint", + type: { + name: "Boolean" + } + } + } + } +}; + +export const NetworkRuleSet: msRest.CompositeMapper = { + serializedName: "NetworkRuleSet", + type: { + name: "Composite", + className: "NetworkRuleSet", + modelProperties: { + bypass: { + serializedName: "bypass", + type: { + name: "String" + } + }, + defaultAction: { + serializedName: "defaultAction", + type: { + name: "String" + } + }, + ipRules: { + serializedName: "ipRules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IPRule" + } + } + } + }, + virtualNetworkRules: { + serializedName: "virtualNetworkRules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualNetworkRule" + } + } + } + } + } + } +}; + +export const PrivateEndpointConnectionItem: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnectionItem", + type: { + name: "Composite", + className: "PrivateEndpointConnectionItem", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + privateEndpoint: { + serializedName: "properties.privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint" + } + }, + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const VaultProperties: msRest.CompositeMapper = { + serializedName: "VaultProperties", + type: { + name: "Composite", + className: "VaultProperties", + modelProperties: { + tenantId: { + required: true, + serializedName: "tenantId", + type: { + name: "Uuid" + } + }, + sku: { + required: true, + serializedName: "sku", + defaultValue: {}, + type: { + name: "Composite", + className: "Sku" + } + }, + accessPolicies: { + serializedName: "accessPolicies", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AccessPolicyEntry" + } + } + } + }, + vaultUri: { + serializedName: "vaultUri", + type: { + name: "String" + } + }, + hsmPoolResourceId: { + readOnly: true, + serializedName: "hsmPoolResourceId", + type: { + name: "String" + } + }, + enabledForDeployment: { + serializedName: "enabledForDeployment", + type: { + name: "Boolean" + } + }, + enabledForDiskEncryption: { + serializedName: "enabledForDiskEncryption", + type: { + name: "Boolean" + } + }, + enabledForTemplateDeployment: { + serializedName: "enabledForTemplateDeployment", + type: { + name: "Boolean" + } + }, + enableSoftDelete: { + serializedName: "enableSoftDelete", + defaultValue: true, + type: { + name: "Boolean" + } + }, + softDeleteRetentionInDays: { + serializedName: "softDeleteRetentionInDays", + defaultValue: 90, + type: { + name: "Number" + } + }, + enableRbacAuthorization: { + serializedName: "enableRbacAuthorization", + defaultValue: false, + type: { + name: "Boolean" + } + }, + createMode: { + serializedName: "createMode", + type: { + name: "Enum", + allowedValues: [ + "recover", + "default" + ] + } + }, + enablePurgeProtection: { + serializedName: "enablePurgeProtection", + type: { + name: "Boolean" + } + }, + networkAcls: { + serializedName: "networkAcls", + type: { + name: "Composite", + className: "NetworkRuleSet" + } + }, + provisioningState: { + serializedName: "provisioningState", + type: { + name: "String" + } + }, + privateEndpointConnections: { + readOnly: true, + serializedName: "privateEndpointConnections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnectionItem" + } + } + } + }, + publicNetworkAccess: { + serializedName: "publicNetworkAccess", + defaultValue: 'enabled', + type: { + name: "String" + } + } + } + } +}; + +export const VaultPatchProperties: msRest.CompositeMapper = { + serializedName: "VaultPatchProperties", + type: { + name: "Composite", + className: "VaultPatchProperties", + modelProperties: { + tenantId: { + serializedName: "tenantId", + type: { + name: "Uuid" + } + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + }, + accessPolicies: { + serializedName: "accessPolicies", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AccessPolicyEntry" + } + } + } + }, + enabledForDeployment: { + serializedName: "enabledForDeployment", + type: { + name: "Boolean" + } + }, + enabledForDiskEncryption: { + serializedName: "enabledForDiskEncryption", + type: { + name: "Boolean" + } + }, + enabledForTemplateDeployment: { + serializedName: "enabledForTemplateDeployment", + type: { + name: "Boolean" + } + }, + enableSoftDelete: { + serializedName: "enableSoftDelete", + type: { + name: "Boolean" + } + }, + enableRbacAuthorization: { + serializedName: "enableRbacAuthorization", + type: { + name: "Boolean" + } + }, + softDeleteRetentionInDays: { + serializedName: "softDeleteRetentionInDays", + type: { + name: "Number" + } + }, + createMode: { + serializedName: "createMode", + type: { + name: "Enum", + allowedValues: [ + "recover", + "default" + ] + } + }, + enablePurgeProtection: { + serializedName: "enablePurgeProtection", + type: { + name: "Boolean" + } + }, + networkAcls: { + serializedName: "networkAcls", + type: { + name: "Composite", + className: "NetworkRuleSet" + } + }, + publicNetworkAccess: { + serializedName: "publicNetworkAccess", + type: { + name: "String" + } + } + } + } +}; + +export const VaultAccessPolicyProperties: msRest.CompositeMapper = { + serializedName: "VaultAccessPolicyProperties", + type: { + name: "Composite", + className: "VaultAccessPolicyProperties", + modelProperties: { + accessPolicies: { + required: true, + serializedName: "accessPolicies", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AccessPolicyEntry" + } + } + } + } + } + } +}; + +export const DeletedVaultProperties: msRest.CompositeMapper = { + serializedName: "DeletedVaultProperties", + type: { + name: "Composite", + className: "DeletedVaultProperties", + modelProperties: { + vaultId: { + readOnly: true, + serializedName: "vaultId", + type: { + name: "String" + } + }, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + deletionDate: { + readOnly: true, + serializedName: "deletionDate", + type: { + name: "DateTime" + } + }, + scheduledPurgeDate: { + readOnly: true, + serializedName: "scheduledPurgeDate", + type: { + name: "DateTime" + } + }, + tags: { + readOnly: true, + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + purgeProtectionEnabled: { + readOnly: true, + serializedName: "purgeProtectionEnabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const VaultCreateOrUpdateParameters: msRest.CompositeMapper = { + serializedName: "VaultCreateOrUpdateParameters", + type: { + name: "Composite", + className: "VaultCreateOrUpdateParameters", + modelProperties: { + location: { + required: true, + serializedName: "location", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + properties: { + required: true, + serializedName: "properties", + defaultValue: {}, + type: { + name: "Composite", + className: "VaultProperties" + } + } + } + } +}; + +export const VaultPatchParameters: msRest.CompositeMapper = { + serializedName: "VaultPatchParameters", + type: { + name: "Composite", + className: "VaultPatchParameters", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "VaultPatchProperties" + } + } + } + } +}; + +export const VaultAccessPolicyParameters: msRest.CompositeMapper = { + serializedName: "VaultAccessPolicyParameters", + type: { + name: "Composite", + className: "VaultAccessPolicyParameters", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + properties: { + required: true, + serializedName: "properties", + type: { + name: "Composite", + className: "VaultAccessPolicyProperties" + } + } + } + } +}; + +export const Vault: msRest.CompositeMapper = { + serializedName: "Vault", + type: { + name: "Composite", + className: "Vault", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + properties: { + required: true, + serializedName: "properties", + defaultValue: {}, + type: { + name: "Composite", + className: "VaultProperties" + } + } + } + } +}; + +export const DeletedVault: msRest.CompositeMapper = { + serializedName: "DeletedVault", + type: { + name: "Composite", + className: "DeletedVault", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "DeletedVaultProperties" + } + } + } + } +}; + +export const VaultCheckNameAvailabilityParameters: msRest.CompositeMapper = { + serializedName: "VaultCheckNameAvailabilityParameters", + type: { + name: "Composite", + className: "VaultCheckNameAvailabilityParameters", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + required: true, + isConstant: true, + serializedName: "type", + defaultValue: 'Microsoft.KeyVault/vaults', + type: { + name: "String" + } + } + } + } +}; + +export const CheckNameAvailabilityResult: msRest.CompositeMapper = { + serializedName: "CheckNameAvailabilityResult", + type: { + name: "Composite", + className: "CheckNameAvailabilityResult", + modelProperties: { + nameAvailable: { + readOnly: true, + serializedName: "nameAvailable", + type: { + name: "Boolean" + } + }, + reason: { + readOnly: true, + serializedName: "reason", + type: { + name: "Enum", + allowedValues: [ + "AccountNameInvalid", + "AlreadyExists" + ] + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkResourceListResult: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourceListResult", + type: { + name: "Composite", + className: "PrivateLinkResourceListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } + } + } + } + } +}; + +export const ManagedHsmSku: msRest.CompositeMapper = { + serializedName: "ManagedHsmSku", + type: { + name: "Composite", + className: "ManagedHsmSku", + modelProperties: { + family: { + required: true, + isConstant: true, + serializedName: "family", + defaultValue: 'B', + type: { + name: "String" + } + }, + name: { + required: true, + serializedName: "name", + type: { + name: "Enum", + allowedValues: [ + "Standard_B1", + "Custom_B32" + ] + } + } + } + } +}; + +export const MHSMIPRule: msRest.CompositeMapper = { + serializedName: "MHSMIPRule", + type: { + name: "Composite", + className: "MHSMIPRule", + modelProperties: { + value: { + required: true, + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + +export const MHSMVirtualNetworkRule: msRest.CompositeMapper = { + serializedName: "MHSMVirtualNetworkRule", + type: { + name: "Composite", + className: "MHSMVirtualNetworkRule", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const MHSMNetworkRuleSet: msRest.CompositeMapper = { + serializedName: "MHSMNetworkRuleSet", + type: { + name: "Composite", + className: "MHSMNetworkRuleSet", + modelProperties: { + bypass: { + serializedName: "bypass", + type: { + name: "String" + } + }, + defaultAction: { + serializedName: "defaultAction", + type: { + name: "String" + } + }, + ipRules: { + serializedName: "ipRules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MHSMIPRule" + } + } + } + }, + virtualNetworkRules: { + serializedName: "virtualNetworkRules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MHSMVirtualNetworkRule" + } + } + } + } + } + } +}; + +export const MHSMPrivateEndpoint: msRest.CompositeMapper = { + serializedName: "MHSMPrivateEndpoint", + type: { + name: "Composite", + className: "MHSMPrivateEndpoint", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const MHSMPrivateLinkServiceConnectionState: msRest.CompositeMapper = { + serializedName: "MHSMPrivateLinkServiceConnectionState", + type: { + name: "Composite", + className: "MHSMPrivateLinkServiceConnectionState", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + actionsRequired: { + serializedName: "actionsRequired", + type: { + name: "String" + } + } + } + } +}; + +export const MHSMPrivateEndpointConnectionItem: msRest.CompositeMapper = { + serializedName: "MHSMPrivateEndpointConnectionItem", + type: { + name: "Composite", + className: "MHSMPrivateEndpointConnectionItem", + modelProperties: { + privateEndpoint: { + serializedName: "properties.privateEndpoint", + type: { + name: "Composite", + className: "MHSMPrivateEndpoint" + } + }, + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "MHSMPrivateLinkServiceConnectionState" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedHsmProperties: msRest.CompositeMapper = { + serializedName: "ManagedHsmProperties", + type: { + name: "Composite", + className: "ManagedHsmProperties", + modelProperties: { + tenantId: { + serializedName: "tenantId", + type: { + name: "Uuid" + } + }, + initialAdminObjectIds: { + serializedName: "initialAdminObjectIds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + hsmUri: { + readOnly: true, + serializedName: "hsmUri", + type: { + name: "String" + } + }, + enableSoftDelete: { + serializedName: "enableSoftDelete", + defaultValue: true, + type: { + name: "Boolean" + } + }, + softDeleteRetentionInDays: { + serializedName: "softDeleteRetentionInDays", + defaultValue: 90, + type: { + name: "Number" + } + }, + enablePurgeProtection: { + serializedName: "enablePurgeProtection", + defaultValue: true, + type: { + name: "Boolean" + } + }, + createMode: { + serializedName: "createMode", + type: { + name: "Enum", + allowedValues: [ + "recover", + "default" + ] + } + }, + statusMessage: { + readOnly: true, + serializedName: "statusMessage", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "provisioningState", + type: { + name: "String" + } + }, + networkAcls: { + serializedName: "networkAcls", + type: { + name: "Composite", + className: "MHSMNetworkRuleSet" + } + }, + privateEndpointConnections: { + readOnly: true, + serializedName: "privateEndpointConnections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MHSMPrivateEndpointConnectionItem" + } + } + } + }, + publicNetworkAccess: { + serializedName: "publicNetworkAccess", + type: { + name: "String" + } + }, + scheduledPurgeDate: { + readOnly: true, + serializedName: "scheduledPurgeDate", + type: { + name: "DateTime" + } + } + } + } +}; + +export const ManagedHsmResource: msRest.CompositeMapper = { + serializedName: "ManagedHsmResource", + type: { + name: "Composite", + className: "ManagedHsmResource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "ManagedHsmSku" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const ManagedHsm: msRest.CompositeMapper = { + serializedName: "ManagedHsm", + type: { + name: "Composite", + className: "ManagedHsm", + modelProperties: { + ...ManagedHsmResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ManagedHsmProperties" + } + } + } + } +}; + +export const MHSMPrivateEndpointConnection: msRest.CompositeMapper = { + serializedName: "MHSMPrivateEndpointConnection", + type: { + name: "Composite", + className: "MHSMPrivateEndpointConnection", + modelProperties: { + privateEndpoint: { + serializedName: "properties.privateEndpoint", + type: { + name: "Composite", + className: "MHSMPrivateEndpoint" + } + }, + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "MHSMPrivateLinkServiceConnectionState" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + } + } + } +}; + +export const ErrorModel: msRest.CompositeMapper = { + serializedName: "Error", + type: { + name: "Composite", + className: "ErrorModel", + modelProperties: { + code: { + readOnly: true, + serializedName: "code", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + innerError: { + readOnly: true, + serializedName: "innererror", + type: { + name: "Composite", + className: "ErrorModel" + } + } + } + } +}; + +export const ManagedHsmError: msRest.CompositeMapper = { + serializedName: "ManagedHsmError", + type: { + name: "Composite", + className: "ManagedHsmError", + modelProperties: { + error: { + readOnly: true, + serializedName: "error", + type: { + name: "Composite", + className: "ErrorModel" + } + } + } + } +}; + +export const DeletedManagedHsmProperties: msRest.CompositeMapper = { + serializedName: "DeletedManagedHsmProperties", + type: { + name: "Composite", + className: "DeletedManagedHsmProperties", + modelProperties: { + mhsmId: { + readOnly: true, + serializedName: "mhsmId", + type: { + name: "String" + } + }, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + deletionDate: { + readOnly: true, + serializedName: "deletionDate", + type: { + name: "DateTime" + } + }, + scheduledPurgeDate: { + readOnly: true, + serializedName: "scheduledPurgeDate", + type: { + name: "DateTime" + } + }, + purgeProtectionEnabled: { + readOnly: true, + serializedName: "purgeProtectionEnabled", + type: { + name: "Boolean" + } + }, + tags: { + readOnly: true, + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DeletedManagedHsm: msRest.CompositeMapper = { + serializedName: "DeletedManagedHsm", + type: { + name: "Composite", + className: "DeletedManagedHsm", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "DeletedManagedHsmProperties" + } + } + } + } +}; + +export const MHSMPrivateLinkResource: msRest.CompositeMapper = { + serializedName: "MHSMPrivateLinkResource", + type: { + name: "Composite", + className: "MHSMPrivateLinkResource", + modelProperties: { + ...ManagedHsmResource.type.modelProperties, + groupId: { + readOnly: true, + serializedName: "properties.groupId", + type: { + name: "String" + } + }, + requiredMembers: { + readOnly: true, + serializedName: "properties.requiredMembers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + requiredZoneNames: { + serializedName: "properties.requiredZoneNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const MHSMPrivateLinkResourceListResult: msRest.CompositeMapper = { + serializedName: "MHSMPrivateLinkResourceListResult", + type: { + name: "Composite", + className: "MHSMPrivateLinkResourceListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MHSMPrivateLinkResource" + } + } + } + } + } + } +}; + +export const OperationDisplay: msRest.CompositeMapper = { + serializedName: "Operation_display", + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const LogSpecification: msRest.CompositeMapper = { + serializedName: "LogSpecification", + type: { + name: "Composite", + className: "LogSpecification", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + blobDuration: { + serializedName: "blobDuration", + type: { + name: "String" + } + } + } + } +}; + +export const DimensionProperties: msRest.CompositeMapper = { + serializedName: "DimensionProperties", + type: { + name: "Composite", + className: "DimensionProperties", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" } }, - enablePurgeProtection: { - serializedName: "enablePurgeProtection", + displayName: { + serializedName: "displayName", type: { - name: "Boolean" + name: "String" } }, - networkAcls: { - serializedName: "networkAcls", + toBeExportedForShoebox: { + serializedName: "toBeExportedForShoebox", type: { - name: "Composite", - className: "NetworkRuleSet" + name: "Boolean" } } } } }; -export const VaultPatchProperties: msRest.CompositeMapper = { - serializedName: "VaultPatchProperties", +export const MetricSpecification: msRest.CompositeMapper = { + serializedName: "MetricSpecification", type: { name: "Composite", - className: "VaultPatchProperties", + className: "MetricSpecification", modelProperties: { - tenantId: { - serializedName: "tenantId", + name: { + serializedName: "name", type: { - name: "Uuid" + name: "String" } }, - sku: { - serializedName: "sku", + displayName: { + serializedName: "displayName", type: { - name: "Composite", - className: "Sku" + name: "String" } }, - accessPolicies: { - serializedName: "accessPolicies", + displayDescription: { + serializedName: "displayDescription", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AccessPolicyEntry" - } - } + name: "String" } }, - enabledForDeployment: { - serializedName: "enabledForDeployment", + unit: { + serializedName: "unit", type: { - name: "Boolean" + name: "String" } }, - enabledForDiskEncryption: { - serializedName: "enabledForDiskEncryption", + aggregationType: { + serializedName: "aggregationType", type: { - name: "Boolean" + name: "String" } }, - enabledForTemplateDeployment: { - serializedName: "enabledForTemplateDeployment", + supportedAggregationTypes: { + serializedName: "supportedAggregationTypes", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - enableSoftDelete: { - serializedName: "enableSoftDelete", + supportedTimeGrainTypes: { + serializedName: "supportedTimeGrainTypes", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - createMode: { - serializedName: "createMode", + lockAggregationType: { + serializedName: "lockAggregationType", type: { - name: "Enum", - allowedValues: [ - "recover", - "default" - ] + name: "String" } }, - enablePurgeProtection: { - serializedName: "enablePurgeProtection", + dimensions: { + serializedName: "dimensions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DimensionProperties" + } + } + } + }, + fillGapWithZero: { + serializedName: "fillGapWithZero", type: { name: "Boolean" } }, - networkAcls: { - serializedName: "networkAcls", + internalMetricName: { + serializedName: "internalMetricName", type: { - name: "Composite", - className: "NetworkRuleSet" + name: "String" } } } } }; -export const VaultAccessPolicyProperties: msRest.CompositeMapper = { - serializedName: "VaultAccessPolicyProperties", +export const ServiceSpecification: msRest.CompositeMapper = { + serializedName: "ServiceSpecification", type: { name: "Composite", - className: "VaultAccessPolicyProperties", + className: "ServiceSpecification", modelProperties: { - accessPolicies: { - required: true, - serializedName: "accessPolicies", + logSpecifications: { + serializedName: "logSpecifications", type: { name: "Sequence", element: { type: { name: "Composite", - className: "AccessPolicyEntry" + className: "LogSpecification" + } + } + } + }, + metricSpecifications: { + serializedName: "metricSpecifications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetricSpecification" } } } @@ -410,201 +2320,208 @@ export const VaultAccessPolicyProperties: msRest.CompositeMapper = { } }; -export const DeletedVaultProperties: msRest.CompositeMapper = { - serializedName: "DeletedVaultProperties", +export const Operation: msRest.CompositeMapper = { + serializedName: "Operation", type: { name: "Composite", - className: "DeletedVaultProperties", + className: "Operation", modelProperties: { - vaultId: { - readOnly: true, - serializedName: "vaultId", + name: { + serializedName: "name", type: { name: "String" } }, - location: { - readOnly: true, - serializedName: "location", + display: { + serializedName: "display", type: { - name: "String" + name: "Composite", + className: "OperationDisplay" } }, - deletionDate: { - readOnly: true, - serializedName: "deletionDate", + origin: { + serializedName: "origin", type: { - name: "DateTime" + name: "String" } }, - scheduledPurgeDate: { - readOnly: true, - serializedName: "scheduledPurgeDate", + serviceSpecification: { + serializedName: "properties.serviceSpecification", type: { - name: "DateTime" + name: "Composite", + className: "ServiceSpecification" } }, - tags: { - readOnly: true, - serializedName: "tags", + isDataAction: { + serializedName: "isDataAction", type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "Boolean" } } } } }; -export const VaultCreateOrUpdateParameters: msRest.CompositeMapper = { - serializedName: "VaultCreateOrUpdateParameters", +export const Attributes: msRest.CompositeMapper = { + serializedName: "Attributes", type: { name: "Composite", - className: "VaultCreateOrUpdateParameters", + className: "Attributes", modelProperties: { - location: { - required: true, - serializedName: "location", + enabled: { + serializedName: "enabled", type: { - name: "String" + name: "Boolean" } }, - tags: { - serializedName: "tags", + notBefore: { + serializedName: "nbf", type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "UnixTime" } }, - properties: { - required: true, - serializedName: "properties", - defaultValue: {}, + expires: { + serializedName: "exp", type: { - name: "Composite", - className: "VaultProperties" + name: "UnixTime" + } + }, + created: { + readOnly: true, + serializedName: "created", + type: { + name: "UnixTime" + } + }, + updated: { + readOnly: true, + serializedName: "updated", + type: { + name: "UnixTime" } } } } }; -export const VaultPatchParameters: msRest.CompositeMapper = { - serializedName: "VaultPatchParameters", +export const SecretAttributes: msRest.CompositeMapper = { + serializedName: "SecretAttributes", type: { name: "Composite", - className: "VaultPatchParameters", + className: "SecretAttributes", modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "VaultPatchProperties" - } - } + ...Attributes.type.modelProperties } } }; -export const VaultAccessPolicyParameters: msRest.CompositeMapper = { - serializedName: "VaultAccessPolicyParameters", +export const SecretProperties: msRest.CompositeMapper = { + serializedName: "SecretProperties", type: { name: "Composite", - className: "VaultAccessPolicyParameters", + className: "SecretProperties", modelProperties: { - id: { - readOnly: true, - serializedName: "id", + value: { + serializedName: "value", type: { name: "String" } }, - name: { - readOnly: true, - serializedName: "name", + contentType: { + serializedName: "contentType", type: { name: "String" } }, - type: { - readOnly: true, - serializedName: "type", + attributes: { + serializedName: "attributes", type: { - name: "String" + name: "Composite", + className: "SecretAttributes" } }, - location: { + secretUri: { readOnly: true, - serializedName: "location", + serializedName: "secretUri", type: { name: "String" } }, - properties: { - required: true, - serializedName: "properties", + secretUriWithVersion: { + readOnly: true, + serializedName: "secretUriWithVersion", type: { - name: "Composite", - className: "VaultAccessPolicyProperties" + name: "String" } } } } }; -export const Resource: msRest.CompositeMapper = { - serializedName: "Resource", +export const SecretPatchProperties: msRest.CompositeMapper = { + serializedName: "SecretPatchProperties", type: { name: "Composite", - className: "Resource", + className: "SecretPatchProperties", modelProperties: { - id: { - readOnly: true, - serializedName: "id", + value: { + serializedName: "value", type: { name: "String" } }, - name: { - readOnly: true, - serializedName: "name", + contentType: { + serializedName: "contentType", type: { name: "String" } }, - type: { - readOnly: true, - serializedName: "type", + attributes: { + serializedName: "attributes", + type: { + name: "Composite", + className: "SecretAttributes" + } + } + } + } +}; + +export const SecretCreateOrUpdateParameters: msRest.CompositeMapper = { + serializedName: "SecretCreateOrUpdateParameters", + type: { + name: "Composite", + className: "SecretCreateOrUpdateParameters", + modelProperties: { + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { + type: { + name: "String" + } + } } }, - location: { + properties: { required: true, - serializedName: "location", + serializedName: "properties", type: { - name: "String" + name: "Composite", + className: "SecretProperties" } - }, + } + } + } +}; + +export const SecretPatchParameters: msRest.CompositeMapper = { + serializedName: "SecretPatchParameters", + type: { + name: "Composite", + className: "SecretPatchParameters", + modelProperties: { tags: { serializedName: "tags", type: { @@ -615,87 +2532,95 @@ export const Resource: msRest.CompositeMapper = { } } } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "SecretPatchProperties" + } } } } }; -export const Vault: msRest.CompositeMapper = { - serializedName: "Vault", +export const Secret: msRest.CompositeMapper = { + serializedName: "Secret", type: { name: "Composite", - className: "Vault", + className: "Secret", modelProperties: { ...Resource.type.modelProperties, properties: { required: true, serializedName: "properties", - defaultValue: {}, type: { name: "Composite", - className: "VaultProperties" + className: "SecretProperties" } } } } }; -export const DeletedVault: msRest.CompositeMapper = { - serializedName: "DeletedVault", +export const PrivateEndpointConnectionsPutHeaders: msRest.CompositeMapper = { + serializedName: "privateendpointconnections-put-headers", type: { name: "Composite", - className: "DeletedVault", + className: "PrivateEndpointConnectionsPutHeaders", modelProperties: { - id: { - readOnly: true, - serializedName: "id", + retryAfter: { + serializedName: "retry-after", type: { - name: "String" + name: "Number" } }, - name: { - readOnly: true, - serializedName: "name", + azureAsyncOperation: { + serializedName: "azure-asyncoperation", type: { name: "String" } - }, - type: { - readOnly: true, - serializedName: "type", + } + } + } +}; + +export const PrivateEndpointConnectionsDeleteHeaders: msRest.CompositeMapper = { + serializedName: "privateendpointconnections-delete-headers", + type: { + name: "Composite", + className: "PrivateEndpointConnectionsDeleteHeaders", + modelProperties: { + retryAfter: { + serializedName: "retry-after", type: { - name: "String" + name: "Number" } }, - properties: { - serializedName: "properties", + locationHeader: { + serializedName: "location", type: { - name: "Composite", - className: "DeletedVaultProperties" + name: "String" } } } } }; -export const VaultCheckNameAvailabilityParameters: msRest.CompositeMapper = { - serializedName: "VaultCheckNameAvailabilityParameters", +export const MHSMPrivateEndpointConnectionsPutHeaders: msRest.CompositeMapper = { + serializedName: "mhsmprivateendpointconnections-put-headers", type: { name: "Composite", - className: "VaultCheckNameAvailabilityParameters", + className: "MHSMPrivateEndpointConnectionsPutHeaders", modelProperties: { - name: { - required: true, - serializedName: "name", + retryAfter: { + serializedName: "retry-after", type: { - name: "String" + name: "Number" } }, - type: { - required: true, - isConstant: true, - serializedName: "type", - defaultValue: 'Microsoft.KeyVault/vaults', + azureAsyncOperation: { + serializedName: "azure-asyncoperation", type: { name: "String" } @@ -704,33 +2629,20 @@ export const VaultCheckNameAvailabilityParameters: msRest.CompositeMapper = { } }; -export const CheckNameAvailabilityResult: msRest.CompositeMapper = { - serializedName: "CheckNameAvailabilityResult", +export const MHSMPrivateEndpointConnectionsDeleteHeaders: msRest.CompositeMapper = { + serializedName: "mhsmprivateendpointconnections-delete-headers", type: { name: "Composite", - className: "CheckNameAvailabilityResult", + className: "MHSMPrivateEndpointConnectionsDeleteHeaders", modelProperties: { - nameAvailable: { - readOnly: true, - serializedName: "nameAvailable", + retryAfter: { + serializedName: "retry-after", type: { - name: "Boolean" - } - }, - reason: { - readOnly: true, - serializedName: "reason", - type: { - name: "Enum", - allowedValues: [ - "AccountNameInvalid", - "AlreadyExists" - ] + name: "Number" } }, - message: { - readOnly: true, - serializedName: "message", + locationHeader: { + serializedName: "location", type: { name: "String" } @@ -739,32 +2651,54 @@ export const CheckNameAvailabilityResult: msRest.CompositeMapper = { } }; -export const OperationDisplay: msRest.CompositeMapper = { - serializedName: "Operation_display", +export const KeyListResult: msRest.CompositeMapper = { + serializedName: "KeyListResult", type: { name: "Composite", - className: "OperationDisplay", + className: "KeyListResult", modelProperties: { - provider: { - serializedName: "provider", + value: { + serializedName: "", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Key" + } + } } }, - resource: { - serializedName: "resource", + nextLink: { + serializedName: "nextLink", type: { name: "String" } - }, - operation: { - serializedName: "operation", + } + } + } +}; + +export const VaultListResult: msRest.CompositeMapper = { + serializedName: "VaultListResult", + type: { + name: "Composite", + className: "VaultListResult", + modelProperties: { + value: { + serializedName: "", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Vault" + } + } } }, - description: { - serializedName: "description", + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -773,26 +2707,26 @@ export const OperationDisplay: msRest.CompositeMapper = { } }; -export const LogSpecification: msRest.CompositeMapper = { - serializedName: "LogSpecification", +export const DeletedVaultListResult: msRest.CompositeMapper = { + serializedName: "DeletedVaultListResult", type: { name: "Composite", - className: "LogSpecification", + className: "DeletedVaultListResult", modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - displayName: { - serializedName: "displayName", + value: { + serializedName: "", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DeletedVault" + } + } } }, - blobDuration: { - serializedName: "blobDuration", + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -801,69 +2735,67 @@ export const LogSpecification: msRest.CompositeMapper = { } }; -export const ServiceSpecification: msRest.CompositeMapper = { - serializedName: "ServiceSpecification", +export const ResourceListResult: msRest.CompositeMapper = { + serializedName: "ResourceListResult", type: { name: "Composite", - className: "ServiceSpecification", + className: "ResourceListResult", modelProperties: { - logSpecifications: { - serializedName: "logSpecifications", + value: { + serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "LogSpecification" + className: "Resource" } } } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } } } } }; -export const Operation: msRest.CompositeMapper = { - serializedName: "Operation", +export const PrivateEndpointConnectionListResult: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnectionListResult", type: { name: "Composite", - className: "Operation", + className: "PrivateEndpointConnectionListResult", modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - display: { - serializedName: "display", + value: { + serializedName: "", type: { - name: "Composite", - className: "OperationDisplay" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } } }, - origin: { - serializedName: "origin", + nextLink: { + serializedName: "nextLink", type: { name: "String" } - }, - serviceSpecification: { - serializedName: "properties.serviceSpecification", - type: { - name: "Composite", - className: "ServiceSpecification" - } } } } }; -export const VaultListResult: msRest.CompositeMapper = { - serializedName: "VaultListResult", +export const ManagedHsmListResult: msRest.CompositeMapper = { + serializedName: "ManagedHsmListResult", type: { name: "Composite", - className: "VaultListResult", + className: "ManagedHsmListResult", modelProperties: { value: { serializedName: "", @@ -872,7 +2804,7 @@ export const VaultListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "Vault" + className: "ManagedHsm" } } } @@ -887,11 +2819,11 @@ export const VaultListResult: msRest.CompositeMapper = { } }; -export const DeletedVaultListResult: msRest.CompositeMapper = { - serializedName: "DeletedVaultListResult", +export const DeletedManagedHsmListResult: msRest.CompositeMapper = { + serializedName: "DeletedManagedHsmListResult", type: { name: "Composite", - className: "DeletedVaultListResult", + className: "DeletedManagedHsmListResult", modelProperties: { value: { serializedName: "", @@ -900,7 +2832,7 @@ export const DeletedVaultListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "DeletedVault" + className: "DeletedManagedHsm" } } } @@ -915,11 +2847,11 @@ export const DeletedVaultListResult: msRest.CompositeMapper = { } }; -export const ResourceListResult: msRest.CompositeMapper = { - serializedName: "ResourceListResult", +export const MHSMPrivateEndpointConnectionsListResult: msRest.CompositeMapper = { + serializedName: "MHSMPrivateEndpointConnectionsListResult", type: { name: "Composite", - className: "ResourceListResult", + className: "MHSMPrivateEndpointConnectionsListResult", modelProperties: { value: { serializedName: "", @@ -928,7 +2860,7 @@ export const ResourceListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "Resource" + className: "MHSMPrivateEndpointConnection" } } } @@ -970,3 +2902,31 @@ export const OperationListResult: msRest.CompositeMapper = { } } }; + +export const SecretListResult: msRest.CompositeMapper = { + serializedName: "SecretListResult", + type: { + name: "Composite", + className: "SecretListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Secret" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/keyvault/arm-keyvault/src/models/operationsMappers.ts b/sdk/keyvault/arm-keyvault/src/models/operationsMappers.ts index 9e480a46a87f..d6f9d34041f7 100644 --- a/sdk/keyvault/arm-keyvault/src/models/operationsMappers.ts +++ b/sdk/keyvault/arm-keyvault/src/models/operationsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,7 +8,9 @@ export { CloudError, + DimensionProperties, LogSpecification, + MetricSpecification, Operation, OperationDisplay, OperationListResult, diff --git a/sdk/keyvault/arm-keyvault/src/models/parameters.ts b/sdk/keyvault/arm-keyvault/src/models/parameters.ts index df134cdbf885..47877222c29c 100644 --- a/sdk/keyvault/arm-keyvault/src/models/parameters.ts +++ b/sdk/keyvault/arm-keyvault/src/models/parameters.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -54,6 +53,32 @@ export const filter: msRest.OperationQueryParameter = { } } }; +export const keyName: msRest.OperationURLParameter = { + parameterPath: "keyName", + mapper: { + required: true, + serializedName: "keyName", + constraints: { + Pattern: /^[a-zA-Z0-9-]{1,127}$/ + }, + type: { + name: "String" + } + } +}; +export const keyVersion: msRest.OperationURLParameter = { + parameterPath: "keyVersion", + mapper: { + required: true, + serializedName: "keyVersion", + constraints: { + Pattern: /^[a-fA-F0-9]{32}$/ + }, + type: { + name: "String" + } + } +}; export const location: msRest.OperationURLParameter = { parameterPath: "location", mapper: { @@ -64,6 +89,16 @@ export const location: msRest.OperationURLParameter = { } } }; +export const name: msRest.OperationURLParameter = { + parameterPath: "name", + mapper: { + required: true, + serializedName: "name", + type: { + name: "String" + } + } +}; export const nextPageLink: msRest.OperationURLParameter = { parameterPath: "nextPageLink", mapper: { @@ -90,6 +125,16 @@ export const operationKind: msRest.OperationURLParameter = { } } }; +export const privateEndpointConnectionName: msRest.OperationURLParameter = { + parameterPath: "privateEndpointConnectionName", + mapper: { + required: true, + serializedName: "privateEndpointConnectionName", + type: { + name: "String" + } + } +}; export const resourceGroupName: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { @@ -100,6 +145,29 @@ export const resourceGroupName: msRest.OperationURLParameter = { } } }; +export const secretName0: msRest.OperationURLParameter = { + parameterPath: "secretName", + mapper: { + required: true, + serializedName: "secretName", + constraints: { + Pattern: /^[a-zA-Z0-9-]{1,127}$/ + }, + type: { + name: "String" + } + } +}; +export const secretName1: msRest.OperationURLParameter = { + parameterPath: "secretName", + mapper: { + required: true, + serializedName: "secretName", + type: { + name: "String" + } + } +}; export const subscriptionId: msRest.OperationURLParameter = { parameterPath: "subscriptionId", mapper: { diff --git a/sdk/keyvault/arm-keyvault/src/models/privateEndpointConnectionsMappers.ts b/sdk/keyvault/arm-keyvault/src/models/privateEndpointConnectionsMappers.ts new file mode 100644 index 000000000000..1318248c3aec --- /dev/null +++ b/sdk/keyvault/arm-keyvault/src/models/privateEndpointConnectionsMappers.ts @@ -0,0 +1,64 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AccessPolicyEntry, + Action, + Attributes, + BaseResource, + CloudError, + IPRule, + Key, + KeyAttributes, + KeyCreateParameters, + KeyProperties, + KeyReleasePolicy, + KeyRotationPolicyAttributes, + LifetimeAction, + ManagedHsm, + ManagedHsmProperties, + ManagedHsmResource, + ManagedHsmSku, + MHSMIPRule, + MHSMNetworkRuleSet, + MHSMPrivateEndpoint, + MHSMPrivateEndpointConnection, + MHSMPrivateEndpointConnectionItem, + MHSMPrivateLinkResource, + MHSMPrivateLinkServiceConnectionState, + MHSMVirtualNetworkRule, + NetworkRuleSet, + Permissions, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionItem, + PrivateEndpointConnectionListResult, + PrivateEndpointConnectionsDeleteHeaders, + PrivateEndpointConnectionsPutHeaders, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + Resource, + RotationPolicy, + Secret, + SecretAttributes, + SecretCreateOrUpdateParameters, + SecretPatchParameters, + SecretPatchProperties, + SecretProperties, + Sku, + SystemData, + Trigger, + Vault, + VaultAccessPolicyParameters, + VaultAccessPolicyProperties, + VaultCreateOrUpdateParameters, + VaultPatchParameters, + VaultPatchProperties, + VaultProperties, + VirtualNetworkRule +} from "../models/mappers"; diff --git a/sdk/keyvault/arm-keyvault/src/models/privateLinkResourcesMappers.ts b/sdk/keyvault/arm-keyvault/src/models/privateLinkResourcesMappers.ts new file mode 100644 index 000000000000..48b51f81e109 --- /dev/null +++ b/sdk/keyvault/arm-keyvault/src/models/privateLinkResourcesMappers.ts @@ -0,0 +1,62 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AccessPolicyEntry, + Action, + Attributes, + BaseResource, + CloudError, + IPRule, + Key, + KeyAttributes, + KeyCreateParameters, + KeyProperties, + KeyReleasePolicy, + KeyRotationPolicyAttributes, + LifetimeAction, + ManagedHsm, + ManagedHsmProperties, + ManagedHsmResource, + ManagedHsmSku, + MHSMIPRule, + MHSMNetworkRuleSet, + MHSMPrivateEndpoint, + MHSMPrivateEndpointConnection, + MHSMPrivateEndpointConnectionItem, + MHSMPrivateLinkResource, + MHSMPrivateLinkServiceConnectionState, + MHSMVirtualNetworkRule, + NetworkRuleSet, + Permissions, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionItem, + PrivateLinkResource, + PrivateLinkResourceListResult, + PrivateLinkServiceConnectionState, + Resource, + RotationPolicy, + Secret, + SecretAttributes, + SecretCreateOrUpdateParameters, + SecretPatchParameters, + SecretPatchProperties, + SecretProperties, + Sku, + SystemData, + Trigger, + Vault, + VaultAccessPolicyParameters, + VaultAccessPolicyProperties, + VaultCreateOrUpdateParameters, + VaultPatchParameters, + VaultPatchProperties, + VaultProperties, + VirtualNetworkRule +} from "../models/mappers"; diff --git a/sdk/keyvault/arm-keyvault/src/models/secretsMappers.ts b/sdk/keyvault/arm-keyvault/src/models/secretsMappers.ts new file mode 100644 index 000000000000..ec4b3d12766f --- /dev/null +++ b/sdk/keyvault/arm-keyvault/src/models/secretsMappers.ts @@ -0,0 +1,62 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AccessPolicyEntry, + Action, + Attributes, + BaseResource, + CloudError, + IPRule, + Key, + KeyAttributes, + KeyCreateParameters, + KeyProperties, + KeyReleasePolicy, + KeyRotationPolicyAttributes, + LifetimeAction, + ManagedHsm, + ManagedHsmProperties, + ManagedHsmResource, + ManagedHsmSku, + MHSMIPRule, + MHSMNetworkRuleSet, + MHSMPrivateEndpoint, + MHSMPrivateEndpointConnection, + MHSMPrivateEndpointConnectionItem, + MHSMPrivateLinkResource, + MHSMPrivateLinkServiceConnectionState, + MHSMVirtualNetworkRule, + NetworkRuleSet, + Permissions, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionItem, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + Resource, + RotationPolicy, + Secret, + SecretAttributes, + SecretCreateOrUpdateParameters, + SecretListResult, + SecretPatchParameters, + SecretPatchProperties, + SecretProperties, + Sku, + SystemData, + Trigger, + Vault, + VaultAccessPolicyParameters, + VaultAccessPolicyProperties, + VaultCreateOrUpdateParameters, + VaultPatchParameters, + VaultPatchProperties, + VaultProperties, + VirtualNetworkRule +} from "../models/mappers"; diff --git a/sdk/keyvault/arm-keyvault/src/models/vaultsMappers.ts b/sdk/keyvault/arm-keyvault/src/models/vaultsMappers.ts index 2dece90eaec7..2a4d94cec5db 100644 --- a/sdk/keyvault/arm-keyvault/src/models/vaultsMappers.ts +++ b/sdk/keyvault/arm-keyvault/src/models/vaultsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,6 +8,8 @@ export { AccessPolicyEntry, + Action, + Attributes, BaseResource, CheckNameAvailabilityResult, CloudError, @@ -15,11 +17,44 @@ export { DeletedVaultListResult, DeletedVaultProperties, IPRule, + Key, + KeyAttributes, + KeyCreateParameters, + KeyProperties, + KeyReleasePolicy, + KeyRotationPolicyAttributes, + LifetimeAction, + ManagedHsm, + ManagedHsmProperties, + ManagedHsmResource, + ManagedHsmSku, + MHSMIPRule, + MHSMNetworkRuleSet, + MHSMPrivateEndpoint, + MHSMPrivateEndpointConnection, + MHSMPrivateEndpointConnectionItem, + MHSMPrivateLinkResource, + MHSMPrivateLinkServiceConnectionState, + MHSMVirtualNetworkRule, NetworkRuleSet, Permissions, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionItem, + PrivateLinkResource, + PrivateLinkServiceConnectionState, Resource, ResourceListResult, + RotationPolicy, + Secret, + SecretAttributes, + SecretCreateOrUpdateParameters, + SecretPatchParameters, + SecretPatchProperties, + SecretProperties, Sku, + SystemData, + Trigger, Vault, VaultAccessPolicyParameters, VaultAccessPolicyProperties, diff --git a/sdk/keyvault/arm-keyvault/src/operations/index.ts b/sdk/keyvault/arm-keyvault/src/operations/index.ts index 88c3eb19f212..022466d94ab3 100644 --- a/sdk/keyvault/arm-keyvault/src/operations/index.ts +++ b/sdk/keyvault/arm-keyvault/src/operations/index.ts @@ -1,12 +1,18 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is * regenerated. */ +export * from "./keys"; export * from "./vaults"; +export * from "./privateEndpointConnections"; +export * from "./privateLinkResources"; +export * from "./managedHsms"; +export * from "./mHSMPrivateEndpointConnections"; +export * from "./mHSMPrivateLinkResources"; export * from "./operations"; +export * from "./secrets"; diff --git a/sdk/keyvault/arm-keyvault/src/operations/keys.ts b/sdk/keyvault/arm-keyvault/src/operations/keys.ts new file mode 100644 index 000000000000..9ed30fe9a450 --- /dev/null +++ b/sdk/keyvault/arm-keyvault/src/operations/keys.ts @@ -0,0 +1,456 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/keysMappers"; +import * as Parameters from "../models/parameters"; +import { KeyVaultManagementClientContext } from "../keyVaultManagementClientContext"; + +/** Class representing a Keys. */ +export class Keys { + private readonly client: KeyVaultManagementClientContext; + + /** + * Create a Keys. + * @param {KeyVaultManagementClientContext} client Reference to the service client. + */ + constructor(client: KeyVaultManagementClientContext) { + this.client = client; + } + + /** + * Creates the first version of a new key if it does not exist. If it already exists, then the + * existing key is returned without any write operations being performed. This API does not create + * subsequent versions, and does not update existing keys. + * @param resourceGroupName The name of the resource group which contains the specified key vault. + * @param vaultName The name of the key vault which contains the key to be created. + * @param keyName The name of the key to be created. + * @param parameters The parameters used to create the specified key. + * @param [options] The optional parameters + * @returns Promise + */ + createIfNotExist(resourceGroupName: string, vaultName: string, keyName: string, parameters: Models.KeyCreateParameters, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group which contains the specified key vault. + * @param vaultName The name of the key vault which contains the key to be created. + * @param keyName The name of the key to be created. + * @param parameters The parameters used to create the specified key. + * @param callback The callback + */ + createIfNotExist(resourceGroupName: string, vaultName: string, keyName: string, parameters: Models.KeyCreateParameters, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group which contains the specified key vault. + * @param vaultName The name of the key vault which contains the key to be created. + * @param keyName The name of the key to be created. + * @param parameters The parameters used to create the specified key. + * @param options The optional parameters + * @param callback The callback + */ + createIfNotExist(resourceGroupName: string, vaultName: string, keyName: string, parameters: Models.KeyCreateParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createIfNotExist(resourceGroupName: string, vaultName: string, keyName: string, parameters: Models.KeyCreateParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vaultName, + keyName, + parameters, + options + }, + createIfNotExistOperationSpec, + callback) as Promise; + } + + /** + * Gets the current version of the specified key from the specified key vault. + * @param resourceGroupName The name of the resource group which contains the specified key vault. + * @param vaultName The name of the vault which contains the key to be retrieved. + * @param keyName The name of the key to be retrieved. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, vaultName: string, keyName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group which contains the specified key vault. + * @param vaultName The name of the vault which contains the key to be retrieved. + * @param keyName The name of the key to be retrieved. + * @param callback The callback + */ + get(resourceGroupName: string, vaultName: string, keyName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group which contains the specified key vault. + * @param vaultName The name of the vault which contains the key to be retrieved. + * @param keyName The name of the key to be retrieved. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, vaultName: string, keyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, vaultName: string, keyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vaultName, + keyName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Lists the keys in the specified key vault. + * @param resourceGroupName The name of the resource group which contains the specified key vault. + * @param vaultName The name of the vault which contains the keys to be retrieved. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, vaultName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group which contains the specified key vault. + * @param vaultName The name of the vault which contains the keys to be retrieved. + * @param callback The callback + */ + list(resourceGroupName: string, vaultName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group which contains the specified key vault. + * @param vaultName The name of the vault which contains the keys to be retrieved. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, vaultName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, vaultName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vaultName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets the specified version of the specified key in the specified key vault. + * @param resourceGroupName The name of the resource group which contains the specified key vault. + * @param vaultName The name of the vault which contains the key version to be retrieved. + * @param keyName The name of the key version to be retrieved. + * @param keyVersion The version of the key to be retrieved. + * @param [options] The optional parameters + * @returns Promise + */ + getVersion(resourceGroupName: string, vaultName: string, keyName: string, keyVersion: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group which contains the specified key vault. + * @param vaultName The name of the vault which contains the key version to be retrieved. + * @param keyName The name of the key version to be retrieved. + * @param keyVersion The version of the key to be retrieved. + * @param callback The callback + */ + getVersion(resourceGroupName: string, vaultName: string, keyName: string, keyVersion: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group which contains the specified key vault. + * @param vaultName The name of the vault which contains the key version to be retrieved. + * @param keyName The name of the key version to be retrieved. + * @param keyVersion The version of the key to be retrieved. + * @param options The optional parameters + * @param callback The callback + */ + getVersion(resourceGroupName: string, vaultName: string, keyName: string, keyVersion: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getVersion(resourceGroupName: string, vaultName: string, keyName: string, keyVersion: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vaultName, + keyName, + keyVersion, + options + }, + getVersionOperationSpec, + callback) as Promise; + } + + /** + * Lists the versions of the specified key in the specified key vault. + * @param resourceGroupName The name of the resource group which contains the specified key vault. + * @param vaultName The name of the vault which contains the key versions to be retrieved. + * @param keyName The name of the key versions to be retrieved. + * @param [options] The optional parameters + * @returns Promise + */ + listVersions(resourceGroupName: string, vaultName: string, keyName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group which contains the specified key vault. + * @param vaultName The name of the vault which contains the key versions to be retrieved. + * @param keyName The name of the key versions to be retrieved. + * @param callback The callback + */ + listVersions(resourceGroupName: string, vaultName: string, keyName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group which contains the specified key vault. + * @param vaultName The name of the vault which contains the key versions to be retrieved. + * @param keyName The name of the key versions to be retrieved. + * @param options The optional parameters + * @param callback The callback + */ + listVersions(resourceGroupName: string, vaultName: string, keyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listVersions(resourceGroupName: string, vaultName: string, keyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vaultName, + keyName, + options + }, + listVersionsOperationSpec, + callback) as Promise; + } + + /** + * Lists the keys in the specified key vault. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the versions of the specified key in the specified key vault. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listVersionsNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listVersionsNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listVersionsNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listVersionsNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listVersionsNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const createIfNotExistOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName0, + Parameters.keyName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.KeyCreateParameters, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Key + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName0, + Parameters.keyName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Key + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName0 + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.KeyListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getVersionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}/versions/{keyVersion}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName0, + Parameters.keyName, + Parameters.keyVersion + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Key + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listVersionsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}/versions", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName0, + Parameters.keyName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.KeyListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.KeyListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listVersionsNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.KeyListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/keyvault/arm-keyvault/src/operations/mHSMPrivateEndpointConnections.ts b/sdk/keyvault/arm-keyvault/src/operations/mHSMPrivateEndpointConnections.ts new file mode 100644 index 000000000000..481fc903ddce --- /dev/null +++ b/sdk/keyvault/arm-keyvault/src/operations/mHSMPrivateEndpointConnections.ts @@ -0,0 +1,353 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/mHSMPrivateEndpointConnectionsMappers"; +import * as Parameters from "../models/parameters"; +import { KeyVaultManagementClientContext } from "../keyVaultManagementClientContext"; + +/** Class representing a MHSMPrivateEndpointConnections. */ +export class MHSMPrivateEndpointConnections { + private readonly client: KeyVaultManagementClientContext; + + /** + * Create a MHSMPrivateEndpointConnections. + * @param {KeyVaultManagementClientContext} client Reference to the service client. + */ + constructor(client: KeyVaultManagementClientContext) { + this.client = client; + } + + /** + * The List operation gets information about the private endpoint connections associated with the + * managed HSM Pool. + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param [options] The optional parameters + * @returns Promise + */ + listByResource(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param callback The callback + */ + listByResource(resourceGroupName: string, name: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param options The optional parameters + * @param callback The callback + */ + listByResource(resourceGroupName: string, name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResource(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + name, + options + }, + listByResourceOperationSpec, + callback) as Promise; + } + + /** + * Gets the specified private endpoint connection associated with the managed HSM Pool. + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param privateEndpointConnectionName Name of the private endpoint connection associated with the + * managed hsm pool. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, name: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param privateEndpointConnectionName Name of the private endpoint connection associated with the + * managed hsm pool. + * @param callback The callback + */ + get(resourceGroupName: string, name: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param privateEndpointConnectionName Name of the private endpoint connection associated with the + * managed hsm pool. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, name: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, name: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + name, + privateEndpointConnectionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Updates the specified private endpoint connection associated with the managed hsm pool. + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param privateEndpointConnectionName Name of the private endpoint connection associated with the + * managed hsm pool. + * @param properties The intended state of private endpoint connection. + * @param [options] The optional parameters + * @returns Promise + */ + put(resourceGroupName: string, name: string, privateEndpointConnectionName: string, properties: Models.MHSMPrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param privateEndpointConnectionName Name of the private endpoint connection associated with the + * managed hsm pool. + * @param properties The intended state of private endpoint connection. + * @param callback The callback + */ + put(resourceGroupName: string, name: string, privateEndpointConnectionName: string, properties: Models.MHSMPrivateEndpointConnection, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param privateEndpointConnectionName Name of the private endpoint connection associated with the + * managed hsm pool. + * @param properties The intended state of private endpoint connection. + * @param options The optional parameters + * @param callback The callback + */ + put(resourceGroupName: string, name: string, privateEndpointConnectionName: string, properties: Models.MHSMPrivateEndpointConnection, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + put(resourceGroupName: string, name: string, privateEndpointConnectionName: string, properties: Models.MHSMPrivateEndpointConnection, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + name, + privateEndpointConnectionName, + properties, + options + }, + putOperationSpec, + callback) as Promise; + } + + /** + * Deletes the specified private endpoint connection associated with the managed hsm pool. + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param privateEndpointConnectionName Name of the private endpoint connection associated with the + * managed hsm pool. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, name: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,name,privateEndpointConnectionName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes the specified private endpoint connection associated with the managed hsm pool. + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param privateEndpointConnectionName Name of the private endpoint connection associated with the + * managed hsm pool. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, name: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + name, + privateEndpointConnectionName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * The List operation gets information about the private endpoint connections associated with the + * managed HSM Pool. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByResourceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/privateEndpointConnections", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MHSMPrivateEndpointConnectionsListResult + }, + default: { + bodyMapper: Mappers.ManagedHsmError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MHSMPrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ManagedHsmError + } + }, + serializer +}; + +const putOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "properties", + mapper: { + ...Mappers.MHSMPrivateEndpointConnection, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.MHSMPrivateEndpointConnection, + headersMapper: Mappers.MHSMPrivateEndpointConnectionsPutHeaders + }, + default: { + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.MHSMPrivateEndpointConnectionsPutHeaders + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MHSMPrivateEndpointConnection, + headersMapper: Mappers.MHSMPrivateEndpointConnectionsDeleteHeaders + }, + 202: { + headersMapper: Mappers.MHSMPrivateEndpointConnectionsDeleteHeaders + }, + 204: { + headersMapper: Mappers.MHSMPrivateEndpointConnectionsDeleteHeaders + }, + default: { + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.MHSMPrivateEndpointConnectionsDeleteHeaders + } + }, + serializer +}; + +const listByResourceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MHSMPrivateEndpointConnectionsListResult + }, + default: { + bodyMapper: Mappers.ManagedHsmError + } + }, + serializer +}; diff --git a/sdk/keyvault/arm-keyvault/src/operations/mHSMPrivateLinkResources.ts b/sdk/keyvault/arm-keyvault/src/operations/mHSMPrivateLinkResources.ts new file mode 100644 index 000000000000..a78fcdde9bfe --- /dev/null +++ b/sdk/keyvault/arm-keyvault/src/operations/mHSMPrivateLinkResources.ts @@ -0,0 +1,86 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/mHSMPrivateLinkResourcesMappers"; +import * as Parameters from "../models/parameters"; +import { KeyVaultManagementClientContext } from "../keyVaultManagementClientContext"; + +/** Class representing a MHSMPrivateLinkResources. */ +export class MHSMPrivateLinkResources { + private readonly client: KeyVaultManagementClientContext; + + /** + * Create a MHSMPrivateLinkResources. + * @param {KeyVaultManagementClientContext} client Reference to the service client. + */ + constructor(client: KeyVaultManagementClientContext) { + this.client = client; + } + + /** + * Gets the private link resources supported for the managed hsm pool. + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param [options] The optional parameters + * @returns Promise + */ + listByMHSMResource(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param callback The callback + */ + listByMHSMResource(resourceGroupName: string, name: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param options The optional parameters + * @param callback The callback + */ + listByMHSMResource(resourceGroupName: string, name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByMHSMResource(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + name, + options + }, + listByMHSMResourceOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByMHSMResourceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/privateLinkResources", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MHSMPrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/keyvault/arm-keyvault/src/operations/managedHsms.ts b/sdk/keyvault/arm-keyvault/src/operations/managedHsms.ts new file mode 100644 index 000000000000..657b42adeaf4 --- /dev/null +++ b/sdk/keyvault/arm-keyvault/src/operations/managedHsms.ts @@ -0,0 +1,702 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/managedHsmsMappers"; +import * as Parameters from "../models/parameters"; +import { KeyVaultManagementClientContext } from "../keyVaultManagementClientContext"; + +/** Class representing a ManagedHsms. */ +export class ManagedHsms { + private readonly client: KeyVaultManagementClientContext; + + /** + * Create a ManagedHsms. + * @param {KeyVaultManagementClientContext} client Reference to the service client. + */ + constructor(client: KeyVaultManagementClientContext) { + this.client = client; + } + + /** + * Create or update a managed HSM Pool in the specified subscription. + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param parameters Parameters to create or update the managed HSM Pool + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, name: string, parameters: Models.ManagedHsm, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,name,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Update a managed HSM Pool in the specified subscription. + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param parameters Parameters to patch the managed HSM Pool + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, name: string, parameters: Models.ManagedHsm, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,name,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes the specified managed HSM Pool. + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name The name of the managed HSM Pool to delete + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,name,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Gets the specified managed HSM Pool. + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name The name of the managed HSM Pool. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name The name of the managed HSM Pool. + * @param callback The callback + */ + get(resourceGroupName: string, name: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name The name of the managed HSM Pool. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + name, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * The List operation gets information about the managed HSM Pools associated with the subscription + * and within the specified resource group. + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: Models.ManagedHsmsListByResourceGroupOptionalParams): Promise; + /** + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, options: Models.ManagedHsmsListByResourceGroupOptionalParams, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: Models.ManagedHsmsListByResourceGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * The List operation gets information about the managed HSM Pools associated with the + * subscription. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscription(options?: Models.ManagedHsmsListBySubscriptionOptionalParams): Promise; + /** + * @param callback The callback + */ + listBySubscription(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listBySubscription(options: Models.ManagedHsmsListBySubscriptionOptionalParams, callback: msRest.ServiceCallback): void; + listBySubscription(options?: Models.ManagedHsmsListBySubscriptionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listBySubscriptionOperationSpec, + callback) as Promise; + } + + /** + * The List operation gets information about the deleted managed HSMs associated with the + * subscription. + * @param [options] The optional parameters + * @returns Promise + */ + listDeleted(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listDeleted(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listDeleted(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listDeleted(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listDeletedOperationSpec, + callback) as Promise; + } + + /** + * Gets the specified deleted managed HSM. + * @param name The name of the deleted managed HSM. + * @param location The location of the deleted managed HSM. + * @param [options] The optional parameters + * @returns Promise + */ + getDeleted(name: string, location: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param name The name of the deleted managed HSM. + * @param location The location of the deleted managed HSM. + * @param callback The callback + */ + getDeleted(name: string, location: string, callback: msRest.ServiceCallback): void; + /** + * @param name The name of the deleted managed HSM. + * @param location The location of the deleted managed HSM. + * @param options The optional parameters + * @param callback The callback + */ + getDeleted(name: string, location: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getDeleted(name: string, location: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + name, + location, + options + }, + getDeletedOperationSpec, + callback) as Promise; + } + + /** + * Permanently deletes the specified managed HSM. + * @param name The name of the soft-deleted managed HSM. + * @param location The location of the soft-deleted managed HSM. + * @param [options] The optional parameters + * @returns Promise + */ + purgeDeleted(name: string, location: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginPurgeDeleted(name,location,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Create or update a managed HSM Pool in the specified subscription. + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param parameters Parameters to create or update the managed HSM Pool + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, name: string, parameters: Models.ManagedHsm, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + name, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Update a managed HSM Pool in the specified subscription. + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param parameters Parameters to patch the managed HSM Pool + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, name: string, parameters: Models.ManagedHsm, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + name, + parameters, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Deletes the specified managed HSM Pool. + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name The name of the managed HSM Pool to delete + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + name, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Permanently deletes the specified managed HSM. + * @param name The name of the soft-deleted managed HSM. + * @param location The location of the soft-deleted managed HSM. + * @param [options] The optional parameters + * @returns Promise + */ + beginPurgeDeleted(name: string, location: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + name, + location, + options + }, + beginPurgeDeletedOperationSpec, + options); + } + + /** + * The List operation gets information about the managed HSM Pools associated with the subscription + * and within the specified resource group. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroupNext(nextPageLink: string, options?: Models.ManagedHsmsListByResourceGroupNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, options: Models.ManagedHsmsListByResourceGroupNextOptionalParams, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: Models.ManagedHsmsListByResourceGroupNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } + + /** + * The List operation gets information about the managed HSM Pools associated with the + * subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscriptionNext(nextPageLink: string, options?: Models.ManagedHsmsListBySubscriptionNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listBySubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listBySubscriptionNext(nextPageLink: string, options: Models.ManagedHsmsListBySubscriptionNextOptionalParams, callback: msRest.ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: Models.ManagedHsmsListBySubscriptionNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listBySubscriptionNextOperationSpec, + callback) as Promise; + } + + /** + * The List operation gets information about the deleted managed HSMs associated with the + * subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listDeletedNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listDeletedNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listDeletedNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listDeletedNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listDeletedNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.name, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedHsm + }, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ManagedHsmError + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.top, + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedHsmListResult + }, + default: { + bodyMapper: Mappers.ManagedHsmError + } + }, + serializer +}; + +const listBySubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/managedHSMs", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.top, + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedHsmListResult + }, + default: { + bodyMapper: Mappers.ManagedHsmError + } + }, + serializer +}; + +const listDeletedOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/deletedManagedHSMs", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DeletedManagedHsmListResult + }, + default: { + bodyMapper: Mappers.ManagedHsmError + } + }, + serializer +}; + +const getDeletedOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedManagedHSMs/{name}", + urlParameters: [ + Parameters.name, + Parameters.location, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DeletedManagedHsm + }, + default: { + bodyMapper: Mappers.ManagedHsmError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.name, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ManagedHsm, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ManagedHsm + }, + 202: { + bodyMapper: Mappers.ManagedHsm + }, + default: { + bodyMapper: Mappers.ManagedHsmError + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.name, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ManagedHsm, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ManagedHsm + }, + 202: { + bodyMapper: Mappers.ManagedHsm + }, + default: { + bodyMapper: Mappers.ManagedHsmError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.name, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ManagedHsmError + } + }, + serializer +}; + +const beginPurgeDeletedOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedManagedHSMs/{name}/purge", + urlParameters: [ + Parameters.name, + Parameters.location, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 202: {}, + default: { + bodyMapper: Mappers.ManagedHsmError + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.top, + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedHsmListResult + }, + default: { + bodyMapper: Mappers.ManagedHsmError + } + }, + serializer +}; + +const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.top, + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedHsmListResult + }, + default: { + bodyMapper: Mappers.ManagedHsmError + } + }, + serializer +}; + +const listDeletedNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DeletedManagedHsmListResult + }, + default: { + bodyMapper: Mappers.ManagedHsmError + } + }, + serializer +}; diff --git a/sdk/keyvault/arm-keyvault/src/operations/operations.ts b/sdk/keyvault/arm-keyvault/src/operations/operations.ts index 56cd43eb33ca..aa0c5c62b317 100644 --- a/sdk/keyvault/arm-keyvault/src/operations/operations.ts +++ b/sdk/keyvault/arm-keyvault/src/operations/operations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -108,6 +107,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion0 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/keyvault/arm-keyvault/src/operations/privateEndpointConnections.ts b/sdk/keyvault/arm-keyvault/src/operations/privateEndpointConnections.ts new file mode 100644 index 000000000000..f3e94b8174a7 --- /dev/null +++ b/sdk/keyvault/arm-keyvault/src/operations/privateEndpointConnections.ts @@ -0,0 +1,354 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateEndpointConnectionsMappers"; +import * as Parameters from "../models/parameters"; +import { KeyVaultManagementClientContext } from "../keyVaultManagementClientContext"; + +/** Class representing a PrivateEndpointConnections. */ +export class PrivateEndpointConnections { + private readonly client: KeyVaultManagementClientContext; + + /** + * Create a PrivateEndpointConnections. + * @param {KeyVaultManagementClientContext} client Reference to the service client. + */ + constructor(client: KeyVaultManagementClientContext) { + this.client = client; + } + + /** + * Gets the specified private endpoint connection associated with the key vault. + * @param resourceGroupName Name of the resource group that contains the key vault. + * @param vaultName The name of the key vault. + * @param privateEndpointConnectionName Name of the private endpoint connection associated with the + * key vault. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, vaultName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group that contains the key vault. + * @param vaultName The name of the key vault. + * @param privateEndpointConnectionName Name of the private endpoint connection associated with the + * key vault. + * @param callback The callback + */ + get(resourceGroupName: string, vaultName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group that contains the key vault. + * @param vaultName The name of the key vault. + * @param privateEndpointConnectionName Name of the private endpoint connection associated with the + * key vault. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, vaultName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, vaultName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vaultName, + privateEndpointConnectionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Updates the specified private endpoint connection associated with the key vault. + * @param resourceGroupName Name of the resource group that contains the key vault. + * @param vaultName The name of the key vault. + * @param privateEndpointConnectionName Name of the private endpoint connection associated with the + * key vault. + * @param properties The intended state of private endpoint connection. + * @param [options] The optional parameters + * @returns Promise + */ + put(resourceGroupName: string, vaultName: string, privateEndpointConnectionName: string, properties: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group that contains the key vault. + * @param vaultName The name of the key vault. + * @param privateEndpointConnectionName Name of the private endpoint connection associated with the + * key vault. + * @param properties The intended state of private endpoint connection. + * @param callback The callback + */ + put(resourceGroupName: string, vaultName: string, privateEndpointConnectionName: string, properties: Models.PrivateEndpointConnection, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group that contains the key vault. + * @param vaultName The name of the key vault. + * @param privateEndpointConnectionName Name of the private endpoint connection associated with the + * key vault. + * @param properties The intended state of private endpoint connection. + * @param options The optional parameters + * @param callback The callback + */ + put(resourceGroupName: string, vaultName: string, privateEndpointConnectionName: string, properties: Models.PrivateEndpointConnection, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + put(resourceGroupName: string, vaultName: string, privateEndpointConnectionName: string, properties: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vaultName, + privateEndpointConnectionName, + properties, + options + }, + putOperationSpec, + callback) as Promise; + } + + /** + * Deletes the specified private endpoint connection associated with the key vault. + * @param resourceGroupName Name of the resource group that contains the key vault. + * @param vaultName The name of the key vault. + * @param privateEndpointConnectionName Name of the private endpoint connection associated with the + * key vault. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, vaultName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,vaultName,privateEndpointConnectionName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * The List operation gets information about the private endpoint connections associated with the + * vault. + * @param resourceGroupName Name of the resource group that contains the key vault. + * @param vaultName The name of the key vault. + * @param [options] The optional parameters + * @returns Promise + */ + listByResource(resourceGroupName: string, vaultName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group that contains the key vault. + * @param vaultName The name of the key vault. + * @param callback The callback + */ + listByResource(resourceGroupName: string, vaultName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group that contains the key vault. + * @param vaultName The name of the key vault. + * @param options The optional parameters + * @param callback The callback + */ + listByResource(resourceGroupName: string, vaultName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResource(resourceGroupName: string, vaultName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vaultName, + options + }, + listByResourceOperationSpec, + callback) as Promise; + } + + /** + * Deletes the specified private endpoint connection associated with the key vault. + * @param resourceGroupName Name of the resource group that contains the key vault. + * @param vaultName The name of the key vault. + * @param privateEndpointConnectionName Name of the private endpoint connection associated with the + * key vault. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, vaultName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + vaultName, + privateEndpointConnectionName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * The List operation gets information about the private endpoint connections associated with the + * vault. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName0, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const putOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName0, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "properties", + mapper: { + ...Mappers.PrivateEndpointConnection, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection, + headersMapper: Mappers.PrivateEndpointConnectionsPutHeaders + }, + default: { + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.PrivateEndpointConnectionsPutHeaders + } + }, + serializer +}; + +const listByResourceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateEndpointConnections", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName0 + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName0, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection, + headersMapper: Mappers.PrivateEndpointConnectionsDeleteHeaders + }, + 202: { + headersMapper: Mappers.PrivateEndpointConnectionsDeleteHeaders + }, + 204: { + headersMapper: Mappers.PrivateEndpointConnectionsDeleteHeaders + }, + default: { + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.PrivateEndpointConnectionsDeleteHeaders + } + }, + serializer +}; + +const listByResourceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/keyvault/arm-keyvault/src/operations/privateLinkResources.ts b/sdk/keyvault/arm-keyvault/src/operations/privateLinkResources.ts new file mode 100644 index 000000000000..cca698e0dc3d --- /dev/null +++ b/sdk/keyvault/arm-keyvault/src/operations/privateLinkResources.ts @@ -0,0 +1,86 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateLinkResourcesMappers"; +import * as Parameters from "../models/parameters"; +import { KeyVaultManagementClientContext } from "../keyVaultManagementClientContext"; + +/** Class representing a PrivateLinkResources. */ +export class PrivateLinkResources { + private readonly client: KeyVaultManagementClientContext; + + /** + * Create a PrivateLinkResources. + * @param {KeyVaultManagementClientContext} client Reference to the service client. + */ + constructor(client: KeyVaultManagementClientContext) { + this.client = client; + } + + /** + * Gets the private link resources supported for the key vault. + * @param resourceGroupName Name of the resource group that contains the key vault. + * @param vaultName The name of the key vault. + * @param [options] The optional parameters + * @returns Promise + */ + listByVault(resourceGroupName: string, vaultName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group that contains the key vault. + * @param vaultName The name of the key vault. + * @param callback The callback + */ + listByVault(resourceGroupName: string, vaultName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group that contains the key vault. + * @param vaultName The name of the key vault. + * @param options The optional parameters + * @param callback The callback + */ + listByVault(resourceGroupName: string, vaultName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByVault(resourceGroupName: string, vaultName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vaultName, + options + }, + listByVaultOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByVaultOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateLinkResources", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName0 + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/keyvault/arm-keyvault/src/operations/secrets.ts b/sdk/keyvault/arm-keyvault/src/operations/secrets.ts new file mode 100644 index 000000000000..f5801917d435 --- /dev/null +++ b/sdk/keyvault/arm-keyvault/src/operations/secrets.ts @@ -0,0 +1,363 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/secretsMappers"; +import * as Parameters from "../models/parameters"; +import { KeyVaultManagementClientContext } from "../keyVaultManagementClientContext"; + +/** Class representing a Secrets. */ +export class Secrets { + private readonly client: KeyVaultManagementClientContext; + + /** + * Create a Secrets. + * @param {KeyVaultManagementClientContext} client Reference to the service client. + */ + constructor(client: KeyVaultManagementClientContext) { + this.client = client; + } + + /** + * 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. + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName Name of the vault + * @param secretName Name of the secret + * @param parameters Parameters to create or update the secret + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, vaultName: string, secretName: string, parameters: Models.SecretCreateOrUpdateParameters, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName Name of the vault + * @param secretName Name of the secret + * @param parameters Parameters to create or update the secret + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, vaultName: string, secretName: string, parameters: Models.SecretCreateOrUpdateParameters, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName Name of the vault + * @param secretName Name of the secret + * @param parameters Parameters to create or update the secret + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, vaultName: string, secretName: string, parameters: Models.SecretCreateOrUpdateParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, vaultName: string, secretName: string, parameters: Models.SecretCreateOrUpdateParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vaultName, + secretName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * 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. + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName Name of the vault + * @param secretName Name of the secret + * @param parameters Parameters to patch the secret + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, vaultName: string, secretName: string, parameters: Models.SecretPatchParameters, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName Name of the vault + * @param secretName Name of the secret + * @param parameters Parameters to patch the secret + * @param callback The callback + */ + update(resourceGroupName: string, vaultName: string, secretName: string, parameters: Models.SecretPatchParameters, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName Name of the vault + * @param secretName Name of the secret + * @param parameters Parameters to patch the secret + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, vaultName: string, secretName: string, parameters: Models.SecretPatchParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, vaultName: string, secretName: string, parameters: Models.SecretPatchParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vaultName, + secretName, + parameters, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * 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. + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName The name of the vault. + * @param secretName The name of the secret. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, vaultName: string, secretName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName The name of the vault. + * @param secretName The name of the secret. + * @param callback The callback + */ + get(resourceGroupName: string, vaultName: string, secretName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName The name of the vault. + * @param secretName The name of the secret. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, vaultName: string, secretName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, vaultName: string, secretName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vaultName, + secretName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * 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. + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName The name of the vault. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, vaultName: string, options?: Models.SecretsListOptionalParams): Promise; + /** + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName The name of the vault. + * @param callback The callback + */ + list(resourceGroupName: string, vaultName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName The name of the vault. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, vaultName: string, options: Models.SecretsListOptionalParams, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, vaultName: string, options?: Models.SecretsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vaultName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * 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. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: Models.SecretsListNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: Models.SecretsListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.SecretsListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{secretName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.vaultName0, + Parameters.secretName0, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.SecretCreateOrUpdateParameters, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Secret + }, + 201: { + bodyMapper: Mappers.Secret + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{secretName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.vaultName0, + Parameters.secretName0, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.SecretPatchParameters, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Secret + }, + 201: { + bodyMapper: Mappers.Secret + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{secretName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.vaultName1, + Parameters.secretName1, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Secret + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.vaultName1, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.top, + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecretListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.top, + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecretListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/keyvault/arm-keyvault/src/operations/vaults.ts b/sdk/keyvault/arm-keyvault/src/operations/vaults.ts index c6ee4218f7c4..60c94a91b651 100644 --- a/sdk/keyvault/arm-keyvault/src/operations/vaults.ts +++ b/sdk/keyvault/arm-keyvault/src/operations/vaults.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -398,7 +397,7 @@ export class Vaults { * @param [options] The optional parameters * @returns Promise */ - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listByResourceGroupNext(nextPageLink: string, options?: Models.VaultsListByResourceGroupNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -409,8 +408,8 @@ export class Vaults { * @param options The optional parameters * @param callback The callback */ - listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByResourceGroupNext(nextPageLink: string, options: Models.VaultsListByResourceGroupNextOptionalParams, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: Models.VaultsListByResourceGroupNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -426,7 +425,7 @@ export class Vaults { * @param [options] The optional parameters * @returns Promise */ - listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listBySubscriptionNext(nextPageLink: string, options?: Models.VaultsListBySubscriptionNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -437,8 +436,8 @@ export class Vaults { * @param options The optional parameters * @param callback The callback */ - listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listBySubscriptionNext(nextPageLink: string, options: Models.VaultsListBySubscriptionNextOptionalParams, callback: msRest.ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: Models.VaultsListBySubscriptionNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -482,7 +481,7 @@ export class Vaults { * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: Models.VaultsListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -493,8 +492,8 @@ export class Vaults { * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext(nextPageLink: string, options: Models.VaultsListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.VaultsListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -558,6 +557,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { ], responses: { 200: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } @@ -619,6 +619,9 @@ const updateAccessPolicyOperationSpec: msRest.OperationSpec = { 201: { bodyMapper: Mappers.VaultAccessPolicyParameters }, + 404: { + bodyMapper: Mappers.CloudError + }, default: { bodyMapper: Mappers.CloudError } @@ -830,6 +833,9 @@ const beginPurgeDeletedOperationSpec: msRest.OperationSpec = { responses: { 200: {}, 202: {}, + 404: { + bodyMapper: Mappers.CloudError + }, default: { bodyMapper: Mappers.CloudError } @@ -844,6 +850,10 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.top, + Parameters.apiVersion0 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -865,6 +875,10 @@ const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.top, + Parameters.apiVersion0 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -886,6 +900,9 @@ const listDeletedNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion0 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -907,6 +924,11 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.apiVersion1 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/keyvault/arm-keyvault/tsconfig.json b/sdk/keyvault/arm-keyvault/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/keyvault/arm-keyvault/tsconfig.json +++ b/sdk/keyvault/arm-keyvault/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true