diff --git a/sdk/recoveryservices/arm-recoveryservices/LICENSE.txt b/sdk/recoveryservices/arm-recoveryservices/LICENSE.txt index b73b4a1293c3..ea8fb1516028 100644 --- a/sdk/recoveryservices/arm-recoveryservices/LICENSE.txt +++ b/sdk/recoveryservices/arm-recoveryservices/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 Microsoft +Copyright (c) 2020 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/recoveryservices/arm-recoveryservices/README.md b/sdk/recoveryservices/arm-recoveryservices/README.md index 84a8459dbb03..cbc67cbebdc9 100644 --- a/sdk/recoveryservices/arm-recoveryservices/README.md +++ b/sdk/recoveryservices/arm-recoveryservices/README.md @@ -19,8 +19,9 @@ npm install @azure/arm-recoveryservices ##### 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 @@ -99,5 +100,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%2Frecoveryservices%2Farm-recoveryservices%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/recoveryservices/arm-recoveryservices/README.png) diff --git a/sdk/recoveryservices/arm-recoveryservices/package.json b/sdk/recoveryservices/arm-recoveryservices/package.json index 23c8b30c6a5d..583281c95532 100644 --- a/sdk/recoveryservices/arm-recoveryservices/package.json +++ b/sdk/recoveryservices/arm-recoveryservices/package.json @@ -4,9 +4,9 @@ "description": "RecoveryServicesClient Library with typescript type definitions for node.js and browser.", "version": "3.0.0", "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/recoveryServicesClient.js", "types": "./esm/recoveryServicesClient.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/recoveryservices/arm-recoveryservices", "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/recoveryservices/arm-recoveryservices/rollup.config.js b/sdk/recoveryservices/arm-recoveryservices/rollup.config.js index c52644bf9518..6470f2be7987 100644 --- a/sdk/recoveryservices/arm-recoveryservices/rollup.config.js +++ b/sdk/recoveryservices/arm-recoveryservices/rollup.config.js @@ -29,7 +29,7 @@ const config = { */` }, plugins: [ - nodeResolve({ module: true }), + nodeResolve({ mainFields: ['module', 'main'] }), sourcemaps() ] }; diff --git a/sdk/recoveryservices/arm-recoveryservices/src/models/index.ts b/sdk/recoveryservices/arm-recoveryservices/src/models/index.ts index 5934e032e7a5..c5df6a1236c9 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/models/index.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/models/index.ts @@ -321,42 +321,6 @@ export interface CheckNameAvailabilityResult { message?: string; } -/** - * ARM Resource. - */ -export interface Resource extends BaseResource { - /** - * Resource Id represents the complete path to the resource. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Resource name associated with the resource. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; - /** - * Optional ETag. - */ - eTag?: string; -} - -/** - * Response for check name availability API. Resource provider will set availability as true | - * false. - */ -export interface CheckNameAvailabilityResultResource extends Resource { - /** - * CheckNameAvailabilityResultResource properties - */ - properties?: CheckNameAvailabilityResult; -} - /** * Localized display information of an operation. */ @@ -440,6 +404,31 @@ export interface ClientDiscoveryValueForSingleApi { properties?: ClientDiscoveryForProperties; } +/** + * ARM Resource. + */ +export interface Resource extends BaseResource { + /** + * Resource Id represents the complete path to the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Resource name associated with the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Optional ETag. + */ + eTag?: string; +} + /** * Identifies the unique system identifier for each Azure resource. */ @@ -531,6 +520,86 @@ export interface UpgradeDetails { readonly previousResourceId?: string; } +/** + * Identity for the resource. + */ +export interface IdentityData { + /** + * The principal ID of resource identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * The tenant ID of resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tenantId?: string; + /** + * The identity type. Possible values include: 'SystemAssigned', 'None' + */ + type: ResourceIdentityType; +} + +/** + * The Private Endpoint network resource that is linked to the Private Endpoint connection. + */ +export interface PrivateEndpoint { + /** + * Gets or sets id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; +} + +/** + * Gets or sets private link service connection state. + */ +export interface PrivateLinkServiceConnectionState { + /** + * Gets or sets the status. Possible values include: 'Pending', 'Approved', 'Rejected', + * 'Disconnected' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: PrivateEndpointConnectionStatus; + /** + * Gets or sets description. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; + /** + * Gets or sets actions required. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly actionsRequired?: string; +} + +/** + * Private Endpoint Connection Response Properties. + */ +export interface PrivateEndpointConnection { + /** + * Gets or sets provisioning state of the private endpoint connection. Possible values include: + * 'Succeeded', 'Deleting', 'Failed', 'Pending' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ProvisioningState; + privateEndpoint?: PrivateEndpoint; + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; +} + +/** + * Information to be stored in Vault properties as an element of privateEndpointConnections List. + */ +export interface PrivateEndpointConnectionVaultProperties { + /** + * Format of id + * subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.[Service]/{resource}/{resourceName}/privateEndpointConnections/{connectionName}. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + properties?: PrivateEndpointConnection; +} + /** * Properties of the vault. */ @@ -541,12 +610,28 @@ export interface VaultProperties { */ readonly provisioningState?: string; upgradeDetails?: UpgradeDetails; + /** + * List of private endpoint connection. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly privateEndpointConnections?: PrivateEndpointConnectionVaultProperties[]; + /** + * Private endpoint state for backup. Possible values include: 'None', 'Enabled' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly privateEndpointStateForBackup?: VaultPrivateEndpointState; + /** + * Private endpoint state for site recovery. Possible values include: 'None', 'Enabled' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly privateEndpointStateForSiteRecovery?: VaultPrivateEndpointState; } /** * Resource information, as returned by the resource provider. */ export interface Vault extends TrackedResource { + identity?: IdentityData; properties?: VaultProperties; sku?: Sku; } @@ -581,6 +666,43 @@ export interface VaultExtendedInfoResource extends Resource { algorithm?: string; } +/** + * Information of the private link resource. + */ +export interface PrivateLinkResource { + /** + * e.g. f9ad6492-33d4-4690-9999-6bfd52a0d081 (Backup) or f9ad6492-33d4-4690-9999-6bfd52a0d082 + * (SiteRecovery) + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly groupId?: string; + /** + * [backup-ecs1, backup-prot1, backup-prot1b, backup-prot1c, backup-id1] + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly requiredMembers?: string[]; + /** + * The private link resource Private link DNS zone name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly requiredZoneNames?: string[]; + /** + * Fully qualified identifier of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Name of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * e.g. Microsoft.RecoveryServices/vaults/privateLinkResources + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + /** * The name of usage. */ @@ -641,6 +763,18 @@ export interface RecoveryServicesClientOptions extends AzureServiceClientOptions export interface ReplicationUsageList extends Array { } +/** + * @interface + * Class which represent the stamps associated with the vault. + * @extends Array + */ +export interface PrivateLinkResources extends Array { + /** + * Link to the next chunk of the response + */ + nextLink?: string; +} + /** * @interface * The response model for a list of Vaults. @@ -705,6 +839,38 @@ export type VaultUpgradeState = 'Unknown' | 'InProgress' | 'Upgraded' | 'Failed' */ export type TriggerType = 'UserTriggered' | 'ForcedUpgrade'; +/** + * Defines values for ResourceIdentityType. + * Possible values include: 'SystemAssigned', 'None' + * @readonly + * @enum {string} + */ +export type ResourceIdentityType = 'SystemAssigned' | 'None'; + +/** + * Defines values for ProvisioningState. + * Possible values include: 'Succeeded', 'Deleting', 'Failed', 'Pending' + * @readonly + * @enum {string} + */ +export type ProvisioningState = 'Succeeded' | 'Deleting' | 'Failed' | 'Pending'; + +/** + * Defines values for PrivateEndpointConnectionStatus. + * Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' + * @readonly + * @enum {string} + */ +export type PrivateEndpointConnectionStatus = 'Pending' | 'Approved' | 'Rejected' | 'Disconnected'; + +/** + * Defines values for VaultPrivateEndpointState. + * Possible values include: 'None', 'Enabled' + * @readonly + * @enum {string} + */ +export type VaultPrivateEndpointState = 'None' | 'Enabled'; + /** * Defines values for UsagesUnit. * Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', @@ -754,10 +920,70 @@ export type ReplicationUsagesListResponse = ReplicationUsageList & { }; }; +/** + * Contains response data for the list operation. + */ +export type PrivateLinkResourcesListResponse = PrivateLinkResources & { + /** + * 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: PrivateLinkResources; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type PrivateLinkResourcesGetResponse = PrivateLinkResource & { + /** + * 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: PrivateLinkResource; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type PrivateLinkResourcesListNextResponse = PrivateLinkResources & { + /** + * 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: PrivateLinkResources; + }; +}; + /** * Contains response data for the checkNameAvailability operation. */ -export type RecoveryServicesCheckNameAvailabilityResponse = CheckNameAvailabilityResultResource & { +export type RecoveryServicesCheckNameAvailabilityResponse = CheckNameAvailabilityResult & { /** * The underlying HTTP response. */ @@ -770,7 +996,7 @@ export type RecoveryServicesCheckNameAvailabilityResponse = CheckNameAvailabilit /** * The response body as parsed JSON or XML */ - parsedBody: CheckNameAvailabilityResultResource; + parsedBody: CheckNameAvailabilityResult; }; }; diff --git a/sdk/recoveryservices/arm-recoveryservices/src/models/mappers.ts b/sdk/recoveryservices/arm-recoveryservices/src/models/mappers.ts index 3b2d230c2c99..03e34ca92701 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/models/mappers.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/models/mappers.ts @@ -413,61 +413,6 @@ export const CheckNameAvailabilityResult: 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" - } - }, - eTag: { - serializedName: "eTag", - type: { - name: "String" - } - } - } - } -}; - -export const CheckNameAvailabilityResultResource: msRest.CompositeMapper = { - serializedName: "CheckNameAvailabilityResultResource", - type: { - name: "Composite", - className: "CheckNameAvailabilityResultResource", - modelProperties: { - ...Resource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "CheckNameAvailabilityResult" - } - } - } - } -}; - export const ClientDiscoveryDisplay: msRest.CompositeMapper = { serializedName: "ClientDiscoveryDisplay", type: { @@ -605,6 +550,43 @@ export const ClientDiscoveryValueForSingleApi: 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" + } + }, + eTag: { + serializedName: "eTag", + type: { + name: "String" + } + } + } + } +}; + export const Sku: msRest.CompositeMapper = { serializedName: "Sku", type: { @@ -752,6 +734,140 @@ export const UpgradeDetails: msRest.CompositeMapper = { } }; +export const IdentityData: msRest.CompositeMapper = { + serializedName: "IdentityData", + type: { + name: "Composite", + className: "IdentityData", + modelProperties: { + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "String" + } + }, + tenantId: { + readOnly: true, + serializedName: "tenantId", + type: { + name: "String" + } + }, + type: { + required: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpoint: msRest.CompositeMapper = { + serializedName: "PrivateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkServiceConnectionState: msRest.CompositeMapper = { + serializedName: "PrivateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState", + modelProperties: { + status: { + readOnly: true, + serializedName: "status", + type: { + name: "String" + } + }, + description: { + readOnly: true, + serializedName: "description", + type: { + name: "String" + } + }, + actionsRequired: { + readOnly: true, + serializedName: "actionsRequired", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnection: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnection", + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + provisioningState: { + readOnly: true, + serializedName: "provisioningState", + type: { + name: "String" + } + }, + privateEndpoint: { + serializedName: "privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint" + } + }, + privateLinkServiceConnectionState: { + serializedName: "privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState" + } + } + } + } +}; + +export const PrivateEndpointConnectionVaultProperties: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnectionVaultProperties", + type: { + name: "Composite", + className: "PrivateEndpointConnectionVaultProperties", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + } +}; + export const VaultProperties: msRest.CompositeMapper = { serializedName: "VaultProperties", type: { @@ -771,6 +887,33 @@ export const VaultProperties: msRest.CompositeMapper = { name: "Composite", className: "UpgradeDetails" } + }, + privateEndpointConnections: { + readOnly: true, + serializedName: "privateEndpointConnections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnectionVaultProperties" + } + } + } + }, + privateEndpointStateForBackup: { + readOnly: true, + serializedName: "privateEndpointStateForBackup", + type: { + name: "String" + } + }, + privateEndpointStateForSiteRecovery: { + readOnly: true, + serializedName: "privateEndpointStateForSiteRecovery", + type: { + name: "String" + } } } } @@ -783,6 +926,13 @@ export const Vault: msRest.CompositeMapper = { className: "Vault", modelProperties: { ...TrackedResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "IdentityData" + } + }, properties: { serializedName: "properties", type: { @@ -861,6 +1011,68 @@ export const VaultExtendedInfoResource: msRest.CompositeMapper = { } }; +export const PrivateLinkResource: msRest.CompositeMapper = { + serializedName: "PrivateLinkResource", + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + groupId: { + readOnly: true, + serializedName: "properties.groupId", + type: { + name: "String" + } + }, + requiredMembers: { + readOnly: true, + serializedName: "properties.requiredMembers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + requiredZoneNames: { + readOnly: true, + serializedName: "properties.requiredZoneNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + export const NameInfo: msRest.CompositeMapper = { serializedName: "NameInfo", type: { @@ -952,6 +1164,34 @@ export const ReplicationUsageList: msRest.CompositeMapper = { } }; +export const PrivateLinkResources: msRest.CompositeMapper = { + serializedName: "PrivateLinkResources", + type: { + name: "Composite", + className: "PrivateLinkResources", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const VaultList: msRest.CompositeMapper = { serializedName: "VaultList", type: { diff --git a/sdk/recoveryservices/arm-recoveryservices/src/models/parameters.ts b/sdk/recoveryservices/arm-recoveryservices/src/models/parameters.ts index 2918e5899f4d..cf4b26a483a3 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/models/parameters.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/models/parameters.ts @@ -71,6 +71,16 @@ export const nextPageLink: msRest.OperationURLParameter = { }, skipEncoding: true }; +export const privateLinkResourceName: msRest.OperationURLParameter = { + parameterPath: "privateLinkResourceName", + mapper: { + required: true, + serializedName: "privateLinkResourceName", + type: { + name: "String" + } + } +}; export const resourceGroupName: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { diff --git a/sdk/recoveryservices/arm-recoveryservices/src/models/privateLinkResourcesOperationsMappers.ts b/sdk/recoveryservices/arm-recoveryservices/src/models/privateLinkResourcesOperationsMappers.ts new file mode 100644 index 000000000000..28c37bbb928d --- /dev/null +++ b/sdk/recoveryservices/arm-recoveryservices/src/models/privateLinkResourcesOperationsMappers.ts @@ -0,0 +1,14 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + CloudError, + PrivateLinkResource, + PrivateLinkResources +} from "../models/mappers"; diff --git a/sdk/recoveryservices/arm-recoveryservices/src/models/recoveryServicesMappers.ts b/sdk/recoveryservices/arm-recoveryservices/src/models/recoveryServicesMappers.ts index 8657c07da531..4379c294d5eb 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/models/recoveryServicesMappers.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/models/recoveryServicesMappers.ts @@ -8,22 +8,7 @@ export { discriminators, - BaseResource, CheckNameAvailabilityParameters, CheckNameAvailabilityResult, - CheckNameAvailabilityResultResource, - CloudError, - PatchTrackedResource, - PatchVault, - Resource, - ResourceCertificateAndAadDetails, - ResourceCertificateAndAcsDetails, - ResourceCertificateDetails, - Sku, - TrackedResource, - UpgradeDetails, - Vault, - VaultCertificateResponse, - VaultExtendedInfoResource, - VaultProperties + CloudError } from "../models/mappers"; diff --git a/sdk/recoveryservices/arm-recoveryservices/src/models/vaultCertificatesMappers.ts b/sdk/recoveryservices/arm-recoveryservices/src/models/vaultCertificatesMappers.ts index e110ea4c5029..e47a673377bd 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/models/vaultCertificatesMappers.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/models/vaultCertificatesMappers.ts @@ -10,11 +10,14 @@ export { discriminators, BaseResource, CertificateRequest, - CheckNameAvailabilityResult, - CheckNameAvailabilityResultResource, CloudError, + IdentityData, PatchTrackedResource, PatchVault, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionVaultProperties, + PrivateLinkServiceConnectionState, RawCertificateData, Resource, ResourceCertificateAndAadDetails, diff --git a/sdk/recoveryservices/arm-recoveryservices/src/models/vaultExtendedInfoOperationsMappers.ts b/sdk/recoveryservices/arm-recoveryservices/src/models/vaultExtendedInfoOperationsMappers.ts index 04842cae86a4..12974cf26473 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/models/vaultExtendedInfoOperationsMappers.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/models/vaultExtendedInfoOperationsMappers.ts @@ -9,11 +9,14 @@ export { discriminators, BaseResource, - CheckNameAvailabilityResult, - CheckNameAvailabilityResultResource, CloudError, + IdentityData, PatchTrackedResource, PatchVault, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionVaultProperties, + PrivateLinkServiceConnectionState, Resource, ResourceCertificateAndAadDetails, ResourceCertificateAndAcsDetails, diff --git a/sdk/recoveryservices/arm-recoveryservices/src/models/vaultsMappers.ts b/sdk/recoveryservices/arm-recoveryservices/src/models/vaultsMappers.ts index 8456bdefbf1a..cc7683fda040 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/models/vaultsMappers.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/models/vaultsMappers.ts @@ -9,11 +9,14 @@ export { discriminators, BaseResource, - CheckNameAvailabilityResult, - CheckNameAvailabilityResultResource, CloudError, + IdentityData, PatchTrackedResource, PatchVault, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionVaultProperties, + PrivateLinkServiceConnectionState, Resource, ResourceCertificateAndAadDetails, ResourceCertificateAndAcsDetails, diff --git a/sdk/recoveryservices/arm-recoveryservices/src/operations/index.ts b/sdk/recoveryservices/arm-recoveryservices/src/operations/index.ts index 033b3f50c301..8a9fced80e6c 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/operations/index.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/operations/index.ts @@ -11,6 +11,7 @@ export * from "./vaultCertificates"; export * from "./registeredIdentities"; export * from "./replicationUsages"; +export * from "./privateLinkResourcesOperations"; export * from "./recoveryServices"; export * from "./vaults"; export * from "./operations"; diff --git a/sdk/recoveryservices/arm-recoveryservices/src/operations/privateLinkResourcesOperations.ts b/sdk/recoveryservices/arm-recoveryservices/src/operations/privateLinkResourcesOperations.ts new file mode 100644 index 000000000000..d81da3b940c7 --- /dev/null +++ b/sdk/recoveryservices/arm-recoveryservices/src/operations/privateLinkResourcesOperations.ts @@ -0,0 +1,207 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * 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/privateLinkResourcesOperationsMappers"; +import * as Parameters from "../models/parameters"; +import { RecoveryServicesClientContext } from "../recoveryServicesClientContext"; + +/** Class representing a PrivateLinkResourcesOperations. */ +export class PrivateLinkResourcesOperations { + private readonly client: RecoveryServicesClientContext; + + /** + * Create a PrivateLinkResourcesOperations. + * @param {RecoveryServicesClientContext} client Reference to the service client. + */ + constructor(client: RecoveryServicesClientContext) { + this.client = client; + } + + /** + * @summary Returns the list of private link resources that need to be created for Backup and + * SiteRecovery + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param vaultName The name of the recovery services vault. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, vaultName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param vaultName The name of the recovery services vault. + * @param callback The callback + */ + list(resourceGroupName: string, vaultName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param vaultName The name of the recovery services vault. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, vaultName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, vaultName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vaultName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * @summary Returns a specified private link resource that need to be created for Backup and + * SiteRecovery + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param vaultName The name of the recovery services vault. + * @param privateLinkResourceName + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, vaultName: string, privateLinkResourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param vaultName The name of the recovery services vault. + * @param privateLinkResourceName + * @param callback The callback + */ + get(resourceGroupName: string, vaultName: string, privateLinkResourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param vaultName The name of the recovery services vault. + * @param privateLinkResourceName + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, vaultName: string, privateLinkResourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, vaultName: string, privateLinkResourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + vaultName, + privateLinkResourceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * @summary Returns the list of private link resources that need to be created for Backup and + * SiteRecovery + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateLinkResources", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResources + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateLinkResources/{privateLinkResourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.vaultName, + Parameters.privateLinkResourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResources + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/recoveryservices/arm-recoveryservices/src/operations/recoveryServices.ts b/sdk/recoveryservices/arm-recoveryservices/src/operations/recoveryServices.ts index 0dae8807e1f4..5bb678c40b94 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/operations/recoveryServices.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/operations/recoveryServices.ts @@ -47,7 +47,7 @@ export class RecoveryServices { * @param input Contains information about Resource type and Resource name * @param callback The callback */ - checkNameAvailability(resourceGroupName: string, location: string, input: Models.CheckNameAvailabilityParameters, callback: msRest.ServiceCallback): void; + checkNameAvailability(resourceGroupName: string, location: string, input: Models.CheckNameAvailabilityParameters, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group where the recovery services vault is * present. @@ -56,8 +56,8 @@ export class RecoveryServices { * @param options The optional parameters * @param callback The callback */ - checkNameAvailability(resourceGroupName: string, location: string, input: Models.CheckNameAvailabilityParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - checkNameAvailability(resourceGroupName: string, location: string, input: Models.CheckNameAvailabilityParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + checkNameAvailability(resourceGroupName: string, location: string, input: Models.CheckNameAvailabilityParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + checkNameAvailability(resourceGroupName: string, location: string, input: Models.CheckNameAvailabilityParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -95,7 +95,7 @@ const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { }, responses: { 200: { - bodyMapper: Mappers.CheckNameAvailabilityResultResource + bodyMapper: Mappers.CheckNameAvailabilityResult }, default: { bodyMapper: Mappers.CloudError diff --git a/sdk/recoveryservices/arm-recoveryservices/src/recoveryServicesClient.ts b/sdk/recoveryservices/arm-recoveryservices/src/recoveryServicesClient.ts index 6d46f7b794c0..a14c6a9dd2f8 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/recoveryServicesClient.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/recoveryServicesClient.ts @@ -20,6 +20,7 @@ class RecoveryServicesClient extends RecoveryServicesClientContext { vaultCertificates: operations.VaultCertificates; registeredIdentities: operations.RegisteredIdentities; replicationUsages: operations.ReplicationUsages; + privateLinkResources: operations.PrivateLinkResourcesOperations; recoveryServices: operations.RecoveryServices; vaults: operations.Vaults; operations: operations.Operations; @@ -37,6 +38,7 @@ class RecoveryServicesClient extends RecoveryServicesClientContext { this.vaultCertificates = new operations.VaultCertificates(this); this.registeredIdentities = new operations.RegisteredIdentities(this); this.replicationUsages = new operations.ReplicationUsages(this); + this.privateLinkResources = new operations.PrivateLinkResourcesOperations(this); this.recoveryServices = new operations.RecoveryServices(this); this.vaults = new operations.Vaults(this); this.operations = new operations.Operations(this); diff --git a/sdk/recoveryservices/arm-recoveryservices/tsconfig.json b/sdk/recoveryservices/arm-recoveryservices/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/recoveryservices/arm-recoveryservices/tsconfig.json +++ b/sdk/recoveryservices/arm-recoveryservices/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true