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..1e162c388140 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,7 +36,6 @@ 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. ##### Sample code @@ -87,7 +85,7 @@ 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"; @@ -109,4 +107,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 9448e740b4d1..56b5a25fa120 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.0", "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", + "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..9c2f9348a107 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 @@ -19,6 +18,11 @@ import { KeyVaultManagementClientContext } from "./keyVaultManagementClientConte class KeyVaultManagementClient extends KeyVaultManagementClientContext { // Operation groups vaults: operations.Vaults; + privateEndpointConnections: operations.PrivateEndpointConnections; + privateLinkResources: operations.PrivateLinkResources; + managedHsms: operations.ManagedHsms; + mHSMPrivateEndpointConnections: operations.MHSMPrivateEndpointConnections; + mHSMPrivateLinkResources: operations.MHSMPrivateLinkResources; operations: operations.Operations; /** @@ -36,6 +40,11 @@ class KeyVaultManagementClient extends KeyVaultManagementClientContext { constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.KeyVaultManagementClientOptions) { super(credentials, subscriptionId, options); 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); } } diff --git a/sdk/keyvault/arm-keyvault/src/keyVaultManagementClientContext.ts b/sdk/keyvault/arm-keyvault/src/keyVaultManagementClientContext.ts index dce7445b9f76..f29236065134 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.0"; @@ -44,14 +43,14 @@ export class KeyVaultManagementClientContext extends msRestAzure.AzureServiceCli if (!options) { options = {}; } - if(!options.userAgent) { + if (!options.userAgent) { const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; } super(credentials, options); - this.apiVersion = '2018-02-14'; + this.apiVersion = '2021-04-01-preview'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; @@ -59,10 +58,10 @@ export class KeyVaultManagementClientContext extends msRestAzure.AzureServiceCli this.credentials = credentials; this.subscriptionId = subscriptionId; - if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; } - if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; } } diff --git a/sdk/keyvault/arm-keyvault/src/models/index.ts b/sdk/keyvault/arm-keyvault/src/models/index.ts index f6d55103853c..363f68c63904 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,38 @@ 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; +} + /** * SKU details */ @@ -89,6 +121,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 +152,64 @@ export interface NetworkRuleSet { virtualNetworkRules?: VirtualNetworkRule[]; } +/** + * 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; +} + +/** + * 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 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 +224,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 +233,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 +254,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 +287,18 @@ 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[]; } /** @@ -212,10 +335,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' @@ -276,6 +412,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 +482,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 */ @@ -404,6 +543,37 @@ export interface DeletedVault { properties?: DeletedVaultProperties; } +/** + * 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 parameters used to check the availability of the vault name. */ @@ -438,148 +608,827 @@ export interface CheckNameAvailabilityResult { } /** - * Display metadata associated with the operation. + * Private endpoint connection resource. */ -export interface OperationDisplay { +export interface PrivateEndpointConnection extends BaseResource { /** - * Service provider: Microsoft Key Vault. + * Properties of the private endpoint object. */ - provider?: string; + privateEndpoint?: PrivateEndpoint; /** - * Resource on which the operation is performed etc. + * Approval state of the private link connection. */ - resource?: string; + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; /** - * Type of operation: get, read, delete, etc. + * Provisioning state of the private endpoint connection. Possible values include: 'Succeeded', + * 'Creating', 'Updating', 'Deleting', 'Failed', 'Disconnected' */ - operation?: string; + provisioningState?: PrivateEndpointConnectionProvisioningState; /** - * Description of operation. + * Modified whenever there is a change in the state of private endpoint connection. */ - description?: string; + etag?: string; } /** - * Log specification of operation. + * A private link resource */ -export interface LogSpecification { +export interface PrivateLinkResource extends Resource { /** - * Name of log specification. + * Group identifier of private link resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - name?: string; + readonly groupId?: string; /** - * Display name of log specification. + * Required member names of private link resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - displayName?: string; + readonly requiredMembers?: string[]; /** - * Blob duration of specification. + * Required DNS zone names of the the private link resource. */ - blobDuration?: string; + requiredZoneNames?: string[]; } /** - * One property of operation, include log specifications. + * A list of private link resources */ -export interface ServiceSpecification { +export interface PrivateLinkResourceListResult { /** - * Log specifications of operation. + * Array of private link resources */ - logSpecifications?: LogSpecification[]; + value?: PrivateLinkResource[]; } /** - * Key Vault REST API operation definition. + * SKU details */ -export interface Operation { - /** - * Operation name: {provider}/{resource}/{operation} - */ - name?: string; - /** - * Display metadata associated with the operation. - */ - display?: OperationDisplay; - /** - * The origin of operations. - */ - origin?: string; +export interface ManagedHsmSku { /** - * One property of operation, include metric specifications. + * SKU of the managed HSM Pool. Possible values include: 'Standard_B1', 'Custom_B32' */ - serviceSpecification?: ServiceSpecification; + name: ManagedHsmSkuName; } /** - * Optional Parameters. + * A rule governing the accessibility of a managed hsm pool from a specific ip address or ip range. */ -export interface VaultsListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { +export interface MHSMIPRule { /** - * Maximum number of results to return. + * 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). */ - top?: number; + value: string; } /** - * Optional Parameters. + * A rule governing the accessibility of a managed hsm pool from a specific virtual network. */ -export interface VaultsListBySubscriptionOptionalParams extends msRest.RequestOptionsBase { +export interface MHSMVirtualNetworkRule { /** - * Maximum number of results to return. + * Full resource id of a vnet subnet, such as + * '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. */ - top?: number; + id: string; } /** - * Optional Parameters. + * A set of rules governing the network accessibility of a managed hsm pool. */ -export interface VaultsListOptionalParams extends msRest.RequestOptionsBase { +export interface MHSMNetworkRuleSet { /** - * Maximum number of results to return. + * 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' */ - top?: number; + 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[]; } /** - * An interface representing KeyVaultManagementClientOptions. + * Private endpoint object properties. */ -export interface KeyVaultManagementClientOptions extends AzureServiceClientOptions { - baseUri?: string; +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; } /** - * @interface - * List of vaults - * @extends Array + * An object that represents the approval state of the private link connection. */ -export interface VaultListResult extends Array { +export interface MHSMPrivateLinkServiceConnectionState { /** - * The URL to get the next set of vaults. + * Indicates whether the connection has been approved, rejected or removed by the key vault + * owner. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' */ - nextLink?: string; + 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; } /** - * @interface - * List of vaults - * @extends Array + * Private endpoint connection item. */ -export interface DeletedVaultListResult extends Array { +export interface MHSMPrivateEndpointConnectionItem { /** - * The URL to get the next set of deleted vaults. + * Properties of the private endpoint object. */ - nextLink?: string; + 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; } /** - * @interface - * List of vault resources. - * @extends Array + * Properties of the managed HSM Pool */ -export interface ResourceListResult extends Array { +export interface ManagedHsmProperties { /** - * The URL to get the next set of vault resources. + * The Azure Active Directory tenant ID that should be used for authenticating requests to the + * managed HSM pool. */ - nextLink?: string; + 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; +} + +/** + * Managed HSM resource + */ +export interface ManagedHsmResource extends BaseResource { + /** + * 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.** + */ + 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; + /** + * The supported Azure location where the managed HSM Pool should be created. + */ + location?: string; + /** + * SKU details + */ + sku?: ManagedHsmSku; + /** + * Resource tags + */ + tags?: { [propertyName: string]: string }; + systemData?: SystemData; +} + +/** + * Resource information with extended details. + */ +export interface ManagedHsm extends ManagedHsmResource { + /** + * Properties of the managed HSM + */ + properties?: ManagedHsmProperties; +} + +/** + * Private endpoint connection resource. + */ +export interface MHSMPrivateEndpointConnection extends BaseResource { + /** + * Properties of the private endpoint object. + */ + 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; +} + +/** + * The server error. + */ +export interface ErrorModel { + /** + * The error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + 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; +} + +/** + * The error exception. + */ +export interface ManagedHsmError { + /** + * The server error. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly error?: ErrorModel; +} + +/** + * Properties of the deleted managed HSM. + */ +export interface DeletedManagedHsmProperties { + /** + * The resource id of the original managed HSM. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + 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; +} + +/** + * 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; +} + +/** + * 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; +} + +/** + * 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 + * 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; } /** @@ -588,101 +1437,658 @@ export interface ResourceListResult extends Array { * link to get the next set of results. * @extends Array */ -export interface OperationListResult extends Array { +export interface OperationListResult extends Array { + /** + * The URL to get the next set of operations. + */ + 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 SkuName. + * Possible values include: 'standard', 'premium' + * @readonly + * @enum {string} + */ +export type SkuName = 'standard' | 'premium'; + +/** + * Defines values for KeyPermissions. + * Possible values include: 'encrypt', 'decrypt', 'wrapKey', 'unwrapKey', 'sign', 'verify', 'get', + * 'list', 'create', 'update', 'import', 'delete', 'backup', 'restore', 'recover', 'purge', + * 'release' + * @readonly + * @enum {string} + */ +export type KeyPermissions = 'encrypt' | 'decrypt' | 'wrapKey' | 'unwrapKey' | 'sign' | 'verify' | 'get' | 'list' | 'create' | 'update' | 'import' | 'delete' | 'backup' | 'restore' | 'recover' | 'purge' | 'release'; + +/** + * 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'; + +/** + * 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} + */ +export type CertificatePermissions = 'get' | 'list' | 'delete' | 'create' | 'import' | 'update' | 'managecontacts' | 'getissuers' | 'listissuers' | 'setissuers' | 'deleteissuers' | 'manageissuers' | 'recover' | 'purge' | 'backup' | 'restore'; + +/** + * 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'; + +/** + * 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 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 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 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 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 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: PrivateEndpointConnection; + }; +}; /** - * 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 put operation. */ -export type KeyPermissions = 'encrypt' | 'decrypt' | 'wrapKey' | 'unwrapKey' | 'sign' | 'verify' | 'get' | 'list' | 'create' | 'update' | 'import' | 'delete' | 'backup' | 'restore' | 'recover' | 'purge'; +export type PrivateEndpointConnectionsPutResponse = PrivateEndpointConnection & PrivateEndpointConnectionsPutHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: PrivateEndpointConnectionsPutHeaders; -/** - * 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 text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnection; + }; +}; /** - * 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 deleteMethod operation. */ -export type CertificatePermissions = 'get' | 'list' | 'delete' | 'create' | 'import' | 'update' | 'managecontacts' | 'getissuers' | 'listissuers' | 'setissuers' | 'deleteissuers' | 'manageissuers' | 'recover' | 'purge' | 'backup' | 'restore'; +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; + }; +}; /** - * Defines values for StoragePermissions. - * Possible values include: 'get', 'list', 'delete', 'set', 'update', 'regeneratekey', 'recover', - * 'purge', 'backup', 'restore', 'setsas', 'listsas', 'getsas', 'deletesas' - * @readonly - * @enum {string} + * Contains response data for the listByResource operation. */ -export type StoragePermissions = 'get' | 'list' | 'delete' | 'set' | 'update' | 'regeneratekey' | 'recover' | 'purge' | 'backup' | 'restore' | 'setsas' | 'listsas' | 'getsas' | 'deletesas'; +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; + }; +}; /** - * Defines values for CreateMode. - * Possible values include: 'recover', 'default' - * @readonly - * @enum {string} + * Contains response data for the listByResourceNext operation. */ -export type CreateMode = 'recover' | 'default'; +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; + }; +}; /** - * Defines values for NetworkRuleBypassOptions. - * Possible values include: 'AzureServices', 'None' - * @readonly - * @enum {string} + * Contains response data for the listByVault operation. */ -export type NetworkRuleBypassOptions = 'AzureServices' | 'None'; +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; + }; +}; /** - * Defines values for NetworkRuleAction. - * Possible values include: 'Allow', 'Deny' - * @readonly - * @enum {string} + * Contains response data for the createOrUpdate operation. */ -export type NetworkRuleAction = 'Allow' | 'Deny'; +export type ManagedHsmsCreateOrUpdateResponse = 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; + }; +}; /** - * Defines values for Reason. - * Possible values include: 'AccountNameInvalid', 'AlreadyExists' - * @readonly - * @enum {string} + * Contains response data for the update operation. */ -export type Reason = 'AccountNameInvalid' | 'AlreadyExists'; +export type ManagedHsmsUpdateResponse = 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; + }; +}; /** - * Defines values for AccessPolicyUpdateKind. - * Possible values include: 'add', 'replace', 'remove' - * @readonly - * @enum {string} + * Contains response data for the get operation. */ -export type AccessPolicyUpdateKind = 'add' | 'replace' | 'remove'; +export type ManagedHsmsGetResponse = 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 listByResourceGroup operation. */ -export type VaultsCreateOrUpdateResponse = Vault & { +export type ManagedHsmsListByResourceGroupResponse = ManagedHsmListResult & { /** * The underlying HTTP response. */ @@ -695,14 +2101,14 @@ export type VaultsCreateOrUpdateResponse = Vault & { /** * The response body as parsed JSON or XML */ - parsedBody: Vault; + parsedBody: ManagedHsmListResult; }; }; /** - * Contains response data for the update operation. + * Contains response data for the listBySubscription operation. */ -export type VaultsUpdateResponse = Vault & { +export type ManagedHsmsListBySubscriptionResponse = ManagedHsmListResult & { /** * The underlying HTTP response. */ @@ -715,14 +2121,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 listDeleted operation. */ -export type VaultsGetResponse = Vault & { +export type ManagedHsmsListDeletedResponse = DeletedManagedHsmListResult & { /** * The underlying HTTP response. */ @@ -735,14 +2141,14 @@ export type VaultsGetResponse = Vault & { /** * The response body as parsed JSON or XML */ - parsedBody: Vault; + parsedBody: DeletedManagedHsmListResult; }; }; /** - * Contains response data for the updateAccessPolicy operation. + * Contains response data for the getDeleted operation. */ -export type VaultsUpdateAccessPolicyResponse = VaultAccessPolicyParameters & { +export type ManagedHsmsGetDeletedResponse = DeletedManagedHsm & { /** * The underlying HTTP response. */ @@ -755,14 +2161,14 @@ export type VaultsUpdateAccessPolicyResponse = VaultAccessPolicyParameters & { /** * The response body as parsed JSON or XML */ - parsedBody: VaultAccessPolicyParameters; + parsedBody: DeletedManagedHsm; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the beginCreateOrUpdate operation. */ -export type VaultsListByResourceGroupResponse = VaultListResult & { +export type ManagedHsmsBeginCreateOrUpdateResponse = ManagedHsm & { /** * The underlying HTTP response. */ @@ -775,14 +2181,14 @@ export type VaultsListByResourceGroupResponse = VaultListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: VaultListResult; + parsedBody: ManagedHsm; }; }; /** - * Contains response data for the listBySubscription operation. + * Contains response data for the beginUpdate operation. */ -export type VaultsListBySubscriptionResponse = VaultListResult & { +export type ManagedHsmsBeginUpdateResponse = ManagedHsm & { /** * The underlying HTTP response. */ @@ -795,14 +2201,14 @@ export type VaultsListBySubscriptionResponse = VaultListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: VaultListResult; + parsedBody: ManagedHsm; }; }; /** - * Contains response data for the listDeleted operation. + * Contains response data for the listByResourceGroupNext operation. */ -export type VaultsListDeletedResponse = DeletedVaultListResult & { +export type ManagedHsmsListByResourceGroupNextResponse = ManagedHsmListResult & { /** * The underlying HTTP response. */ @@ -815,14 +2221,14 @@ export type VaultsListDeletedResponse = DeletedVaultListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: DeletedVaultListResult; + parsedBody: ManagedHsmListResult; }; }; /** - * Contains response data for the getDeleted operation. + * Contains response data for the listBySubscriptionNext operation. */ -export type VaultsGetDeletedResponse = DeletedVault & { +export type ManagedHsmsListBySubscriptionNextResponse = ManagedHsmListResult & { /** * The underlying HTTP response. */ @@ -835,14 +2241,14 @@ export type VaultsGetDeletedResponse = DeletedVault & { /** * The response body as parsed JSON or XML */ - parsedBody: DeletedVault; + parsedBody: ManagedHsmListResult; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listDeletedNext operation. */ -export type VaultsListResponse = ResourceListResult & { +export type ManagedHsmsListDeletedNextResponse = DeletedManagedHsmListResult & { /** * The underlying HTTP response. */ @@ -855,14 +2261,14 @@ export type VaultsListResponse = ResourceListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ResourceListResult; + parsedBody: DeletedManagedHsmListResult; }; }; /** - * Contains response data for the checkNameAvailability operation. + * Contains response data for the listByResource operation. */ -export type VaultsCheckNameAvailabilityResponse = CheckNameAvailabilityResult & { +export type MHSMPrivateEndpointConnectionsListByResourceResponse = MHSMPrivateEndpointConnectionsListResult & { /** * The underlying HTTP response. */ @@ -875,14 +2281,14 @@ export type VaultsCheckNameAvailabilityResponse = CheckNameAvailabilityResult & /** * The response body as parsed JSON or XML */ - parsedBody: CheckNameAvailabilityResult; + parsedBody: MHSMPrivateEndpointConnectionsListResult; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the get operation. */ -export type VaultsBeginCreateOrUpdateResponse = Vault & { +export type MHSMPrivateEndpointConnectionsGetResponse = MHSMPrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -895,18 +2301,23 @@ export type VaultsBeginCreateOrUpdateResponse = Vault & { /** * The response body as parsed JSON or XML */ - parsedBody: Vault; + parsedBody: MHSMPrivateEndpointConnection; }; }; /** - * Contains response data for the listByResourceGroupNext operation. + * Contains response data for the put operation. */ -export type VaultsListByResourceGroupNextResponse = VaultListResult & { +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) */ @@ -915,18 +2326,23 @@ export type VaultsListByResourceGroupNextResponse = VaultListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: VaultListResult; + parsedBody: MHSMPrivateEndpointConnection; }; }; /** - * Contains response data for the listBySubscriptionNext operation. + * Contains response data for the deleteMethod operation. */ -export type VaultsListBySubscriptionNextResponse = VaultListResult & { +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) */ @@ -935,14 +2351,14 @@ export type VaultsListBySubscriptionNextResponse = VaultListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: VaultListResult; + parsedBody: MHSMPrivateEndpointConnection; }; }; /** - * Contains response data for the listDeletedNext operation. + * Contains response data for the listByResourceNext operation. */ -export type VaultsListDeletedNextResponse = DeletedVaultListResult & { +export type MHSMPrivateEndpointConnectionsListByResourceNextResponse = MHSMPrivateEndpointConnectionsListResult & { /** * The underlying HTTP response. */ @@ -955,14 +2371,14 @@ export type VaultsListDeletedNextResponse = DeletedVaultListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: DeletedVaultListResult; + parsedBody: MHSMPrivateEndpointConnectionsListResult; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listByMHSMResource operation. */ -export type VaultsListNextResponse = ResourceListResult & { +export type MHSMPrivateLinkResourcesListByMHSMResourceResponse = MHSMPrivateLinkResourceListResult & { /** * The underlying HTTP response. */ @@ -975,7 +2391,7 @@ export type VaultsListNextResponse = ResourceListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ResourceListResult; + parsedBody: MHSMPrivateLinkResourceListResult; }; }; 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..c55aacce71d1 --- /dev/null +++ b/sdk/keyvault/arm-keyvault/src/models/mHSMPrivateEndpointConnectionsMappers.ts @@ -0,0 +1,49 @@ +/* + * 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, + BaseResource, + CloudError, + ErrorModel, + IPRule, + ManagedHsm, + ManagedHsmError, + ManagedHsmProperties, + ManagedHsmResource, + ManagedHsmSku, + MHSMIPRule, + MHSMNetworkRuleSet, + MHSMPrivateEndpoint, + MHSMPrivateEndpointConnection, + MHSMPrivateEndpointConnectionItem, + MHSMPrivateEndpointConnectionsDeleteHeaders, + MHSMPrivateEndpointConnectionsListResult, + MHSMPrivateEndpointConnectionsPutHeaders, + MHSMPrivateLinkResource, + MHSMPrivateLinkServiceConnectionState, + MHSMVirtualNetworkRule, + NetworkRuleSet, + Permissions, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionItem, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + Resource, + Sku, + SystemData, + 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..c7051e41e3bc --- /dev/null +++ b/sdk/keyvault/arm-keyvault/src/models/mHSMPrivateLinkResourcesMappers.ts @@ -0,0 +1,45 @@ +/* + * 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, + BaseResource, + CloudError, + IPRule, + ManagedHsm, + ManagedHsmProperties, + ManagedHsmResource, + ManagedHsmSku, + MHSMIPRule, + MHSMNetworkRuleSet, + MHSMPrivateEndpoint, + MHSMPrivateEndpointConnection, + MHSMPrivateEndpointConnectionItem, + MHSMPrivateLinkResource, + MHSMPrivateLinkResourceListResult, + MHSMPrivateLinkServiceConnectionState, + MHSMVirtualNetworkRule, + NetworkRuleSet, + Permissions, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionItem, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + Resource, + Sku, + SystemData, + 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..c75537d8f914 --- /dev/null +++ b/sdk/keyvault/arm-keyvault/src/models/managedHsmsMappers.ts @@ -0,0 +1,49 @@ +/* + * 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, + BaseResource, + DeletedManagedHsm, + DeletedManagedHsmListResult, + DeletedManagedHsmProperties, + ErrorModel, + IPRule, + ManagedHsm, + ManagedHsmError, + ManagedHsmListResult, + ManagedHsmProperties, + ManagedHsmResource, + ManagedHsmSku, + MHSMIPRule, + MHSMNetworkRuleSet, + MHSMPrivateEndpoint, + MHSMPrivateEndpointConnection, + MHSMPrivateEndpointConnectionItem, + MHSMPrivateLinkResource, + MHSMPrivateLinkServiceConnectionState, + MHSMVirtualNetworkRule, + NetworkRuleSet, + Permissions, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionItem, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + Resource, + Sku, + SystemData, + 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..35ce3d8d95cc 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,6 +12,52 @@ import * as msRest from "@azure/ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; +export const SystemData: msRest.CompositeMapper = { + serializedName: "SystemData", + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + 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 Sku: msRest.CompositeMapper = { serializedName: "Sku", type: { @@ -163,6 +209,12 @@ export const VirtualNetworkRule: msRest.CompositeMapper = { type: { name: "String" } + }, + ignoreMissingVnetServiceEndpoint: { + serializedName: "ignoreMissingVnetServiceEndpoint", + type: { + name: "Boolean" + } } } } @@ -214,6 +266,93 @@ export const NetworkRuleSet: msRest.CompositeMapper = { } }; +export const PrivateEndpoint: msRest.CompositeMapper = { + serializedName: "PrivateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + 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 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: { @@ -254,6 +393,13 @@ export const VaultProperties: msRest.CompositeMapper = { name: "String" } }, + hsmPoolResourceId: { + readOnly: true, + serializedName: "hsmPoolResourceId", + type: { + name: "String" + } + }, enabledForDeployment: { serializedName: "enabledForDeployment", type: { @@ -274,6 +420,21 @@ export const VaultProperties: msRest.CompositeMapper = { }, enableSoftDelete: { serializedName: "enableSoftDelete", + defaultValue: true, + type: { + name: "Boolean" + } + }, + softDeleteRetentionInDays: { + serializedName: "softDeleteRetentionInDays", + defaultValue: 90, + type: { + name: "Number" + } + }, + enableRbacAuthorization: { + serializedName: "enableRbacAuthorization", + defaultValue: false, type: { name: "Boolean" } @@ -300,6 +461,25 @@ export const VaultProperties: msRest.CompositeMapper = { name: "Composite", className: "NetworkRuleSet" } + }, + provisioningState: { + serializedName: "provisioningState", + type: { + name: "String" + } + }, + privateEndpointConnections: { + readOnly: true, + serializedName: "privateEndpointConnections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnectionItem" + } + } + } } } } @@ -360,6 +540,18 @@ export const VaultPatchProperties: msRest.CompositeMapper = { name: "Boolean" } }, + enableRbacAuthorization: { + serializedName: "enableRbacAuthorization", + type: { + name: "Boolean" + } + }, + softDeleteRetentionInDays: { + serializedName: "softDeleteRetentionInDays", + type: { + name: "Number" + } + }, createMode: { serializedName: "createMode", type: { @@ -455,6 +647,13 @@ export const DeletedVaultProperties: msRest.CompositeMapper = { } } } + }, + purgeProtectionEnabled: { + readOnly: true, + serializedName: "purgeProtectionEnabled", + type: { + name: "Boolean" + } } } } @@ -571,11 +770,11 @@ export const VaultAccessPolicyParameters: msRest.CompositeMapper = { } }; -export const Resource: msRest.CompositeMapper = { - serializedName: "Resource", +export const Vault: msRest.CompositeMapper = { + serializedName: "Vault", type: { name: "Composite", - className: "Resource", + className: "Vault", modelProperties: { id: { readOnly: true, @@ -599,7 +798,6 @@ export const Resource: msRest.CompositeMapper = { } }, location: { - required: true, serializedName: "location", type: { name: "String" @@ -615,18 +813,14 @@ export const Resource: msRest.CompositeMapper = { } } } - } - } - } -}; - -export const Vault: msRest.CompositeMapper = { - serializedName: "Vault", - type: { - name: "Composite", - className: "Vault", - modelProperties: { - ...Resource.type.modelProperties, + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, properties: { required: true, serializedName: "properties", @@ -678,6 +872,56 @@ export const DeletedVault: msRest.CompositeMapper = { } }; +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 VaultCheckNameAvailabilityParameters: msRest.CompositeMapper = { serializedName: "VaultCheckNameAvailabilityParameters", type: { @@ -739,32 +983,34 @@ export const CheckNameAvailabilityResult: msRest.CompositeMapper = { } }; -export const OperationDisplay: msRest.CompositeMapper = { - serializedName: "Operation_display", +export const PrivateEndpointConnection: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnection", type: { name: "Composite", - className: "OperationDisplay", + className: "PrivateEndpointConnection", modelProperties: { - provider: { - serializedName: "provider", + privateEndpoint: { + serializedName: "properties.privateEndpoint", type: { - name: "String" + name: "Composite", + className: "PrivateEndpoint" } }, - resource: { - serializedName: "resource", + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", type: { - name: "String" + name: "Composite", + className: "PrivateLinkServiceConnectionState" } }, - operation: { - serializedName: "operation", + provisioningState: { + serializedName: "properties.provisioningState", type: { name: "String" } }, - description: { - serializedName: "description", + etag: { + serializedName: "etag", type: { name: "String" } @@ -773,41 +1019,879 @@ export const OperationDisplay: msRest.CompositeMapper = { } }; -export const LogSpecification: msRest.CompositeMapper = { - serializedName: "LogSpecification", +export const PrivateLinkResource: msRest.CompositeMapper = { + serializedName: "PrivateLinkResource", type: { name: "Composite", - className: "LogSpecification", + className: "PrivateLinkResource", modelProperties: { - name: { - serializedName: "name", + ...Resource.type.modelProperties, + groupId: { + readOnly: true, + serializedName: "properties.groupId", type: { name: "String" } }, - displayName: { - serializedName: "displayName", + requiredMembers: { + readOnly: true, + serializedName: "properties.requiredMembers", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - blobDuration: { - serializedName: "blobDuration", + requiredZoneNames: { + serializedName: "properties.requiredZoneNames", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const ServiceSpecification: msRest.CompositeMapper = { - serializedName: "ServiceSpecification", +export const PrivateLinkResourceListResult: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourceListResult", type: { name: "Composite", - className: "ServiceSpecification", + className: "PrivateLinkResourceListResult", modelProperties: { - logSpecifications: { + 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" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + toBeExportedForShoebox: { + serializedName: "toBeExportedForShoebox", + type: { + name: "Boolean" + } + } + } + } +}; + +export const MetricSpecification: msRest.CompositeMapper = { + serializedName: "MetricSpecification", + type: { + name: "Composite", + className: "MetricSpecification", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + displayDescription: { + serializedName: "displayDescription", + type: { + name: "String" + } + }, + unit: { + serializedName: "unit", + type: { + name: "String" + } + }, + aggregationType: { + serializedName: "aggregationType", + type: { + name: "String" + } + }, + supportedAggregationTypes: { + serializedName: "supportedAggregationTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + supportedTimeGrainTypes: { + serializedName: "supportedTimeGrainTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + lockAggregationType: { + serializedName: "lockAggregationType", + type: { + name: "String" + } + }, + dimensions: { + serializedName: "dimensions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DimensionProperties" + } + } + } + }, + fillGapWithZero: { + serializedName: "fillGapWithZero", + type: { + name: "Boolean" + } + }, + internalMetricName: { + serializedName: "internalMetricName", + type: { + name: "String" + } + } + } + } +}; + +export const ServiceSpecification: msRest.CompositeMapper = { + serializedName: "ServiceSpecification", + type: { + name: "Composite", + className: "ServiceSpecification", + modelProperties: { + logSpecifications: { serializedName: "logSpecifications", type: { name: "Sequence", @@ -818,6 +1902,18 @@ export const ServiceSpecification: msRest.CompositeMapper = { } } } + }, + metricSpecifications: { + serializedName: "metricSpecifications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetricSpecification" + } + } + } } } } @@ -854,6 +1950,100 @@ export const Operation: msRest.CompositeMapper = { name: "Composite", className: "ServiceSpecification" } + }, + isDataAction: { + serializedName: "isDataAction", + type: { + name: "Boolean" + } + } + } + } +}; + +export const PrivateEndpointConnectionsPutHeaders: msRest.CompositeMapper = { + serializedName: "privateendpointconnections-put-headers", + type: { + name: "Composite", + className: "PrivateEndpointConnectionsPutHeaders", + modelProperties: { + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnectionsDeleteHeaders: msRest.CompositeMapper = { + serializedName: "privateendpointconnections-delete-headers", + type: { + name: "Composite", + className: "PrivateEndpointConnectionsDeleteHeaders", + modelProperties: { + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + }, + locationHeader: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const MHSMPrivateEndpointConnectionsPutHeaders: msRest.CompositeMapper = { + serializedName: "mhsmprivateendpointconnections-put-headers", + type: { + name: "Composite", + className: "MHSMPrivateEndpointConnectionsPutHeaders", + modelProperties: { + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const MHSMPrivateEndpointConnectionsDeleteHeaders: msRest.CompositeMapper = { + serializedName: "mhsmprivateendpointconnections-delete-headers", + type: { + name: "Composite", + className: "MHSMPrivateEndpointConnectionsDeleteHeaders", + modelProperties: { + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + }, + locationHeader: { + serializedName: "location", + type: { + name: "String" + } } } } @@ -943,6 +2133,118 @@ export const ResourceListResult: msRest.CompositeMapper = { } }; +export const PrivateEndpointConnectionListResult: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnectionListResult", + type: { + name: "Composite", + className: "PrivateEndpointConnectionListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedHsmListResult: msRest.CompositeMapper = { + serializedName: "ManagedHsmListResult", + type: { + name: "Composite", + className: "ManagedHsmListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedHsm" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const DeletedManagedHsmListResult: msRest.CompositeMapper = { + serializedName: "DeletedManagedHsmListResult", + type: { + name: "Composite", + className: "DeletedManagedHsmListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DeletedManagedHsm" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const MHSMPrivateEndpointConnectionsListResult: msRest.CompositeMapper = { + serializedName: "MHSMPrivateEndpointConnectionsListResult", + type: { + name: "Composite", + className: "MHSMPrivateEndpointConnectionsListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MHSMPrivateEndpointConnection" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const OperationListResult: msRest.CompositeMapper = { serializedName: "OperationListResult", type: { 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..00ec99e607b9 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 @@ -64,6 +63,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 +99,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: { 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..3e693540e21e --- /dev/null +++ b/sdk/keyvault/arm-keyvault/src/models/privateEndpointConnectionsMappers.ts @@ -0,0 +1,47 @@ +/* + * 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, + BaseResource, + CloudError, + IPRule, + ManagedHsm, + ManagedHsmProperties, + ManagedHsmResource, + ManagedHsmSku, + MHSMIPRule, + MHSMNetworkRuleSet, + MHSMPrivateEndpoint, + MHSMPrivateEndpointConnection, + MHSMPrivateEndpointConnectionItem, + MHSMPrivateLinkResource, + MHSMPrivateLinkServiceConnectionState, + MHSMVirtualNetworkRule, + NetworkRuleSet, + Permissions, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionItem, + PrivateEndpointConnectionListResult, + PrivateEndpointConnectionsDeleteHeaders, + PrivateEndpointConnectionsPutHeaders, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + Resource, + Sku, + SystemData, + 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..3b35f57209e3 --- /dev/null +++ b/sdk/keyvault/arm-keyvault/src/models/privateLinkResourcesMappers.ts @@ -0,0 +1,45 @@ +/* + * 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, + BaseResource, + CloudError, + IPRule, + ManagedHsm, + ManagedHsmProperties, + ManagedHsmResource, + ManagedHsmSku, + MHSMIPRule, + MHSMNetworkRuleSet, + MHSMPrivateEndpoint, + MHSMPrivateEndpointConnection, + MHSMPrivateEndpointConnectionItem, + MHSMPrivateLinkResource, + MHSMPrivateLinkServiceConnectionState, + MHSMVirtualNetworkRule, + NetworkRuleSet, + Permissions, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionItem, + PrivateLinkResource, + PrivateLinkResourceListResult, + PrivateLinkServiceConnectionState, + Resource, + Sku, + SystemData, + 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..d689da2d5b71 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. @@ -15,11 +15,29 @@ export { DeletedVaultListResult, DeletedVaultProperties, IPRule, + ManagedHsm, + ManagedHsmProperties, + ManagedHsmResource, + ManagedHsmSku, + MHSMIPRule, + MHSMNetworkRuleSet, + MHSMPrivateEndpoint, + MHSMPrivateEndpointConnection, + MHSMPrivateEndpointConnectionItem, + MHSMPrivateLinkResource, + MHSMPrivateLinkServiceConnectionState, + MHSMVirtualNetworkRule, NetworkRuleSet, Permissions, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionItem, + PrivateLinkResource, + PrivateLinkServiceConnectionState, Resource, ResourceListResult, Sku, + SystemData, 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..2eb9930592eb 100644 --- a/sdk/keyvault/arm-keyvault/src/operations/index.ts +++ b/sdk/keyvault/arm-keyvault/src/operations/index.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 @@ -9,4 +8,9 @@ */ export * from "./vaults"; +export * from "./privateEndpointConnections"; +export * from "./privateLinkResources"; +export * from "./managedHsms"; +export * from "./mHSMPrivateEndpointConnections"; +export * from "./mHSMPrivateLinkResources"; export * from "./operations"; 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/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