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 d1d514d0f206..d77c63099935 100644 --- a/sdk/keyvault/arm-keyvault/README.md +++ b/sdk/keyvault/arm-keyvault/README.md @@ -15,21 +15,21 @@ npm install @azure/arm-keyvault ### How to use -#### nodejs - Authentication, client creation and get vaults as an example written in TypeScript. +#### nodejs - client creation and get vaults as an example written in TypeScript. ##### Install @azure/ms-rest-nodeauth +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. ```bash -npm install @azure/ms-rest-nodeauth +npm install @azure/ms-rest-nodeauth@"^3.0.0" ``` ##### Sample code +While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package ```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { KeyVaultManagementClient, KeyVaultManagementModels, KeyVaultManagementMappers } from "@azure/arm-keyvault"; +const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +const { KeyVaultManagementClient } = require("@azure/arm-keyvault"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; msRestNodeAuth.interactiveLogin().then((creds) => { @@ -99,5 +99,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [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%2Fsdk%2Fkeyvault%2Farm-keyvault%2FREADME.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 4786c5929d5d..2301bdfbbffa 100644 --- a/sdk/keyvault/arm-keyvault/package.json +++ b/sdk/keyvault/arm-keyvault/package.json @@ -4,9 +4,9 @@ "description": "KeyVaultManagementClient Library with typescript type definitions for node.js and browser.", "version": "1.2.1", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.8.1", - "tslib": "^1.9.3" + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -20,19 +20,19 @@ "module": "./esm/keyVaultManagementClient.js", "types": "./esm/keyVaultManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", + "typescript": "^3.5.3", + "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 f0901b1beb26..5db6eb3dab17 100644 --- a/sdk/keyvault/arm-keyvault/src/keyVaultManagementClient.ts +++ b/sdk/keyvault/arm-keyvault/src/keyVaultManagementClient.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -18,7 +17,13 @@ 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; + secrets: operations.Secrets; /** * Initializes a new instance of the KeyVaultManagementClient class. @@ -30,7 +35,13 @@ class KeyVaultManagementClient extends KeyVaultManagementClientContext { constructor(credentials: msRest.ServiceClientCredentials, 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); + this.secrets = new operations.Secrets(this); } } diff --git a/sdk/keyvault/arm-keyvault/src/keyVaultManagementClientContext.ts b/sdk/keyvault/arm-keyvault/src/keyVaultManagementClientContext.ts index 22862703742e..750ef2ba1826 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 @@ -45,7 +44,7 @@ export class KeyVaultManagementClientContext extends msRestAzure.AzureServiceCli 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"; diff --git a/sdk/keyvault/arm-keyvault/src/models/index.ts b/sdk/keyvault/arm-keyvault/src/models/index.ts index f6d55103853c..1a806cf46d4f 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 */ @@ -115,6 +147,56 @@ 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 { + /** + * 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 +211,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[]; @@ -154,10 +236,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 +269,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 +317,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 +394,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 +464,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 +525,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,251 +590,1666 @@ 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; } /** - * @interface - * Result of the request to list Storage operations. It contains a list of operations and a URL - * link to get the next set of results. - * @extends Array + * Managed HSM resource */ -export interface OperationListResult extends Array { +export interface ManagedHsmResource extends BaseResource { /** - * The URL to get the next set of operations. + * 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.** */ - nextLink?: string; -} + 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; +} + +/** + * One property of operation, include log specifications. + */ +export interface ServiceSpecification { + /** + * Log specifications of operation. + */ + logSpecifications?: LogSpecification[]; +} + +/** + * Key Vault REST API operation definition. + */ +export interface Operation { + /** + * Operation name: {provider}/{resource}/{operation} + */ + name?: string; + /** + * Display metadata associated with the operation. + */ + display?: OperationDisplay; + /** + * The origin of operations. + */ + origin?: string; + /** + * One property of operation, include metric specifications. + */ + serviceSpecification?: ServiceSpecification; + /** + * Property to specify whether the action is a data action. + */ + isDataAction?: boolean; +} + +/** + * The object attributes managed by the KeyVault service. + */ +export interface Attributes { + /** + * Determines whether the object is enabled. + */ + enabled?: boolean; + /** + * Not before date in seconds since 1970-01-01T00:00:00Z. + */ + notBefore?: number; + /** + * Expiry date in seconds since 1970-01-01T00:00:00Z. + */ + expires?: number; + /** + * Creation time in seconds since 1970-01-01T00:00:00Z. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly created?: number; + /** + * Last updated time in seconds since 1970-01-01T00:00:00Z. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly updated?: number; +} + +/** + * The secret management attributes. + */ +export interface SecretAttributes extends Attributes { +} + +/** + * Properties of the secret + */ +export interface SecretProperties { + /** + * The value of the secret. NOTE: 'value' will never be returned from the service, as APIs using + * this model are is intended for internal use in ARM deployments. Users should use the + * data-plane REST service for interaction with vault secrets. + */ + value?: string; + /** + * The content type of the secret. + */ + contentType?: string; + /** + * The attributes of the secret. + */ + attributes?: SecretAttributes; + /** + * The URI to retrieve the current version of the secret. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly secretUri?: string; + /** + * The URI to retrieve the specific version of the secret. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly secretUriWithVersion?: string; +} + +/** + * Properties of the secret + */ +export interface SecretPatchProperties { + /** + * The value of the secret. + */ + value?: string; + /** + * The content type of the secret. + */ + contentType?: string; + /** + * The attributes of the secret. + */ + attributes?: SecretAttributes; +} + +/** + * Parameters for creating or updating a secret + */ +export interface SecretCreateOrUpdateParameters extends BaseResource { + /** + * The tags that will be assigned to the secret. + */ + tags?: { [propertyName: string]: string }; + /** + * Properties of the secret + */ + properties: SecretProperties; +} + +/** + * Parameters for patching a secret + */ +export interface SecretPatchParameters extends BaseResource { + /** + * The tags that will be assigned to the secret. + */ + tags?: { [propertyName: string]: string }; + /** + * Properties of the secret + */ + properties?: SecretPatchProperties; +} + +/** + * Resource information with extended details. + */ +export interface Secret extends Resource { + /** + * Properties of the secret + */ + properties: SecretProperties; +} + +/** + * Optional Parameters. + */ +export interface VaultsListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { + /** + * Maximum number of results to return. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface VaultsListBySubscriptionOptionalParams extends msRest.RequestOptionsBase { + /** + * Maximum number of results to return. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface VaultsListOptionalParams extends msRest.RequestOptionsBase { + /** + * Maximum number of results to return. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface VaultsListByResourceGroupNextOptionalParams extends msRest.RequestOptionsBase { + /** + * Maximum number of results to return. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface VaultsListBySubscriptionNextOptionalParams extends msRest.RequestOptionsBase { + /** + * Maximum number of results to return. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface VaultsListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * Maximum number of results to return. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface ManagedHsmsListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { + /** + * Maximum number of results to return. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface ManagedHsmsListBySubscriptionOptionalParams extends msRest.RequestOptionsBase { + /** + * Maximum number of results to return. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface ManagedHsmsListByResourceGroupNextOptionalParams extends msRest.RequestOptionsBase { + /** + * Maximum number of results to return. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface ManagedHsmsListBySubscriptionNextOptionalParams extends msRest.RequestOptionsBase { + /** + * Maximum number of results to return. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface SecretsListOptionalParams extends msRest.RequestOptionsBase { + /** + * Maximum number of results to return. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface SecretsListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * Maximum number of results to return. + */ + top?: number; +} + +/** + * An interface representing KeyVaultManagementClientOptions. + */ +export interface KeyVaultManagementClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * Defines headers for Put operation. + */ +export interface PrivateEndpointConnectionsPutHeaders { + /** + * (specified only if operation does not finish synchronously) The recommended number of seconds + * to wait before calling the URI specified in Azure-AsyncOperation. + */ + retryAfter: number; + /** + * (specified only if operation does not finish synchronously) The URI to poll for completion + * status. The response of this URI may be synchronous or asynchronous. + */ + azureAsyncOperation: string; +} + +/** + * Defines headers for Delete operation. + */ +export interface PrivateEndpointConnectionsDeleteHeaders { + /** + * The recommended number of seconds to wait before calling the URI specified in the location + * header. + */ + retryAfter: number; + /** + * The URI to poll for completion status. + */ + locationHeader: string; +} + +/** + * Defines headers for Put operation. + */ +export interface MHSMPrivateEndpointConnectionsPutHeaders { + /** + * (specified only if operation does not finish synchronously) The recommended number of seconds + * to wait before calling the URI specified in Azure-AsyncOperation. + */ + retryAfter: number; + /** + * (specified only if operation does not finish synchronously) The URI to poll for completion + * status. The response of this URI may be synchronous or asynchronous. + */ + azureAsyncOperation: string; +} + +/** + * Defines headers for Delete operation. + */ +export interface MHSMPrivateEndpointConnectionsDeleteHeaders { + /** + * The recommended number of seconds to wait before calling the URI specified in the location + * header. + */ + retryAfter: number; + /** + * The URI to poll for completion status. + */ + locationHeader: string; +} + +/** + * @interface + * List of vaults + * @extends Array + */ +export interface VaultListResult extends Array { + /** + * The URL to get the next set of vaults. + */ + nextLink?: string; +} + +/** + * @interface + * List of vaults + * @extends Array + */ +export interface DeletedVaultListResult extends Array { + /** + * The URL to get the next set of deleted vaults. + */ + nextLink?: string; +} + +/** + * @interface + * List of vault resources. + * @extends Array + */ +export interface ResourceListResult extends Array { + /** + * The URL to get the next set of vault resources. + */ + nextLink?: string; +} + +/** + * @interface + * List of private endpoint connections. + * @extends Array + */ +export interface PrivateEndpointConnectionListResult extends Array { + /** + * The URL to get the next set of private endpoint connections. + */ + nextLink?: string; +} + +/** + * @interface + * List of managed HSM Pools + * @extends Array + */ +export interface ManagedHsmListResult extends Array { + /** + * The URL to get the next set of managed HSM Pools. + */ + nextLink?: string; +} + +/** + * @interface + * List of deleted managed HSM Pools + * @extends Array + */ +export interface DeletedManagedHsmListResult extends Array { + /** + * The URL to get the next set of deleted managed HSM Pools. + */ + nextLink?: string; +} + +/** + * @interface + * List of private endpoint connections associated with a managed HSM Pools + * @extends Array + */ +export interface MHSMPrivateEndpointConnectionsListResult extends Array { + /** + * The URL to get the next set of managed HSM Pools. + */ + nextLink?: string; +} + +/** + * @interface + * Result of the request to list Storage operations. It contains a list of operations and a URL + * link to get the next set of results. + * @extends Array + */ +export interface OperationListResult extends Array { + /** + * The URL to get the next set of operations. + */ + nextLink?: string; +} + +/** + * @interface + * List of secrets + * @extends Array + */ +export interface SecretListResult extends Array { + /** + * The URL to get the next set of secrets. + */ + nextLink?: string; +} + +/** + * Defines values for IdentityType. + * Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + * @readonly + * @enum {string} + */ +export type IdentityType = 'User' | 'Application' | 'ManagedIdentity' | 'Key'; + +/** + * Defines values for 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' + * @readonly + * @enum {string} + */ +export type KeyPermissions = 'encrypt' | 'decrypt' | 'wrapKey' | 'unwrapKey' | 'sign' | 'verify' | 'get' | 'list' | 'create' | 'update' | 'import' | 'delete' | 'backup' | 'restore' | 'recover' | 'purge'; + +/** + * 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; + }; +}; /** - * Defines values for SkuName. - * Possible values include: 'standard', 'premium' - * @readonly - * @enum {string} + * Contains response data for the getDeleted operation. */ -export type SkuName = 'standard' | 'premium'; +export type VaultsGetDeletedResponse = DeletedVault & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DeletedVault; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type VaultsListResponse = ResourceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ResourceListResult; + }; +}; + +/** + * Contains response data for the checkNameAvailability operation. + */ +export type VaultsCheckNameAvailabilityResponse = CheckNameAvailabilityResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: CheckNameAvailabilityResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type VaultsBeginCreateOrUpdateResponse = Vault & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Vault; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type VaultsListByResourceGroupNextResponse = VaultListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: VaultListResult; + }; +}; + +/** + * Contains response data for the listBySubscriptionNext operation. + */ +export type VaultsListBySubscriptionNextResponse = VaultListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: VaultListResult; + }; +}; + +/** + * Contains response data for the listDeletedNext operation. + */ +export type VaultsListDeletedNextResponse = DeletedVaultListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DeletedVaultListResult; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type VaultsListNextResponse = ResourceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ResourceListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the put operation. + */ +export type PrivateEndpointConnectionsPutResponse = PrivateEndpointConnection & PrivateEndpointConnectionsPutHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: PrivateEndpointConnectionsPutHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the deleteMethod operation. + */ +export type PrivateEndpointConnectionsDeleteResponse = PrivateEndpointConnection & PrivateEndpointConnectionsDeleteHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: PrivateEndpointConnectionsDeleteHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the listByResource operation. + */ +export type PrivateEndpointConnectionsListByResourceResponse = PrivateEndpointConnectionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnectionListResult; + }; +}; + +/** + * Contains response data for the listByResourceNext operation. + */ +export type PrivateEndpointConnectionsListByResourceNextResponse = PrivateEndpointConnectionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnectionListResult; + }; +}; /** - * 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 listByVault operation. */ -export type KeyPermissions = 'encrypt' | 'decrypt' | 'wrapKey' | 'unwrapKey' | 'sign' | 'verify' | 'get' | 'list' | 'create' | 'update' | 'import' | 'delete' | 'backup' | 'restore' | 'recover' | 'purge'; +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 SecretPermissions. - * Possible values include: 'get', 'list', 'set', 'delete', 'backup', 'restore', 'recover', 'purge' - * @readonly - * @enum {string} + * Contains response data for the createOrUpdate operation. */ -export type SecretPermissions = 'get' | 'list' | 'set' | 'delete' | 'backup' | 'restore' | 'recover' | 'purge'; +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 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 update operation. */ -export type CertificatePermissions = 'get' | 'list' | 'delete' | 'create' | 'import' | 'update' | 'managecontacts' | 'getissuers' | 'listissuers' | 'setissuers' | 'deleteissuers' | 'manageissuers' | 'recover' | 'purge' | 'backup' | 'restore'; +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 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 get operation. */ -export type StoragePermissions = 'get' | 'list' | 'delete' | 'set' | 'update' | 'regeneratekey' | 'recover' | 'purge' | 'backup' | 'restore' | 'setsas' | 'listsas' | 'getsas' | 'deletesas'; +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; + }; +}; /** - * Defines values for CreateMode. - * Possible values include: 'recover', 'default' - * @readonly - * @enum {string} + * Contains response data for the listByResourceGroup operation. */ -export type CreateMode = 'recover' | 'default'; +export type ManagedHsmsListByResourceGroupResponse = ManagedHsmListResult & { + /** + * 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: ManagedHsmListResult; + }; +}; /** - * Defines values for NetworkRuleBypassOptions. - * Possible values include: 'AzureServices', 'None' - * @readonly - * @enum {string} + * Contains response data for the listBySubscription operation. */ -export type NetworkRuleBypassOptions = 'AzureServices' | 'None'; +export type ManagedHsmsListBySubscriptionResponse = ManagedHsmListResult & { + /** + * 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: ManagedHsmListResult; + }; +}; /** - * Defines values for NetworkRuleAction. - * Possible values include: 'Allow', 'Deny' - * @readonly - * @enum {string} + * Contains response data for the listDeleted operation. */ -export type NetworkRuleAction = 'Allow' | 'Deny'; +export type ManagedHsmsListDeletedResponse = DeletedManagedHsmListResult & { + /** + * 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: DeletedManagedHsmListResult; + }; +}; /** - * Defines values for Reason. - * Possible values include: 'AccountNameInvalid', 'AlreadyExists' - * @readonly - * @enum {string} + * Contains response data for the getDeleted operation. */ -export type Reason = 'AccountNameInvalid' | 'AlreadyExists'; +export type ManagedHsmsGetDeletedResponse = DeletedManagedHsm & { + /** + * 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: DeletedManagedHsm; + }; +}; /** - * Defines values for AccessPolicyUpdateKind. - * Possible values include: 'add', 'replace', 'remove' - * @readonly - * @enum {string} + * Contains response data for the beginCreateOrUpdate operation. */ -export type AccessPolicyUpdateKind = 'add' | 'replace' | 'remove'; +export type ManagedHsmsBeginCreateOrUpdateResponse = ManagedHsm & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ManagedHsm; + }; +}; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the beginUpdate operation. */ -export type VaultsCreateOrUpdateResponse = Vault & { +export type ManagedHsmsBeginUpdateResponse = ManagedHsm & { /** * The underlying HTTP response. */ @@ -695,14 +2262,14 @@ export type VaultsCreateOrUpdateResponse = Vault & { /** * The response body as parsed JSON or XML */ - parsedBody: Vault; + parsedBody: ManagedHsm; }; }; /** - * Contains response data for the update operation. + * Contains response data for the listByResourceGroupNext operation. */ -export type VaultsUpdateResponse = Vault & { +export type ManagedHsmsListByResourceGroupNextResponse = ManagedHsmListResult & { /** * The underlying HTTP response. */ @@ -715,14 +2282,14 @@ export type VaultsUpdateResponse = Vault & { /** * The response body as parsed JSON or XML */ - parsedBody: Vault; + parsedBody: ManagedHsmListResult; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listBySubscriptionNext operation. */ -export type VaultsGetResponse = Vault & { +export type ManagedHsmsListBySubscriptionNextResponse = ManagedHsmListResult & { /** * The underlying HTTP response. */ @@ -735,14 +2302,14 @@ export type VaultsGetResponse = Vault & { /** * The response body as parsed JSON or XML */ - parsedBody: Vault; + parsedBody: ManagedHsmListResult; }; }; /** - * Contains response data for the updateAccessPolicy operation. + * Contains response data for the listDeletedNext operation. */ -export type VaultsUpdateAccessPolicyResponse = VaultAccessPolicyParameters & { +export type ManagedHsmsListDeletedNextResponse = DeletedManagedHsmListResult & { /** * The underlying HTTP response. */ @@ -755,14 +2322,14 @@ export type VaultsUpdateAccessPolicyResponse = VaultAccessPolicyParameters & { /** * The response body as parsed JSON or XML */ - parsedBody: VaultAccessPolicyParameters; + parsedBody: DeletedManagedHsmListResult; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the listByResource operation. */ -export type VaultsListByResourceGroupResponse = VaultListResult & { +export type MHSMPrivateEndpointConnectionsListByResourceResponse = MHSMPrivateEndpointConnectionsListResult & { /** * The underlying HTTP response. */ @@ -775,14 +2342,14 @@ export type VaultsListByResourceGroupResponse = VaultListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: VaultListResult; + parsedBody: MHSMPrivateEndpointConnectionsListResult; }; }; /** - * Contains response data for the listBySubscription operation. + * Contains response data for the get operation. */ -export type VaultsListBySubscriptionResponse = VaultListResult & { +export type MHSMPrivateEndpointConnectionsGetResponse = MHSMPrivateEndpointConnection & { /** * The underlying HTTP response. */ @@ -795,18 +2362,23 @@ export type VaultsListBySubscriptionResponse = VaultListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: VaultListResult; + parsedBody: MHSMPrivateEndpointConnection; }; }; /** - * Contains response data for the listDeleted operation. + * Contains response data for the put operation. */ -export type VaultsListDeletedResponse = DeletedVaultListResult & { +export type MHSMPrivateEndpointConnectionsPutResponse = MHSMPrivateEndpointConnection & MHSMPrivateEndpointConnectionsPutHeaders & { /** * The underlying HTTP response. */ _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: MHSMPrivateEndpointConnectionsPutHeaders; + /** * The response body as text (string format) */ @@ -815,18 +2387,23 @@ export type VaultsListDeletedResponse = DeletedVaultListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: DeletedVaultListResult; + parsedBody: MHSMPrivateEndpointConnection; }; }; /** - * Contains response data for the getDeleted operation. + * Contains response data for the deleteMethod operation. */ -export type VaultsGetDeletedResponse = DeletedVault & { +export type MHSMPrivateEndpointConnectionsDeleteResponse = MHSMPrivateEndpointConnection & MHSMPrivateEndpointConnectionsDeleteHeaders & { /** * The underlying HTTP response. */ _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: MHSMPrivateEndpointConnectionsDeleteHeaders; + /** * The response body as text (string format) */ @@ -835,14 +2412,14 @@ export type VaultsGetDeletedResponse = DeletedVault & { /** * The response body as parsed JSON or XML */ - parsedBody: DeletedVault; + parsedBody: MHSMPrivateEndpointConnection; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByResourceNext operation. */ -export type VaultsListResponse = ResourceListResult & { +export type MHSMPrivateEndpointConnectionsListByResourceNextResponse = MHSMPrivateEndpointConnectionsListResult & { /** * The underlying HTTP response. */ @@ -855,14 +2432,14 @@ export type VaultsListResponse = ResourceListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ResourceListResult; + parsedBody: MHSMPrivateEndpointConnectionsListResult; }; }; /** - * Contains response data for the checkNameAvailability operation. + * Contains response data for the listByMHSMResource operation. */ -export type VaultsCheckNameAvailabilityResponse = CheckNameAvailabilityResult & { +export type MHSMPrivateLinkResourcesListByMHSMResourceResponse = MHSMPrivateLinkResourceListResult & { /** * The underlying HTTP response. */ @@ -875,14 +2452,14 @@ export type VaultsCheckNameAvailabilityResponse = CheckNameAvailabilityResult & /** * The response body as parsed JSON or XML */ - parsedBody: CheckNameAvailabilityResult; + parsedBody: MHSMPrivateLinkResourceListResult; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the list operation. */ -export type VaultsBeginCreateOrUpdateResponse = Vault & { +export type OperationsListResponse = OperationListResult & { /** * The underlying HTTP response. */ @@ -895,14 +2472,14 @@ export type VaultsBeginCreateOrUpdateResponse = Vault & { /** * The response body as parsed JSON or XML */ - parsedBody: Vault; + parsedBody: OperationListResult; }; }; /** - * Contains response data for the listByResourceGroupNext operation. + * Contains response data for the listNext operation. */ -export type VaultsListByResourceGroupNextResponse = VaultListResult & { +export type OperationsListNextResponse = OperationListResult & { /** * The underlying HTTP response. */ @@ -915,14 +2492,14 @@ export type VaultsListByResourceGroupNextResponse = VaultListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: VaultListResult; + parsedBody: OperationListResult; }; }; /** - * Contains response data for the listBySubscriptionNext operation. + * Contains response data for the createOrUpdate operation. */ -export type VaultsListBySubscriptionNextResponse = VaultListResult & { +export type SecretsCreateOrUpdateResponse = Secret & { /** * The underlying HTTP response. */ @@ -935,14 +2512,14 @@ export type VaultsListBySubscriptionNextResponse = VaultListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: VaultListResult; + parsedBody: Secret; }; }; /** - * Contains response data for the listDeletedNext operation. + * Contains response data for the update operation. */ -export type VaultsListDeletedNextResponse = DeletedVaultListResult & { +export type SecretsUpdateResponse = Secret & { /** * The underlying HTTP response. */ @@ -955,14 +2532,14 @@ export type VaultsListDeletedNextResponse = DeletedVaultListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: DeletedVaultListResult; + parsedBody: Secret; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the get operation. */ -export type VaultsListNextResponse = ResourceListResult & { +export type SecretsGetResponse = Secret & { /** * The underlying HTTP response. */ @@ -975,14 +2552,14 @@ export type VaultsListNextResponse = ResourceListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ResourceListResult; + parsedBody: Secret; }; }; /** * Contains response data for the list operation. */ -export type OperationsListResponse = OperationListResult & { +export type SecretsListResponse = SecretListResult & { /** * The underlying HTTP response. */ @@ -995,14 +2572,14 @@ export type OperationsListResponse = OperationListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationListResult; + parsedBody: SecretListResult; }; }; /** * Contains response data for the listNext operation. */ -export type OperationsListNextResponse = OperationListResult & { +export type SecretsListNextResponse = SecretListResult & { /** * The underlying HTTP response. */ @@ -1015,6 +2592,6 @@ export type OperationsListNextResponse = OperationListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationListResult; + parsedBody: SecretListResult; }; }; diff --git a/sdk/keyvault/arm-keyvault/src/models/mHSMPrivateEndpointConnectionsMappers.ts b/sdk/keyvault/arm-keyvault/src/models/mHSMPrivateEndpointConnectionsMappers.ts new file mode 100644 index 000000000000..47bc8a283732 --- /dev/null +++ b/sdk/keyvault/arm-keyvault/src/models/mHSMPrivateEndpointConnectionsMappers.ts @@ -0,0 +1,56 @@ +/* + * 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, + Attributes, + 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, + Secret, + SecretAttributes, + SecretCreateOrUpdateParameters, + SecretPatchParameters, + SecretPatchProperties, + SecretProperties, + 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..0d27aaf9b249 --- /dev/null +++ b/sdk/keyvault/arm-keyvault/src/models/mHSMPrivateLinkResourcesMappers.ts @@ -0,0 +1,52 @@ +/* + * 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, + Attributes, + BaseResource, + CloudError, + IPRule, + ManagedHsm, + ManagedHsmProperties, + ManagedHsmResource, + ManagedHsmSku, + MHSMIPRule, + MHSMNetworkRuleSet, + MHSMPrivateEndpoint, + MHSMPrivateEndpointConnection, + MHSMPrivateEndpointConnectionItem, + MHSMPrivateLinkResource, + MHSMPrivateLinkResourceListResult, + MHSMPrivateLinkServiceConnectionState, + MHSMVirtualNetworkRule, + NetworkRuleSet, + Permissions, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionItem, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + Resource, + Secret, + SecretAttributes, + SecretCreateOrUpdateParameters, + SecretPatchParameters, + SecretPatchProperties, + SecretProperties, + 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..379075980d9f --- /dev/null +++ b/sdk/keyvault/arm-keyvault/src/models/managedHsmsMappers.ts @@ -0,0 +1,56 @@ +/* + * 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, + Attributes, + 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, + Secret, + SecretAttributes, + SecretCreateOrUpdateParameters, + SecretPatchParameters, + SecretPatchProperties, + SecretProperties, + 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..bc61b0d8d2c5 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: { @@ -214,6 +260,81 @@ 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: { + 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: { @@ -274,6 +395,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 +436,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 +515,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 +622,13 @@ export const DeletedVaultProperties: msRest.CompositeMapper = { } } } + }, + purgeProtectionEnabled: { + readOnly: true, + serializedName: "purgeProtectionEnabled", + type: { + name: "Boolean" + } } } } @@ -571,11 +745,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 +773,6 @@ export const Resource: msRest.CompositeMapper = { } }, location: { - required: true, serializedName: "location", type: { name: "String" @@ -615,18 +788,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 +847,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 +958,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,48 +994,61 @@ 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: { - serializedName: "logSpecifications", + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "LogSpecification" + className: "PrivateLinkResource" } } } @@ -823,36 +1057,1036 @@ export const ServiceSpecification: msRest.CompositeMapper = { } }; -export const Operation: msRest.CompositeMapper = { - serializedName: "Operation", +export const ManagedHsmSku: msRest.CompositeMapper = { + serializedName: "ManagedHsmSku", type: { name: "Composite", - className: "Operation", + className: "ManagedHsmSku", modelProperties: { - name: { - serializedName: "name", + family: { + required: true, + isConstant: true, + serializedName: "family", + defaultValue: 'B', type: { name: "String" } }, - display: { - serializedName: "display", + name: { + required: true, + serializedName: "name", type: { - name: "Composite", + 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 ServiceSpecification: msRest.CompositeMapper = { + serializedName: "ServiceSpecification", + type: { + name: "Composite", + className: "ServiceSpecification", + modelProperties: { + logSpecifications: { + serializedName: "logSpecifications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LogSpecification" + } + } + } + } + } + } +}; + +export const Operation: msRest.CompositeMapper = { + serializedName: "Operation", + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", className: "OperationDisplay" } }, - origin: { - serializedName: "origin", + origin: { + serializedName: "origin", + type: { + name: "String" + } + }, + serviceSpecification: { + serializedName: "properties.serviceSpecification", + type: { + name: "Composite", + className: "ServiceSpecification" + } + }, + isDataAction: { + serializedName: "isDataAction", + type: { + name: "Boolean" + } + } + } + } +}; + +export const Attributes: msRest.CompositeMapper = { + serializedName: "Attributes", + type: { + name: "Composite", + className: "Attributes", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + notBefore: { + serializedName: "nbf", + type: { + name: "Number" + } + }, + expires: { + serializedName: "exp", + type: { + name: "Number" + } + }, + created: { + readOnly: true, + serializedName: "created", + type: { + name: "Number" + } + }, + updated: { + readOnly: true, + serializedName: "updated", + type: { + name: "Number" + } + } + } + } +}; + +export const SecretAttributes: msRest.CompositeMapper = { + serializedName: "SecretAttributes", + type: { + name: "Composite", + className: "SecretAttributes", + modelProperties: { + ...Attributes.type.modelProperties + } + } +}; + +export const SecretProperties: msRest.CompositeMapper = { + serializedName: "SecretProperties", + type: { + name: "Composite", + className: "SecretProperties", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "String" + } + }, + contentType: { + serializedName: "contentType", + type: { + name: "String" + } + }, + attributes: { + serializedName: "attributes", + type: { + name: "Composite", + className: "SecretAttributes" + } + }, + secretUri: { + readOnly: true, + serializedName: "secretUri", + type: { + name: "String" + } + }, + secretUriWithVersion: { + readOnly: true, + serializedName: "secretUriWithVersion", + type: { + name: "String" + } + } + } + } +}; + +export const SecretPatchProperties: msRest.CompositeMapper = { + serializedName: "SecretPatchProperties", + type: { + name: "Composite", + className: "SecretPatchProperties", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "String" + } + }, + contentType: { + serializedName: "contentType", type: { name: "String" } }, - serviceSpecification: { - serializedName: "properties.serviceSpecification", + attributes: { + serializedName: "attributes", type: { name: "Composite", - className: "ServiceSpecification" + className: "SecretAttributes" + } + } + } + } +}; + +export const SecretCreateOrUpdateParameters: msRest.CompositeMapper = { + serializedName: "SecretCreateOrUpdateParameters", + type: { + name: "Composite", + className: "SecretCreateOrUpdateParameters", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + properties: { + required: true, + serializedName: "properties", + type: { + name: "Composite", + className: "SecretProperties" + } + } + } + } +}; + +export const SecretPatchParameters: msRest.CompositeMapper = { + serializedName: "SecretPatchParameters", + type: { + name: "Composite", + className: "SecretPatchParameters", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "SecretPatchProperties" + } + } + } + } +}; + +export const Secret: msRest.CompositeMapper = { + serializedName: "Secret", + type: { + name: "Composite", + className: "Secret", + modelProperties: { + ...Resource.type.modelProperties, + properties: { + required: true, + serializedName: "properties", + type: { + name: "Composite", + className: "SecretProperties" + } + } + } + } +}; + +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 +2177,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: { @@ -970,3 +2316,31 @@ export const OperationListResult: msRest.CompositeMapper = { } } }; + +export const SecretListResult: msRest.CompositeMapper = { + serializedName: "SecretListResult", + type: { + name: "Composite", + className: "SecretListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Secret" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/keyvault/arm-keyvault/src/models/operationsMappers.ts b/sdk/keyvault/arm-keyvault/src/models/operationsMappers.ts index 9e480a46a87f..3ada863bb4f1 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. diff --git a/sdk/keyvault/arm-keyvault/src/models/parameters.ts b/sdk/keyvault/arm-keyvault/src/models/parameters.ts index df134cdbf885..0407d83254f2 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: { @@ -100,6 +119,29 @@ export const resourceGroupName: msRest.OperationURLParameter = { } } }; +export const secretName0: msRest.OperationURLParameter = { + parameterPath: "secretName", + mapper: { + required: true, + serializedName: "secretName", + constraints: { + Pattern: /^[a-zA-Z0-9-]{1,127}$/ + }, + type: { + name: "String" + } + } +}; +export const secretName1: msRest.OperationURLParameter = { + parameterPath: "secretName", + mapper: { + required: true, + serializedName: "secretName", + type: { + name: "String" + } + } +}; export const subscriptionId: msRest.OperationURLParameter = { parameterPath: "subscriptionId", mapper: { diff --git a/sdk/keyvault/arm-keyvault/src/models/privateEndpointConnectionsMappers.ts b/sdk/keyvault/arm-keyvault/src/models/privateEndpointConnectionsMappers.ts new file mode 100644 index 000000000000..e9b9db954763 --- /dev/null +++ b/sdk/keyvault/arm-keyvault/src/models/privateEndpointConnectionsMappers.ts @@ -0,0 +1,54 @@ +/* + * 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, + Attributes, + 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, + Secret, + SecretAttributes, + SecretCreateOrUpdateParameters, + SecretPatchParameters, + SecretPatchProperties, + SecretProperties, + 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..43d3b4a87f80 --- /dev/null +++ b/sdk/keyvault/arm-keyvault/src/models/privateLinkResourcesMappers.ts @@ -0,0 +1,52 @@ +/* + * 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, + Attributes, + BaseResource, + CloudError, + IPRule, + ManagedHsm, + ManagedHsmProperties, + ManagedHsmResource, + ManagedHsmSku, + MHSMIPRule, + MHSMNetworkRuleSet, + MHSMPrivateEndpoint, + MHSMPrivateEndpointConnection, + MHSMPrivateEndpointConnectionItem, + MHSMPrivateLinkResource, + MHSMPrivateLinkServiceConnectionState, + MHSMVirtualNetworkRule, + NetworkRuleSet, + Permissions, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionItem, + PrivateLinkResource, + PrivateLinkResourceListResult, + PrivateLinkServiceConnectionState, + Resource, + Secret, + SecretAttributes, + SecretCreateOrUpdateParameters, + SecretPatchParameters, + SecretPatchProperties, + SecretProperties, + Sku, + SystemData, + Vault, + VaultAccessPolicyParameters, + VaultAccessPolicyProperties, + VaultCreateOrUpdateParameters, + VaultPatchParameters, + VaultPatchProperties, + VaultProperties, + VirtualNetworkRule +} from "../models/mappers"; diff --git a/sdk/keyvault/arm-keyvault/src/models/secretsMappers.ts b/sdk/keyvault/arm-keyvault/src/models/secretsMappers.ts new file mode 100644 index 000000000000..20d7e5139eaa --- /dev/null +++ b/sdk/keyvault/arm-keyvault/src/models/secretsMappers.ts @@ -0,0 +1,52 @@ +/* + * 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, + Attributes, + BaseResource, + CloudError, + IPRule, + ManagedHsm, + ManagedHsmProperties, + ManagedHsmResource, + ManagedHsmSku, + MHSMIPRule, + MHSMNetworkRuleSet, + MHSMPrivateEndpoint, + MHSMPrivateEndpointConnection, + MHSMPrivateEndpointConnectionItem, + MHSMPrivateLinkResource, + MHSMPrivateLinkServiceConnectionState, + MHSMVirtualNetworkRule, + NetworkRuleSet, + Permissions, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionItem, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + Resource, + Secret, + SecretAttributes, + SecretCreateOrUpdateParameters, + SecretListResult, + SecretPatchParameters, + SecretPatchProperties, + SecretProperties, + 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..46f617fafadd 100644 --- a/sdk/keyvault/arm-keyvault/src/models/vaultsMappers.ts +++ b/sdk/keyvault/arm-keyvault/src/models/vaultsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,6 +8,7 @@ export { AccessPolicyEntry, + Attributes, BaseResource, CheckNameAvailabilityResult, CloudError, @@ -15,11 +16,35 @@ 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, + Secret, + SecretAttributes, + SecretCreateOrUpdateParameters, + SecretPatchParameters, + SecretPatchProperties, + SecretProperties, 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..370c4bedb142 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,10 @@ */ export * from "./vaults"; +export * from "./privateEndpointConnections"; +export * from "./privateLinkResources"; +export * from "./managedHsms"; +export * from "./mHSMPrivateEndpointConnections"; +export * from "./mHSMPrivateLinkResources"; export * from "./operations"; +export * from "./secrets"; diff --git a/sdk/keyvault/arm-keyvault/src/operations/mHSMPrivateEndpointConnections.ts b/sdk/keyvault/arm-keyvault/src/operations/mHSMPrivateEndpointConnections.ts new file mode 100644 index 000000000000..481fc903ddce --- /dev/null +++ b/sdk/keyvault/arm-keyvault/src/operations/mHSMPrivateEndpointConnections.ts @@ -0,0 +1,353 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/mHSMPrivateEndpointConnectionsMappers"; +import * as Parameters from "../models/parameters"; +import { KeyVaultManagementClientContext } from "../keyVaultManagementClientContext"; + +/** Class representing a MHSMPrivateEndpointConnections. */ +export class MHSMPrivateEndpointConnections { + private readonly client: KeyVaultManagementClientContext; + + /** + * Create a MHSMPrivateEndpointConnections. + * @param {KeyVaultManagementClientContext} client Reference to the service client. + */ + constructor(client: KeyVaultManagementClientContext) { + this.client = client; + } + + /** + * The List operation gets information about the private endpoint connections associated with the + * managed HSM Pool. + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param [options] The optional parameters + * @returns Promise + */ + listByResource(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param callback The callback + */ + listByResource(resourceGroupName: string, name: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param options The optional parameters + * @param callback The callback + */ + listByResource(resourceGroupName: string, name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResource(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + name, + options + }, + listByResourceOperationSpec, + callback) as Promise; + } + + /** + * Gets the specified private endpoint connection associated with the managed HSM Pool. + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param privateEndpointConnectionName Name of the private endpoint connection associated with the + * managed hsm pool. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, name: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param privateEndpointConnectionName Name of the private endpoint connection associated with the + * managed hsm pool. + * @param callback The callback + */ + get(resourceGroupName: string, name: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param privateEndpointConnectionName Name of the private endpoint connection associated with the + * managed hsm pool. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, name: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, name: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + name, + privateEndpointConnectionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Updates the specified private endpoint connection associated with the managed hsm pool. + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param privateEndpointConnectionName Name of the private endpoint connection associated with the + * managed hsm pool. + * @param properties The intended state of private endpoint connection. + * @param [options] The optional parameters + * @returns Promise + */ + put(resourceGroupName: string, name: string, privateEndpointConnectionName: string, properties: Models.MHSMPrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param privateEndpointConnectionName Name of the private endpoint connection associated with the + * managed hsm pool. + * @param properties The intended state of private endpoint connection. + * @param callback The callback + */ + put(resourceGroupName: string, name: string, privateEndpointConnectionName: string, properties: Models.MHSMPrivateEndpointConnection, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param privateEndpointConnectionName Name of the private endpoint connection associated with the + * managed hsm pool. + * @param properties The intended state of private endpoint connection. + * @param options The optional parameters + * @param callback The callback + */ + put(resourceGroupName: string, name: string, privateEndpointConnectionName: string, properties: Models.MHSMPrivateEndpointConnection, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + put(resourceGroupName: string, name: string, privateEndpointConnectionName: string, properties: Models.MHSMPrivateEndpointConnection, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + name, + privateEndpointConnectionName, + properties, + options + }, + putOperationSpec, + callback) as Promise; + } + + /** + * Deletes the specified private endpoint connection associated with the managed hsm pool. + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param privateEndpointConnectionName Name of the private endpoint connection associated with the + * managed hsm pool. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, name: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,name,privateEndpointConnectionName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes the specified private endpoint connection associated with the managed hsm pool. + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param privateEndpointConnectionName Name of the private endpoint connection associated with the + * managed hsm pool. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, name: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + name, + privateEndpointConnectionName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * The List operation gets information about the private endpoint connections associated with the + * managed HSM Pool. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByResourceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/privateEndpointConnections", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MHSMPrivateEndpointConnectionsListResult + }, + default: { + bodyMapper: Mappers.ManagedHsmError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MHSMPrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ManagedHsmError + } + }, + serializer +}; + +const putOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "properties", + mapper: { + ...Mappers.MHSMPrivateEndpointConnection, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.MHSMPrivateEndpointConnection, + headersMapper: Mappers.MHSMPrivateEndpointConnectionsPutHeaders + }, + default: { + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.MHSMPrivateEndpointConnectionsPutHeaders + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MHSMPrivateEndpointConnection, + headersMapper: Mappers.MHSMPrivateEndpointConnectionsDeleteHeaders + }, + 202: { + headersMapper: Mappers.MHSMPrivateEndpointConnectionsDeleteHeaders + }, + 204: { + headersMapper: Mappers.MHSMPrivateEndpointConnectionsDeleteHeaders + }, + default: { + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.MHSMPrivateEndpointConnectionsDeleteHeaders + } + }, + serializer +}; + +const listByResourceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MHSMPrivateEndpointConnectionsListResult + }, + default: { + bodyMapper: Mappers.ManagedHsmError + } + }, + serializer +}; diff --git a/sdk/keyvault/arm-keyvault/src/operations/mHSMPrivateLinkResources.ts b/sdk/keyvault/arm-keyvault/src/operations/mHSMPrivateLinkResources.ts new file mode 100644 index 000000000000..a78fcdde9bfe --- /dev/null +++ b/sdk/keyvault/arm-keyvault/src/operations/mHSMPrivateLinkResources.ts @@ -0,0 +1,86 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/mHSMPrivateLinkResourcesMappers"; +import * as Parameters from "../models/parameters"; +import { KeyVaultManagementClientContext } from "../keyVaultManagementClientContext"; + +/** Class representing a MHSMPrivateLinkResources. */ +export class MHSMPrivateLinkResources { + private readonly client: KeyVaultManagementClientContext; + + /** + * Create a MHSMPrivateLinkResources. + * @param {KeyVaultManagementClientContext} client Reference to the service client. + */ + constructor(client: KeyVaultManagementClientContext) { + this.client = client; + } + + /** + * Gets the private link resources supported for the managed hsm pool. + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param [options] The optional parameters + * @returns Promise + */ + listByMHSMResource(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param callback The callback + */ + listByMHSMResource(resourceGroupName: string, name: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param options The optional parameters + * @param callback The callback + */ + listByMHSMResource(resourceGroupName: string, name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByMHSMResource(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + name, + options + }, + listByMHSMResourceOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByMHSMResourceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/privateLinkResources", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MHSMPrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/keyvault/arm-keyvault/src/operations/managedHsms.ts b/sdk/keyvault/arm-keyvault/src/operations/managedHsms.ts new file mode 100644 index 000000000000..657b42adeaf4 --- /dev/null +++ b/sdk/keyvault/arm-keyvault/src/operations/managedHsms.ts @@ -0,0 +1,702 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/managedHsmsMappers"; +import * as Parameters from "../models/parameters"; +import { KeyVaultManagementClientContext } from "../keyVaultManagementClientContext"; + +/** Class representing a ManagedHsms. */ +export class ManagedHsms { + private readonly client: KeyVaultManagementClientContext; + + /** + * Create a ManagedHsms. + * @param {KeyVaultManagementClientContext} client Reference to the service client. + */ + constructor(client: KeyVaultManagementClientContext) { + this.client = client; + } + + /** + * Create or update a managed HSM Pool in the specified subscription. + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param parameters Parameters to create or update the managed HSM Pool + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, name: string, parameters: Models.ManagedHsm, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,name,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Update a managed HSM Pool in the specified subscription. + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param parameters Parameters to patch the managed HSM Pool + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, name: string, parameters: Models.ManagedHsm, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,name,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes the specified managed HSM Pool. + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name The name of the managed HSM Pool to delete + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,name,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Gets the specified managed HSM Pool. + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name The name of the managed HSM Pool. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name The name of the managed HSM Pool. + * @param callback The callback + */ + get(resourceGroupName: string, name: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name The name of the managed HSM Pool. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + name, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * The List operation gets information about the managed HSM Pools associated with the subscription + * and within the specified resource group. + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: Models.ManagedHsmsListByResourceGroupOptionalParams): Promise; + /** + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, options: Models.ManagedHsmsListByResourceGroupOptionalParams, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: Models.ManagedHsmsListByResourceGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * The List operation gets information about the managed HSM Pools associated with the + * subscription. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscription(options?: Models.ManagedHsmsListBySubscriptionOptionalParams): Promise; + /** + * @param callback The callback + */ + listBySubscription(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listBySubscription(options: Models.ManagedHsmsListBySubscriptionOptionalParams, callback: msRest.ServiceCallback): void; + listBySubscription(options?: Models.ManagedHsmsListBySubscriptionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listBySubscriptionOperationSpec, + callback) as Promise; + } + + /** + * The List operation gets information about the deleted managed HSMs associated with the + * subscription. + * @param [options] The optional parameters + * @returns Promise + */ + listDeleted(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listDeleted(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listDeleted(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listDeleted(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listDeletedOperationSpec, + callback) as Promise; + } + + /** + * Gets the specified deleted managed HSM. + * @param name The name of the deleted managed HSM. + * @param location The location of the deleted managed HSM. + * @param [options] The optional parameters + * @returns Promise + */ + getDeleted(name: string, location: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param name The name of the deleted managed HSM. + * @param location The location of the deleted managed HSM. + * @param callback The callback + */ + getDeleted(name: string, location: string, callback: msRest.ServiceCallback): void; + /** + * @param name The name of the deleted managed HSM. + * @param location The location of the deleted managed HSM. + * @param options The optional parameters + * @param callback The callback + */ + getDeleted(name: string, location: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getDeleted(name: string, location: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + name, + location, + options + }, + getDeletedOperationSpec, + callback) as Promise; + } + + /** + * Permanently deletes the specified managed HSM. + * @param name The name of the soft-deleted managed HSM. + * @param location The location of the soft-deleted managed HSM. + * @param [options] The optional parameters + * @returns Promise + */ + purgeDeleted(name: string, location: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginPurgeDeleted(name,location,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Create or update a managed HSM Pool in the specified subscription. + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param parameters Parameters to create or update the managed HSM Pool + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, name: string, parameters: Models.ManagedHsm, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + name, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Update a managed HSM Pool in the specified subscription. + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name Name of the managed HSM Pool + * @param parameters Parameters to patch the managed HSM Pool + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, name: string, parameters: Models.ManagedHsm, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + name, + parameters, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Deletes the specified managed HSM Pool. + * @param resourceGroupName Name of the resource group that contains the managed HSM pool. + * @param name The name of the managed HSM Pool to delete + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, name: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + name, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Permanently deletes the specified managed HSM. + * @param name The name of the soft-deleted managed HSM. + * @param location The location of the soft-deleted managed HSM. + * @param [options] The optional parameters + * @returns Promise + */ + beginPurgeDeleted(name: string, location: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + name, + location, + options + }, + beginPurgeDeletedOperationSpec, + options); + } + + /** + * The List operation gets information about the managed HSM Pools associated with the subscription + * and within the specified resource group. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroupNext(nextPageLink: string, options?: Models.ManagedHsmsListByResourceGroupNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, options: Models.ManagedHsmsListByResourceGroupNextOptionalParams, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: Models.ManagedHsmsListByResourceGroupNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } + + /** + * The List operation gets information about the managed HSM Pools associated with the + * subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscriptionNext(nextPageLink: string, options?: Models.ManagedHsmsListBySubscriptionNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listBySubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listBySubscriptionNext(nextPageLink: string, options: Models.ManagedHsmsListBySubscriptionNextOptionalParams, callback: msRest.ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: Models.ManagedHsmsListBySubscriptionNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listBySubscriptionNextOperationSpec, + callback) as Promise; + } + + /** + * The List operation gets information about the deleted managed HSMs associated with the + * subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listDeletedNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listDeletedNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listDeletedNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listDeletedNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listDeletedNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.name, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedHsm + }, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ManagedHsmError + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.top, + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedHsmListResult + }, + default: { + bodyMapper: Mappers.ManagedHsmError + } + }, + serializer +}; + +const listBySubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/managedHSMs", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.top, + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedHsmListResult + }, + default: { + bodyMapper: Mappers.ManagedHsmError + } + }, + serializer +}; + +const listDeletedOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/deletedManagedHSMs", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DeletedManagedHsmListResult + }, + default: { + bodyMapper: Mappers.ManagedHsmError + } + }, + serializer +}; + +const getDeletedOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedManagedHSMs/{name}", + urlParameters: [ + Parameters.name, + Parameters.location, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DeletedManagedHsm + }, + default: { + bodyMapper: Mappers.ManagedHsmError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.name, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ManagedHsm, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ManagedHsm + }, + 202: { + bodyMapper: Mappers.ManagedHsm + }, + default: { + bodyMapper: Mappers.ManagedHsmError + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.name, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ManagedHsm, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ManagedHsm + }, + 202: { + bodyMapper: Mappers.ManagedHsm + }, + default: { + bodyMapper: Mappers.ManagedHsmError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.name, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ManagedHsmError + } + }, + serializer +}; + +const beginPurgeDeletedOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedManagedHSMs/{name}/purge", + urlParameters: [ + Parameters.name, + Parameters.location, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 202: {}, + default: { + bodyMapper: Mappers.ManagedHsmError + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.top, + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedHsmListResult + }, + default: { + bodyMapper: Mappers.ManagedHsmError + } + }, + serializer +}; + +const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.top, + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedHsmListResult + }, + default: { + bodyMapper: Mappers.ManagedHsmError + } + }, + serializer +}; + +const listDeletedNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DeletedManagedHsmListResult + }, + default: { + bodyMapper: Mappers.ManagedHsmError + } + }, + serializer +}; diff --git a/sdk/keyvault/arm-keyvault/src/operations/operations.ts b/sdk/keyvault/arm-keyvault/src/operations/operations.ts index 56cd43eb33ca..aa0c5c62b317 100644 --- a/sdk/keyvault/arm-keyvault/src/operations/operations.ts +++ b/sdk/keyvault/arm-keyvault/src/operations/operations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -108,6 +107,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion0 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/keyvault/arm-keyvault/src/operations/privateEndpointConnections.ts b/sdk/keyvault/arm-keyvault/src/operations/privateEndpointConnections.ts new file mode 100644 index 000000000000..f3e94b8174a7 --- /dev/null +++ b/sdk/keyvault/arm-keyvault/src/operations/privateEndpointConnections.ts @@ -0,0 +1,354 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateEndpointConnectionsMappers"; +import * as Parameters from "../models/parameters"; +import { KeyVaultManagementClientContext } from "../keyVaultManagementClientContext"; + +/** Class representing a PrivateEndpointConnections. */ +export class PrivateEndpointConnections { + private readonly client: KeyVaultManagementClientContext; + + /** + * Create a PrivateEndpointConnections. + * @param {KeyVaultManagementClientContext} client Reference to the service client. + */ + constructor(client: KeyVaultManagementClientContext) { + this.client = client; + } + + /** + * Gets the specified private endpoint connection associated with the key vault. + * @param resourceGroupName Name of the resource group that contains the key vault. + * @param vaultName The name of the key vault. + * @param privateEndpointConnectionName Name of the private endpoint connection associated with the + * key vault. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, vaultName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group that contains the key vault. + * @param vaultName The name of the key vault. + * @param privateEndpointConnectionName Name of the private endpoint connection associated with the + * key vault. + * @param callback The callback + */ + get(resourceGroupName: string, vaultName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group that contains the key vault. + * @param vaultName The name of the key vault. + * @param privateEndpointConnectionName Name of the private endpoint connection associated with the + * key vault. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, vaultName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, vaultName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vaultName, + privateEndpointConnectionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Updates the specified private endpoint connection associated with the key vault. + * @param resourceGroupName Name of the resource group that contains the key vault. + * @param vaultName The name of the key vault. + * @param privateEndpointConnectionName Name of the private endpoint connection associated with the + * key vault. + * @param properties The intended state of private endpoint connection. + * @param [options] The optional parameters + * @returns Promise + */ + put(resourceGroupName: string, vaultName: string, privateEndpointConnectionName: string, properties: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group that contains the key vault. + * @param vaultName The name of the key vault. + * @param privateEndpointConnectionName Name of the private endpoint connection associated with the + * key vault. + * @param properties The intended state of private endpoint connection. + * @param callback The callback + */ + put(resourceGroupName: string, vaultName: string, privateEndpointConnectionName: string, properties: Models.PrivateEndpointConnection, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group that contains the key vault. + * @param vaultName The name of the key vault. + * @param privateEndpointConnectionName Name of the private endpoint connection associated with the + * key vault. + * @param properties The intended state of private endpoint connection. + * @param options The optional parameters + * @param callback The callback + */ + put(resourceGroupName: string, vaultName: string, privateEndpointConnectionName: string, properties: Models.PrivateEndpointConnection, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + put(resourceGroupName: string, vaultName: string, privateEndpointConnectionName: string, properties: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vaultName, + privateEndpointConnectionName, + properties, + options + }, + putOperationSpec, + callback) as Promise; + } + + /** + * Deletes the specified private endpoint connection associated with the key vault. + * @param resourceGroupName Name of the resource group that contains the key vault. + * @param vaultName The name of the key vault. + * @param privateEndpointConnectionName Name of the private endpoint connection associated with the + * key vault. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, vaultName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,vaultName,privateEndpointConnectionName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * The List operation gets information about the private endpoint connections associated with the + * vault. + * @param resourceGroupName Name of the resource group that contains the key vault. + * @param vaultName The name of the key vault. + * @param [options] The optional parameters + * @returns Promise + */ + listByResource(resourceGroupName: string, vaultName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group that contains the key vault. + * @param vaultName The name of the key vault. + * @param callback The callback + */ + listByResource(resourceGroupName: string, vaultName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group that contains the key vault. + * @param vaultName The name of the key vault. + * @param options The optional parameters + * @param callback The callback + */ + listByResource(resourceGroupName: string, vaultName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResource(resourceGroupName: string, vaultName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vaultName, + options + }, + listByResourceOperationSpec, + callback) as Promise; + } + + /** + * Deletes the specified private endpoint connection associated with the key vault. + * @param resourceGroupName Name of the resource group that contains the key vault. + * @param vaultName The name of the key vault. + * @param privateEndpointConnectionName Name of the private endpoint connection associated with the + * key vault. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, vaultName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + vaultName, + privateEndpointConnectionName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * The List operation gets information about the private endpoint connections associated with the + * vault. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName0, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const putOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName0, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "properties", + mapper: { + ...Mappers.PrivateEndpointConnection, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection, + headersMapper: Mappers.PrivateEndpointConnectionsPutHeaders + }, + default: { + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.PrivateEndpointConnectionsPutHeaders + } + }, + serializer +}; + +const listByResourceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateEndpointConnections", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName0 + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName0, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection, + headersMapper: Mappers.PrivateEndpointConnectionsDeleteHeaders + }, + 202: { + headersMapper: Mappers.PrivateEndpointConnectionsDeleteHeaders + }, + 204: { + headersMapper: Mappers.PrivateEndpointConnectionsDeleteHeaders + }, + default: { + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.PrivateEndpointConnectionsDeleteHeaders + } + }, + serializer +}; + +const listByResourceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/keyvault/arm-keyvault/src/operations/privateLinkResources.ts b/sdk/keyvault/arm-keyvault/src/operations/privateLinkResources.ts new file mode 100644 index 000000000000..cca698e0dc3d --- /dev/null +++ b/sdk/keyvault/arm-keyvault/src/operations/privateLinkResources.ts @@ -0,0 +1,86 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateLinkResourcesMappers"; +import * as Parameters from "../models/parameters"; +import { KeyVaultManagementClientContext } from "../keyVaultManagementClientContext"; + +/** Class representing a PrivateLinkResources. */ +export class PrivateLinkResources { + private readonly client: KeyVaultManagementClientContext; + + /** + * Create a PrivateLinkResources. + * @param {KeyVaultManagementClientContext} client Reference to the service client. + */ + constructor(client: KeyVaultManagementClientContext) { + this.client = client; + } + + /** + * Gets the private link resources supported for the key vault. + * @param resourceGroupName Name of the resource group that contains the key vault. + * @param vaultName The name of the key vault. + * @param [options] The optional parameters + * @returns Promise + */ + listByVault(resourceGroupName: string, vaultName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group that contains the key vault. + * @param vaultName The name of the key vault. + * @param callback The callback + */ + listByVault(resourceGroupName: string, vaultName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group that contains the key vault. + * @param vaultName The name of the key vault. + * @param options The optional parameters + * @param callback The callback + */ + listByVault(resourceGroupName: string, vaultName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByVault(resourceGroupName: string, vaultName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vaultName, + options + }, + listByVaultOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByVaultOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateLinkResources", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName0 + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/keyvault/arm-keyvault/src/operations/secrets.ts b/sdk/keyvault/arm-keyvault/src/operations/secrets.ts new file mode 100644 index 000000000000..f5801917d435 --- /dev/null +++ b/sdk/keyvault/arm-keyvault/src/operations/secrets.ts @@ -0,0 +1,363 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/secretsMappers"; +import * as Parameters from "../models/parameters"; +import { KeyVaultManagementClientContext } from "../keyVaultManagementClientContext"; + +/** Class representing a Secrets. */ +export class Secrets { + private readonly client: KeyVaultManagementClientContext; + + /** + * Create a Secrets. + * @param {KeyVaultManagementClientContext} client Reference to the service client. + */ + constructor(client: KeyVaultManagementClientContext) { + this.client = client; + } + + /** + * Create or update a secret in a key vault in the specified subscription. NOTE: This API is + * intended for internal use in ARM deployments. Users should use the data-plane REST service for + * interaction with vault secrets. + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName Name of the vault + * @param secretName Name of the secret + * @param parameters Parameters to create or update the secret + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, vaultName: string, secretName: string, parameters: Models.SecretCreateOrUpdateParameters, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName Name of the vault + * @param secretName Name of the secret + * @param parameters Parameters to create or update the secret + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, vaultName: string, secretName: string, parameters: Models.SecretCreateOrUpdateParameters, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName Name of the vault + * @param secretName Name of the secret + * @param parameters Parameters to create or update the secret + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, vaultName: string, secretName: string, parameters: Models.SecretCreateOrUpdateParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, vaultName: string, secretName: string, parameters: Models.SecretCreateOrUpdateParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vaultName, + secretName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Update a secret in the specified subscription. NOTE: This API is intended for internal use in + * ARM deployments. Users should use the data-plane REST service for interaction with vault + * secrets. + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName Name of the vault + * @param secretName Name of the secret + * @param parameters Parameters to patch the secret + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, vaultName: string, secretName: string, parameters: Models.SecretPatchParameters, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName Name of the vault + * @param secretName Name of the secret + * @param parameters Parameters to patch the secret + * @param callback The callback + */ + update(resourceGroupName: string, vaultName: string, secretName: string, parameters: Models.SecretPatchParameters, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName Name of the vault + * @param secretName Name of the secret + * @param parameters Parameters to patch the secret + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, vaultName: string, secretName: string, parameters: Models.SecretPatchParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, vaultName: string, secretName: string, parameters: Models.SecretPatchParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vaultName, + secretName, + parameters, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Gets the specified secret. NOTE: This API is intended for internal use in ARM deployments. + * Users should use the data-plane REST service for interaction with vault secrets. + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName The name of the vault. + * @param secretName The name of the secret. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, vaultName: string, secretName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName The name of the vault. + * @param secretName The name of the secret. + * @param callback The callback + */ + get(resourceGroupName: string, vaultName: string, secretName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName The name of the vault. + * @param secretName The name of the secret. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, vaultName: string, secretName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, vaultName: string, secretName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vaultName, + secretName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * The List operation gets information about the secrets in a vault. NOTE: This API is intended + * for internal use in ARM deployments. Users should use the data-plane REST service for + * interaction with vault secrets. + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName The name of the vault. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, vaultName: string, options?: Models.SecretsListOptionalParams): Promise; + /** + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName The name of the vault. + * @param callback The callback + */ + list(resourceGroupName: string, vaultName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName The name of the vault. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, vaultName: string, options: Models.SecretsListOptionalParams, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, vaultName: string, options?: Models.SecretsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vaultName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * The List operation gets information about the secrets in a vault. NOTE: This API is intended + * for internal use in ARM deployments. Users should use the data-plane REST service for + * interaction with vault secrets. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: Models.SecretsListNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: Models.SecretsListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.SecretsListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{secretName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.vaultName0, + Parameters.secretName0, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.SecretCreateOrUpdateParameters, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Secret + }, + 201: { + bodyMapper: Mappers.Secret + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{secretName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.vaultName0, + Parameters.secretName0, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.SecretPatchParameters, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Secret + }, + 201: { + bodyMapper: Mappers.Secret + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{secretName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.vaultName1, + Parameters.secretName1, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Secret + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.vaultName1, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.top, + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecretListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.top, + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SecretListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/keyvault/arm-keyvault/src/operations/vaults.ts b/sdk/keyvault/arm-keyvault/src/operations/vaults.ts index c6ee4218f7c4..a54d3e96f938 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, @@ -535,6 +534,12 @@ const updateOperationSpec: msRest.OperationSpec = { 201: { bodyMapper: Mappers.Vault }, + 400: { + bodyMapper: Mappers.CloudError + }, + 409: { + bodyMapper: Mappers.CloudError + }, default: { bodyMapper: Mappers.CloudError } @@ -558,6 +563,10 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { ], responses: { 200: {}, + 204: {}, + 400: { + bodyMapper: Mappers.CloudError + }, default: { bodyMapper: Mappers.CloudError } @@ -619,6 +628,15 @@ const updateAccessPolicyOperationSpec: msRest.OperationSpec = { 201: { bodyMapper: Mappers.VaultAccessPolicyParameters }, + 400: { + bodyMapper: Mappers.CloudError + }, + 404: { + bodyMapper: Mappers.CloudError + }, + 409: { + bodyMapper: Mappers.CloudError + }, default: { bodyMapper: Mappers.CloudError } @@ -806,6 +824,12 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { 201: { bodyMapper: Mappers.Vault }, + 400: { + bodyMapper: Mappers.CloudError + }, + 409: { + bodyMapper: Mappers.CloudError + }, default: { bodyMapper: Mappers.CloudError } @@ -830,6 +854,12 @@ const beginPurgeDeletedOperationSpec: msRest.OperationSpec = { responses: { 200: {}, 202: {}, + 400: { + bodyMapper: Mappers.CloudError + }, + 404: { + bodyMapper: Mappers.CloudError + }, default: { bodyMapper: Mappers.CloudError } @@ -844,6 +874,10 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.top, + Parameters.apiVersion0 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -865,6 +899,10 @@ const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.top, + Parameters.apiVersion0 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -886,6 +924,9 @@ const listDeletedNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion0 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -907,6 +948,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