From a0c95b63bf7e8f5a8026e4f0aaad21e9390777a8 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Thu, 27 Aug 2020 20:16:05 +0000 Subject: [PATCH] Generated from 4ae1c90fa61f904427bb798b6f9e13fa8754b84d update casing for examples --- .../src/hybridComputeManagementClient.ts | 11 +- .../hybridComputeManagementClientContext.ts | 7 +- .../arm-hybridcompute/src/models/index.ts | 690 ++++++++++++++++++ .../src/models/machineExtensionsMappers.ts | 7 + .../src/models/machinesMappers.ts | 7 + .../arm-hybridcompute/src/models/mappers.ts | 531 ++++++++++++++ .../src/models/parameters.ts | 36 + .../privateEndpointConnectionsMappers.ts | 38 + .../src/models/privateLinkResourcesMappers.ts | 38 + .../privateLinkScopedResourcesMappers.ts | 38 + .../src/models/privateLinkScopesMappers.ts | 39 + .../arm-hybridcompute/src/operations/index.ts | 4 + .../operations/privateEndpointConnections.ts | 328 +++++++++ .../src/operations/privateLinkResources.ts | 198 +++++ .../operations/privateLinkScopedResources.ts | 331 +++++++++ .../src/operations/privateLinkScopes.ts | 484 ++++++++++++ 16 files changed, 2781 insertions(+), 6 deletions(-) create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/models/privateEndpointConnectionsMappers.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/models/privateLinkResourcesMappers.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/models/privateLinkScopedResourcesMappers.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/models/privateLinkScopesMappers.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operations/privateEndpointConnections.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkResources.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopedResources.ts create mode 100644 sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopes.ts diff --git a/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts b/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts index 1dff14273cc3..032ca01fcfc8 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClient.ts @@ -20,12 +20,15 @@ class HybridComputeManagementClient extends HybridComputeManagementClientContext machines: operations.Machines; machineExtensions: operations.MachineExtensions; operations: operations.Operations; + privateLinkScopes: operations.PrivateLinkScopes; + privateLinkResources: operations.PrivateLinkResources; + privateEndpointConnections: operations.PrivateEndpointConnections; + privateLinkScopedResources: operations.PrivateLinkScopedResources; /** * Initializes a new instance of the HybridComputeManagementClient class. * @param credentials Credentials needed for the client to connect to Azure. - * @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure - * subscription. The subscription ID forms part of the URI for every service call. + * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.HybridComputeManagementClientOptions) { @@ -33,6 +36,10 @@ class HybridComputeManagementClient extends HybridComputeManagementClientContext this.machines = new operations.Machines(this); this.machineExtensions = new operations.MachineExtensions(this); this.operations = new operations.Operations(this); + this.privateLinkScopes = new operations.PrivateLinkScopes(this); + this.privateLinkResources = new operations.PrivateLinkResources(this); + this.privateEndpointConnections = new operations.PrivateEndpointConnections(this); + this.privateLinkScopedResources = new operations.PrivateLinkScopedResources(this); } } diff --git a/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClientContext.ts b/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClientContext.ts index ed2a8b127038..1b0280c6e7fc 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClientContext.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/hybridComputeManagementClientContext.ts @@ -17,14 +17,13 @@ const packageVersion = "1.0.0"; export class HybridComputeManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; - subscriptionId: string; apiVersion?: string; + subscriptionId: string; /** * Initializes a new instance of the HybridComputeManagementClient class. * @param credentials Credentials needed for the client to connect to Azure. - * @param subscriptionId Subscription credentials which uniquely identify Microsoft Azure - * subscription. The subscription ID forms part of the URI for every service call. + * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.HybridComputeManagementClientOptions) { @@ -45,7 +44,7 @@ export class HybridComputeManagementClientContext extends msRestAzure.AzureServi super(credentials, options); - this.apiVersion = '2020-07-30-preview'; + this.apiVersion = '2020-08-15-preview'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/models/index.ts b/sdk/hybridcompute/arm-hybridcompute/src/models/index.ts index 9b42401c6eb1..223a1bb4e0f9 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/index.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/models/index.ts @@ -275,6 +275,11 @@ export interface MachineProperties { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly dnsFqdn?: string; + /** + * List of linked private link scoped resources. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly privateLinkScopedResources?: string[]; } /** @@ -440,6 +445,11 @@ export interface Machine extends TrackedResource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly dnsFqdn?: string; + /** + * List of linked private link scoped resources. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly privateLinkScopedResources?: string[]; identity?: MachineIdentity; } @@ -679,6 +689,226 @@ export interface AzureEntityResource extends Resource { readonly etag?: string; } +/** + * An azure resource object + */ +export interface PrivateLinkScopesResource extends BaseResource { + /** + * Azure resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Azure resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Azure resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Resource location + */ + location: string; + /** + * Resource tags + */ + tags?: { [propertyName: string]: string }; +} + +/** + * A container holding only the Tags for a resource, allowing the user to update the tags on a + * PrivateLinkScope instance. + */ +export interface TagsResource { + /** + * Resource tags + */ + tags?: { [propertyName: string]: string }; +} + +/** + * Private endpoint which the connection belongs to. + */ +export interface PrivateEndpointProperty { + /** + * Resource id of the private endpoint. + */ + id?: string; +} + +/** + * State of the private endpoint connection. + */ +export interface PrivateLinkServiceConnectionStateProperty { + /** + * The private link service connection status. + */ + status: string; + /** + * The private link service connection description. + */ + description: string; + /** + * The actions required for private link service connection. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly actionsRequired?: string; +} + +/** + * A private endpoint connection + */ +export interface PrivateEndpointConnection extends ProxyResource { + /** + * Private endpoint which the connection belongs to. + */ + privateEndpoint?: PrivateEndpointProperty; + /** + * Connection state of the private endpoint connection. + */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionStateProperty; + /** + * State of the private endpoint connection. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: string; +} + +/** + * An Azure Arc PrivateLinkScope definition. + */ +export interface HybridComputePrivateLinkScope extends PrivateLinkScopesResource { + /** + * The network access type for accessing Arc Backend Services. Possible values include: + * 'Enabled', 'Disabled'. Default value: 'Disabled'. + */ + publicNetworkAccess?: PublicNetworkAccessType; + /** + * Current state of this PrivateLinkScope: whether or not is has been provisioned within the + * resource group it is defined. Users cannot change this value but are able to read from it. + * Values will include Provisioning ,Succeeded, Canceled and Failed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: string; + /** + * List of private endpoint connections. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly privateEndpointConnections?: PrivateEndpointConnection[]; +} + +/** + * A private link resource + */ +export interface PrivateLinkResource extends ProxyResource { + /** + * The private link resource group id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly groupId?: string; + /** + * The private link resource required member names. + * **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. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly requiredZoneNames?: string[]; +} + +/** + * A private link scoped resource + */ +export interface ScopedResource extends ProxyResource { + /** + * The resource id of the scoped Azure monitor resource. + */ + linkedResourceId?: string; + /** + * State of the private endpoint connection. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: string; +} + +/** + * The resource management error additional info. + */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly info?: any; +} + +/** + * The resource management error response. + */ +export interface ErrorResponseV2 { + /** + * The error object. + */ + error?: ErrorResponseV2Error; +} + +/** + * The resource management error response. + */ +export interface ErrorResponseCommon extends ErrorResponseV2 { + /** + * The error details. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly details?: ErrorResponseCommon[]; + /** + * The error additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** + * The error object. + */ +export interface ErrorResponseV2Error { + /** + * 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 error target. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly target?: string; + /** + * The error details. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly details?: ErrorResponseV2[]; + /** + * The error additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + /** * Optional Parameters. */ @@ -740,6 +970,58 @@ export interface MachineExtensionsListResult extends Array { export interface OperationListResult extends Array { } +/** + * @interface + * Describes the list of Azure Arc PrivateLinkScope resources. + * @extends Array + */ +export interface HybridComputePrivateLinkScopeListResult extends Array { + /** + * The URI to get the next set of Azure Arc PrivateLinkScope definitions if too many + * PrivateLinkScopes where returned in the result set. + */ + nextLink?: string; +} + +/** + * @interface + * A list of private link resources + * @extends Array + */ +export interface PrivateLinkResourceListResult extends Array { + /** + * Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A list of private endpoint connections. + * @extends Array + */ +export interface PrivateEndpointConnectionListResult extends Array { + /** + * Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A list of scoped resources in a private link scope. + * @extends Array + */ +export interface ScopedResourceListResult extends Array { + /** + * Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + /** * Defines values for StatusTypes. * Possible values include: 'Connected', 'Disconnected', 'Error' @@ -756,6 +1038,14 @@ export type StatusTypes = 'Connected' | 'Disconnected' | 'Error'; */ export type StatusLevelTypes = 'Info' | 'Warning' | 'Error'; +/** + * Defines values for PublicNetworkAccessType. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type PublicNetworkAccessType = 'Enabled' | 'Disabled'; + /** * Defines values for InstanceViewTypes. * Possible values include: 'instanceView' @@ -1023,3 +1313,403 @@ export type OperationsListResponse = OperationListResult & { parsedBody: OperationListResult; }; }; + +/** + * Contains response data for the list operation. + */ +export type PrivateLinkScopesListResponse = HybridComputePrivateLinkScopeListResult & { + /** + * 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: HybridComputePrivateLinkScopeListResult; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type PrivateLinkScopesListByResourceGroupResponse = HybridComputePrivateLinkScopeListResult & { + /** + * 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: HybridComputePrivateLinkScopeListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type PrivateLinkScopesGetResponse = HybridComputePrivateLinkScope & { + /** + * 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: HybridComputePrivateLinkScope; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type PrivateLinkScopesCreateOrUpdateResponse = HybridComputePrivateLinkScope & { + /** + * 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: HybridComputePrivateLinkScope; + }; +}; + +/** + * Contains response data for the updateTags operation. + */ +export type PrivateLinkScopesUpdateTagsResponse = HybridComputePrivateLinkScope & { + /** + * 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: HybridComputePrivateLinkScope; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type PrivateLinkScopesListNextResponse = HybridComputePrivateLinkScopeListResult & { + /** + * 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: HybridComputePrivateLinkScopeListResult; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type PrivateLinkScopesListByResourceGroupNextResponse = HybridComputePrivateLinkScopeListResult & { + /** + * 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: HybridComputePrivateLinkScopeListResult; + }; +}; + +/** + * Contains response data for the listByPrivateLinkScope operation. + */ +export type PrivateLinkResourcesListByPrivateLinkScopeResponse = PrivateLinkResourceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateLinkResourceListResult; + }; +}; + +/** + * Contains response data for the 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 listByPrivateLinkScopeNext operation. + */ +export type PrivateLinkResourcesListByPrivateLinkScopeNextResponse = PrivateLinkResourceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateLinkResourceListResult; + }; +}; + +/** + * Contains response data for the 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 createOrUpdate operation. + */ +export type PrivateEndpointConnectionsCreateOrUpdateResponse = 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 listByPrivateLinkScope operation. + */ +export type PrivateEndpointConnectionsListByPrivateLinkScopeResponse = 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 beginCreateOrUpdate operation. + */ +export type PrivateEndpointConnectionsBeginCreateOrUpdateResponse = 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 listByPrivateLinkScopeNext operation. + */ +export type PrivateEndpointConnectionsListByPrivateLinkScopeNextResponse = 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 get operation. + */ +export type PrivateLinkScopedResourcesGetResponse = ScopedResource & { + /** + * 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: ScopedResource; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type PrivateLinkScopedResourcesCreateOrUpdateResponse = ScopedResource & { + /** + * 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: ScopedResource; + }; +}; + +/** + * Contains response data for the listByPrivateLinkScope operation. + */ +export type PrivateLinkScopedResourcesListByPrivateLinkScopeResponse = ScopedResourceListResult & { + /** + * 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: ScopedResourceListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type PrivateLinkScopedResourcesBeginCreateOrUpdateResponse = ScopedResource & { + /** + * 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: ScopedResource; + }; +}; + +/** + * Contains response data for the listByPrivateLinkScopeNext operation. + */ +export type PrivateLinkScopedResourcesListByPrivateLinkScopeNextResponse = ScopedResourceListResult & { + /** + * 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: ScopedResourceListResult; + }; +}; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/models/machineExtensionsMappers.ts b/sdk/hybridcompute/arm-hybridcompute/src/models/machineExtensionsMappers.ts index 67663c9ee0f5..f8a75cd0a53b 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/machineExtensionsMappers.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/models/machineExtensionsMappers.ts @@ -11,6 +11,7 @@ export { BaseResource, CloudError, ErrorDetail, + HybridComputePrivateLinkScope, Identity, LocationData, Machine, @@ -24,8 +25,14 @@ export { MachinePropertiesOsProfile, MachineUpdate, OSProfile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkScopesResource, + PrivateLinkServiceConnectionStateProperty, ProxyResource, Resource, + ScopedResource, TrackedResource, UpdateResource } from "../models/mappers"; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/models/machinesMappers.ts b/sdk/hybridcompute/arm-hybridcompute/src/models/machinesMappers.ts index c4d65dc1db0f..e76a80d3fc29 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/machinesMappers.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/models/machinesMappers.ts @@ -11,6 +11,7 @@ export { BaseResource, ErrorDetail, ErrorResponse, + HybridComputePrivateLinkScope, Identity, LocationData, Machine, @@ -22,7 +23,13 @@ export { MachineListResult, MachinePropertiesOsProfile, OSProfile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkScopesResource, + PrivateLinkServiceConnectionStateProperty, ProxyResource, Resource, + ScopedResource, TrackedResource } from "../models/mappers"; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/models/mappers.ts b/sdk/hybridcompute/arm-hybridcompute/src/models/mappers.ts index 7a870ddf1d30..3bfef1e0e676 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/mappers.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/models/mappers.ts @@ -432,6 +432,18 @@ export const MachineProperties: msRest.CompositeMapper = { type: { name: "String" } + }, + privateLinkScopedResources: { + readOnly: true, + serializedName: "privateLinkScopedResources", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } } } @@ -704,6 +716,18 @@ export const Machine: msRest.CompositeMapper = { name: "String" } }, + privateLinkScopedResources: { + readOnly: true, + serializedName: "properties.privateLinkScopedResources", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, identity: { serializedName: "identity", type: { @@ -1070,6 +1094,394 @@ export const AzureEntityResource: msRest.CompositeMapper = { } }; +export const PrivateLinkScopesResource: msRest.CompositeMapper = { + serializedName: "PrivateLinkScopesResource", + type: { + name: "Composite", + className: "PrivateLinkScopesResource", + 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: { + required: true, + serializedName: "location", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const TagsResource: msRest.CompositeMapper = { + serializedName: "TagsResource", + type: { + name: "Composite", + className: "TagsResource", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const PrivateEndpointProperty: msRest.CompositeMapper = { + serializedName: "PrivateEndpointProperty", + type: { + name: "Composite", + className: "PrivateEndpointProperty", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkServiceConnectionStateProperty: msRest.CompositeMapper = { + serializedName: "PrivateLinkServiceConnectionStateProperty", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionStateProperty", + modelProperties: { + status: { + required: true, + serializedName: "status", + type: { + name: "String" + } + }, + description: { + required: 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: { + ...ProxyResource.type.modelProperties, + privateEndpoint: { + serializedName: "properties.privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpointProperty" + } + }, + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionStateProperty" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const HybridComputePrivateLinkScope: msRest.CompositeMapper = { + serializedName: "HybridComputePrivateLinkScope", + type: { + name: "Composite", + className: "HybridComputePrivateLinkScope", + modelProperties: { + ...PrivateLinkScopesResource.type.modelProperties, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + defaultValue: 'Disabled', + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + privateEndpointConnections: { + readOnly: true, + serializedName: "properties.privateEndpointConnections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + } + } + } +}; + +export const PrivateLinkResource: msRest.CompositeMapper = { + serializedName: "PrivateLinkResource", + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + ...ProxyResource.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: { + readOnly: true, + serializedName: "properties.requiredZoneNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ScopedResource: msRest.CompositeMapper = { + serializedName: "ScopedResource", + type: { + name: "Composite", + className: "ScopedResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + linkedResourceId: { + serializedName: "properties.linkedResourceId", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const ErrorAdditionalInfo: msRest.CompositeMapper = { + serializedName: "ErrorAdditionalInfo", + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + info: { + readOnly: true, + serializedName: "info", + type: { + name: "Object" + } + } + } + } +}; + +export const ErrorResponseV2: msRest.CompositeMapper = { + serializedName: "ErrorResponseV2", + type: { + name: "Composite", + className: "ErrorResponseV2", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorResponseV2Error" + } + } + } + } +}; + +export const ErrorResponseCommon: msRest.CompositeMapper = { + serializedName: "ErrorResponseCommon", + type: { + name: "Composite", + className: "ErrorResponseCommon", + modelProperties: { + ...ErrorResponseV2.type.modelProperties, + details: { + readOnly: true, + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorResponseCommon" + } + } + } + }, + additionalInfo: { + readOnly: true, + serializedName: "additionalInfo", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } + } + } + } +}; + +export const ErrorResponseV2Error: msRest.CompositeMapper = { + serializedName: "ErrorResponseV2_error", + type: { + name: "Composite", + className: "ErrorResponseV2Error", + modelProperties: { + code: { + readOnly: true, + serializedName: "code", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + target: { + readOnly: true, + serializedName: "target", + type: { + name: "String" + } + }, + details: { + readOnly: true, + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorResponseV2" + } + } + } + }, + additionalInfo: { + readOnly: true, + serializedName: "additionalInfo", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } + } + } + } +}; + export const MachineListResult: msRest.CompositeMapper = { serializedName: "MachineListResult", type: { @@ -1149,3 +1561,122 @@ export const OperationListResult: msRest.CompositeMapper = { } } }; + +export const HybridComputePrivateLinkScopeListResult: msRest.CompositeMapper = { + serializedName: "HybridComputePrivateLinkScopeListResult", + type: { + name: "Composite", + className: "HybridComputePrivateLinkScopeListResult", + modelProperties: { + value: { + required: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HybridComputePrivateLinkScope" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkResourceListResult: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourceListResult", + type: { + name: "Composite", + className: "PrivateLinkResourceListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnectionListResult: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnectionListResult", + type: { + name: "Composite", + className: "PrivateEndpointConnectionListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ScopedResourceListResult: msRest.CompositeMapper = { + serializedName: "ScopedResourceListResult", + type: { + name: "Composite", + className: "ScopedResourceListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScopedResource" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/models/parameters.ts b/sdk/hybridcompute/arm-hybridcompute/src/models/parameters.ts index 8d12a0909808..08eb8245fb26 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/models/parameters.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/models/parameters.ts @@ -25,6 +25,9 @@ export const apiVersion: msRest.OperationQueryParameter = { mapper: { required: true, serializedName: "api-version", + constraints: { + MinLength: 1 + }, type: { name: "String" } @@ -52,6 +55,16 @@ export const extensionName: msRest.OperationURLParameter = { } } }; +export const groupName: msRest.OperationURLParameter = { + parameterPath: "groupName", + mapper: { + required: true, + serializedName: "groupName", + type: { + name: "String" + } + } +}; export const name: msRest.OperationURLParameter = { parameterPath: "name", mapper: { @@ -73,6 +86,16 @@ export const nextPageLink: msRest.OperationURLParameter = { }, skipEncoding: true }; +export const privateEndpointConnectionName: msRest.OperationURLParameter = { + parameterPath: "privateEndpointConnectionName", + mapper: { + required: true, + serializedName: "privateEndpointConnectionName", + type: { + name: "String" + } + } +}; export const resourceGroupName: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { @@ -83,11 +106,24 @@ export const resourceGroupName: msRest.OperationURLParameter = { } } }; +export const scopeName: msRest.OperationURLParameter = { + parameterPath: "scopeName", + mapper: { + required: true, + serializedName: "scopeName", + type: { + name: "String" + } + } +}; export const subscriptionId: msRest.OperationURLParameter = { parameterPath: "subscriptionId", mapper: { required: true, serializedName: "subscriptionId", + constraints: { + MinLength: 1 + }, type: { name: "String" } diff --git a/sdk/hybridcompute/arm-hybridcompute/src/models/privateEndpointConnectionsMappers.ts b/sdk/hybridcompute/arm-hybridcompute/src/models/privateEndpointConnectionsMappers.ts new file mode 100644 index 000000000000..6b5bd2e11f5d --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/models/privateEndpointConnectionsMappers.ts @@ -0,0 +1,38 @@ +/* + * 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 { + AzureEntityResource, + BaseResource, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponseCommon, + ErrorResponseV2, + ErrorResponseV2Error, + HybridComputePrivateLinkScope, + Identity, + LocationData, + Machine, + MachineExtension, + MachineExtensionInstanceView, + MachineExtensionInstanceViewStatus, + MachineExtensionPropertiesInstanceView, + MachineIdentity, + MachinePropertiesOsProfile, + OSProfile, + PrivateEndpointConnection, + PrivateEndpointConnectionListResult, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkScopesResource, + PrivateLinkServiceConnectionStateProperty, + ProxyResource, + Resource, + ScopedResource, + TrackedResource +} from "../models/mappers"; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/models/privateLinkResourcesMappers.ts b/sdk/hybridcompute/arm-hybridcompute/src/models/privateLinkResourcesMappers.ts new file mode 100644 index 000000000000..30dfa2f7d30f --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/models/privateLinkResourcesMappers.ts @@ -0,0 +1,38 @@ +/* + * 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 { + AzureEntityResource, + BaseResource, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponseCommon, + ErrorResponseV2, + ErrorResponseV2Error, + HybridComputePrivateLinkScope, + Identity, + LocationData, + Machine, + MachineExtension, + MachineExtensionInstanceView, + MachineExtensionInstanceViewStatus, + MachineExtensionPropertiesInstanceView, + MachineIdentity, + MachinePropertiesOsProfile, + OSProfile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkResourceListResult, + PrivateLinkScopesResource, + PrivateLinkServiceConnectionStateProperty, + ProxyResource, + Resource, + ScopedResource, + TrackedResource +} from "../models/mappers"; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/models/privateLinkScopedResourcesMappers.ts b/sdk/hybridcompute/arm-hybridcompute/src/models/privateLinkScopedResourcesMappers.ts new file mode 100644 index 000000000000..c25486ff03b5 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/models/privateLinkScopedResourcesMappers.ts @@ -0,0 +1,38 @@ +/* + * 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 { + AzureEntityResource, + BaseResource, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponseCommon, + ErrorResponseV2, + ErrorResponseV2Error, + HybridComputePrivateLinkScope, + Identity, + LocationData, + Machine, + MachineExtension, + MachineExtensionInstanceView, + MachineExtensionInstanceViewStatus, + MachineExtensionPropertiesInstanceView, + MachineIdentity, + MachinePropertiesOsProfile, + OSProfile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkScopesResource, + PrivateLinkServiceConnectionStateProperty, + ProxyResource, + Resource, + ScopedResource, + ScopedResourceListResult, + TrackedResource +} from "../models/mappers"; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/models/privateLinkScopesMappers.ts b/sdk/hybridcompute/arm-hybridcompute/src/models/privateLinkScopesMappers.ts new file mode 100644 index 000000000000..15841ab75f3d --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/models/privateLinkScopesMappers.ts @@ -0,0 +1,39 @@ +/* + * 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 { + AzureEntityResource, + BaseResource, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponseCommon, + ErrorResponseV2, + ErrorResponseV2Error, + HybridComputePrivateLinkScope, + HybridComputePrivateLinkScopeListResult, + Identity, + LocationData, + Machine, + MachineExtension, + MachineExtensionInstanceView, + MachineExtensionInstanceViewStatus, + MachineExtensionPropertiesInstanceView, + MachineIdentity, + MachinePropertiesOsProfile, + OSProfile, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkResource, + PrivateLinkScopesResource, + PrivateLinkServiceConnectionStateProperty, + ProxyResource, + Resource, + ScopedResource, + TagsResource, + TrackedResource +} from "../models/mappers"; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/index.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/index.ts index 35660def86a6..f851a9134243 100644 --- a/sdk/hybridcompute/arm-hybridcompute/src/operations/index.ts +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/index.ts @@ -11,3 +11,7 @@ export * from "./machines"; export * from "./machineExtensions"; export * from "./operations"; +export * from "./privateLinkScopes"; +export * from "./privateLinkResources"; +export * from "./privateEndpointConnections"; +export * from "./privateLinkScopedResources"; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateEndpointConnections.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateEndpointConnections.ts new file mode 100644 index 000000000000..395f8d50c59c --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateEndpointConnections.ts @@ -0,0 +1,328 @@ +/* + * 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 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 { HybridComputeManagementClientContext } from "../hybridComputeManagementClientContext"; + +/** Class representing a PrivateEndpointConnections. */ +export class PrivateEndpointConnections { + private readonly client: HybridComputeManagementClientContext; + + /** + * Create a PrivateEndpointConnections. + * @param {HybridComputeManagementClientContext} client Reference to the service client. + */ + constructor(client: HybridComputeManagementClientContext) { + this.client = client; + } + + /** + * Gets a private endpoint connection. + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, scopeName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param callback The callback + */ + get(resourceGroupName: string, scopeName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, scopeName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, scopeName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + scopeName, + privateEndpointConnectionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Approve or reject a private endpoint connection with a given name. + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, scopeName: string, privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,scopeName,privateEndpointConnectionName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a private endpoint connection with a given name. + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, scopeName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,scopeName,privateEndpointConnectionName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Gets all private endpoint connections on a private link scope. + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param [options] The optional parameters + * @returns Promise + */ + listByPrivateLinkScope(resourceGroupName: string, scopeName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param callback The callback + */ + listByPrivateLinkScope(resourceGroupName: string, scopeName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param options The optional parameters + * @param callback The callback + */ + listByPrivateLinkScope(resourceGroupName: string, scopeName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByPrivateLinkScope(resourceGroupName: string, scopeName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + scopeName, + options + }, + listByPrivateLinkScopeOperationSpec, + callback) as Promise; + } + + /** + * Approve or reject a private endpoint connection with a given name. + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, scopeName: string, privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + scopeName, + privateEndpointConnectionName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes a private endpoint connection with a given name. + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, scopeName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + scopeName, + privateEndpointConnectionName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Gets all private endpoint connections on a private link scope. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByPrivateLinkScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByPrivateLinkScopeNext(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 + */ + listByPrivateLinkScopeNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByPrivateLinkScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByPrivateLinkScopeNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.scopeName, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorResponseV2 + } + }, + serializer +}; + +const listByPrivateLinkScopeOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.scopeName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponseV2 + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.scopeName, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.PrivateEndpointConnection, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 202: {}, + default: { + bodyMapper: Mappers.ErrorResponseV2 + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.scopeName, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponseV2 + } + }, + serializer +}; + +const listByPrivateLinkScopeNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponseV2 + } + }, + serializer +}; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkResources.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkResources.ts new file mode 100644 index 000000000000..0bbbc41c3976 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkResources.ts @@ -0,0 +1,198 @@ +/* + * 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/privateLinkResourcesMappers"; +import * as Parameters from "../models/parameters"; +import { HybridComputeManagementClientContext } from "../hybridComputeManagementClientContext"; + +/** Class representing a PrivateLinkResources. */ +export class PrivateLinkResources { + private readonly client: HybridComputeManagementClientContext; + + /** + * Create a PrivateLinkResources. + * @param {HybridComputeManagementClientContext} client Reference to the service client. + */ + constructor(client: HybridComputeManagementClientContext) { + this.client = client; + } + + /** + * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param [options] The optional parameters + * @returns Promise + */ + listByPrivateLinkScope(resourceGroupName: string, scopeName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param callback The callback + */ + listByPrivateLinkScope(resourceGroupName: string, scopeName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param options The optional parameters + * @param callback The callback + */ + listByPrivateLinkScope(resourceGroupName: string, scopeName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByPrivateLinkScope(resourceGroupName: string, scopeName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + scopeName, + options + }, + listByPrivateLinkScopeOperationSpec, + callback) as Promise; + } + + /** + * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param groupName The name of the private link resource. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, scopeName: string, groupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param groupName The name of the private link resource. + * @param callback The callback + */ + get(resourceGroupName: string, scopeName: string, groupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param groupName The name of the private link resource. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, scopeName: string, groupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, scopeName: string, groupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + scopeName, + groupName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByPrivateLinkScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByPrivateLinkScopeNext(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 + */ + listByPrivateLinkScopeNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByPrivateLinkScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByPrivateLinkScopeNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByPrivateLinkScopeOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateLinkResources", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.scopeName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponseV2 + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateLinkResources/{groupName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.scopeName, + Parameters.groupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResource + }, + default: { + bodyMapper: Mappers.ErrorResponseV2 + } + }, + serializer +}; + +const listByPrivateLinkScopeNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponseV2 + } + }, + serializer +}; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopedResources.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopedResources.ts new file mode 100644 index 000000000000..7dc35eb235f8 --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopedResources.ts @@ -0,0 +1,331 @@ +/* + * 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 msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateLinkScopedResourcesMappers"; +import * as Parameters from "../models/parameters"; +import { HybridComputeManagementClientContext } from "../hybridComputeManagementClientContext"; + +/** Class representing a PrivateLinkScopedResources. */ +export class PrivateLinkScopedResources { + private readonly client: HybridComputeManagementClientContext; + + /** + * Create a PrivateLinkScopedResources. + * @param {HybridComputeManagementClientContext} client Reference to the service client. + */ + constructor(client: HybridComputeManagementClientContext) { + this.client = client; + } + + /** + * Gets a scoped resource in a private link scope. + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param name The name of the scoped resource object. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, scopeName: string, name: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param name The name of the scoped resource object. + * @param callback The callback + */ + get(resourceGroupName: string, scopeName: string, name: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param name The name of the scoped resource object. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, scopeName: string, name: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, scopeName: string, name: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + scopeName, + name, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Approve or reject a private endpoint connection with a given name. + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param name The name of the scoped resource object. + * @param parameters + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, scopeName: string, name: string, parameters: Models.ScopedResource, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,scopeName,name,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a private endpoint connection with a given name. + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param name The name of the scoped resource object. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, scopeName: string, name: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,scopeName,name,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Gets all private endpoint connections on a private link scope. + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param [options] The optional parameters + * @returns Promise + */ + listByPrivateLinkScope(resourceGroupName: string, scopeName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param callback The callback + */ + listByPrivateLinkScope(resourceGroupName: string, scopeName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param options The optional parameters + * @param callback The callback + */ + listByPrivateLinkScope(resourceGroupName: string, scopeName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByPrivateLinkScope(resourceGroupName: string, scopeName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + scopeName, + options + }, + listByPrivateLinkScopeOperationSpec, + callback) as Promise; + } + + /** + * Approve or reject a private endpoint connection with a given name. + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param name The name of the scoped resource object. + * @param parameters + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, scopeName: string, name: string, parameters: Models.ScopedResource, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + scopeName, + name, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes a private endpoint connection with a given name. + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param name The name of the scoped resource object. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, scopeName: string, name: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + scopeName, + name, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Gets all private endpoint connections on a private link scope. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByPrivateLinkScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByPrivateLinkScopeNext(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 + */ + listByPrivateLinkScopeNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByPrivateLinkScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByPrivateLinkScopeNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/scopedResources/{name}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.scopeName, + Parameters.name + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ScopedResource + }, + default: { + bodyMapper: Mappers.ErrorResponseV2 + } + }, + serializer +}; + +const listByPrivateLinkScopeOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/scopedResources", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.scopeName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ScopedResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponseV2 + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/scopedResources/{name}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.scopeName, + Parameters.name + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ScopedResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ScopedResource + }, + 201: { + bodyMapper: Mappers.ScopedResource + }, + 202: {}, + default: { + bodyMapper: Mappers.ErrorResponseV2 + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/scopedResources/{name}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.scopeName, + Parameters.name + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponseV2 + } + }, + serializer +}; + +const listByPrivateLinkScopeNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ScopedResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponseV2 + } + }, + serializer +}; diff --git a/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopes.ts b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopes.ts new file mode 100644 index 000000000000..82d4679c570b --- /dev/null +++ b/sdk/hybridcompute/arm-hybridcompute/src/operations/privateLinkScopes.ts @@ -0,0 +1,484 @@ +/* + * 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 msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateLinkScopesMappers"; +import * as Parameters from "../models/parameters"; +import { HybridComputeManagementClientContext } from "../hybridComputeManagementClientContext"; + +/** Class representing a PrivateLinkScopes. */ +export class PrivateLinkScopes { + private readonly client: HybridComputeManagementClientContext; + + /** + * Create a PrivateLinkScopes. + * @param {HybridComputeManagementClientContext} client Reference to the service client. + */ + constructor(client: HybridComputeManagementClientContext) { + this.client = client; + } + + /** + * Gets a list of all Azure Arc PrivateLinkScopes within a subscription. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets a list of Azure Arc PrivateLinkScopes within a resource group. + * @param resourceGroupName The name of the resource group. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * Deletes a Azure Arc PrivateLinkScope. + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, scopeName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,scopeName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Returns a Azure Arc PrivateLinkScope. + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, scopeName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param callback The callback + */ + get(resourceGroupName: string, scopeName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, scopeName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, scopeName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + scopeName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value + * for InstrumentationKey nor AppId in the Put operation. + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param parameters Properties that need to be specified to create or update a Azure Arc for + * Servers and Clusters PrivateLinkScope. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, scopeName: string, parameters: Models.HybridComputePrivateLinkScope, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param parameters Properties that need to be specified to create or update a Azure Arc for + * Servers and Clusters PrivateLinkScope. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, scopeName: string, parameters: Models.HybridComputePrivateLinkScope, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param parameters Properties that need to be specified to create or update a Azure Arc for + * Servers and Clusters PrivateLinkScope. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, scopeName: string, parameters: Models.HybridComputePrivateLinkScope, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, scopeName: string, parameters: Models.HybridComputePrivateLinkScope, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + scopeName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate + * method. + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param privateLinkScopeTags Updated tag information to set into the PrivateLinkScope instance. + * @param [options] The optional parameters + * @returns Promise + */ + updateTags(resourceGroupName: string, scopeName: string, privateLinkScopeTags: Models.TagsResource, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param privateLinkScopeTags Updated tag information to set into the PrivateLinkScope instance. + * @param callback The callback + */ + updateTags(resourceGroupName: string, scopeName: string, privateLinkScopeTags: Models.TagsResource, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param privateLinkScopeTags Updated tag information to set into the PrivateLinkScope instance. + * @param options The optional parameters + * @param callback The callback + */ + updateTags(resourceGroupName: string, scopeName: string, privateLinkScopeTags: Models.TagsResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + updateTags(resourceGroupName: string, scopeName: string, privateLinkScopeTags: Models.TagsResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + scopeName, + privateLinkScopeTags, + options + }, + updateTagsOperationSpec, + callback) as Promise; + } + + /** + * Deletes a Azure Arc PrivateLinkScope. + * @param resourceGroupName The name of the resource group. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, scopeName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + scopeName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Gets a list of all Azure Arc PrivateLinkScopes within a subscription. + * @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; + } + + /** + * Gets a list of Azure Arc PrivateLinkScopes within a 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?: msRest.RequestOptionsBase): 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: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/privateLinkScopes", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.HybridComputePrivateLinkScopeListResult + }, + default: { + bodyMapper: Mappers.ErrorResponseV2 + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.HybridComputePrivateLinkScopeListResult + }, + default: { + bodyMapper: Mappers.ErrorResponseV2 + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.scopeName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.HybridComputePrivateLinkScope + }, + default: { + bodyMapper: Mappers.ErrorResponseV2 + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.scopeName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.HybridComputePrivateLinkScope, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.HybridComputePrivateLinkScope + }, + 201: { + bodyMapper: Mappers.HybridComputePrivateLinkScope + }, + default: { + bodyMapper: Mappers.ErrorResponseV2 + } + }, + serializer +}; + +const updateTagsOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.scopeName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "privateLinkScopeTags", + mapper: { + ...Mappers.TagsResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.HybridComputePrivateLinkScope + }, + default: { + bodyMapper: Mappers.ErrorResponseV2 + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.scopeName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponseV2 + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.HybridComputePrivateLinkScopeListResult + }, + default: { + bodyMapper: Mappers.ErrorResponseV2 + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.HybridComputePrivateLinkScopeListResult + }, + default: { + bodyMapper: Mappers.ErrorResponseV2 + } + }, + serializer +};