diff --git a/sdk/containerservice/arm-containerservice/package.json b/sdk/containerservice/arm-containerservice/package.json index 5a1bb3815838..3113a735da68 100644 --- a/sdk/containerservice/arm-containerservice/package.json +++ b/sdk/containerservice/arm-containerservice/package.json @@ -27,7 +27,7 @@ "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/containerservice/arm-containerservice", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/containerservice/arm-containerservice", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" diff --git a/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts b/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts index 244f833d630c..9586865614a2 100644 --- a/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts +++ b/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts @@ -24,6 +24,7 @@ class ContainerServiceClient extends ContainerServiceClientContext { privateEndpointConnections: operations.PrivateEndpointConnections; privateLinkResources: operations.PrivateLinkResources; resolvePrivateLinkServiceId: operations.ResolvePrivateLinkServiceId; + snapshots: operations.Snapshots; /** * Initializes a new instance of the ContainerServiceClient class. @@ -46,6 +47,7 @@ class ContainerServiceClient extends ContainerServiceClientContext { this.privateEndpointConnections = new operations.PrivateEndpointConnections(this); this.privateLinkResources = new operations.PrivateLinkResources(this); this.resolvePrivateLinkServiceId = new operations.ResolvePrivateLinkServiceId(this); + this.snapshots = new operations.Snapshots(this); } } diff --git a/sdk/containerservice/arm-containerservice/src/containerServiceClientContext.ts b/sdk/containerservice/arm-containerservice/src/containerServiceClientContext.ts index 68a9a2d4db1b..26044975bafb 100644 --- a/sdk/containerservice/arm-containerservice/src/containerServiceClientContext.ts +++ b/sdk/containerservice/arm-containerservice/src/containerServiceClientContext.ts @@ -50,7 +50,7 @@ export class ContainerServiceClientContext extends msRestAzure.AzureServiceClien super(credentials, options); - this.apiVersion = '2021-07-01'; + this.apiVersion = '2021-08-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/containerservice/arm-containerservice/src/models/agentPoolsMappers.ts b/sdk/containerservice/arm-containerservice/src/models/agentPoolsMappers.ts index be72cdfe11b1..cd01ca1592f4 100644 --- a/sdk/containerservice/arm-containerservice/src/models/agentPoolsMappers.ts +++ b/sdk/containerservice/arm-containerservice/src/models/agentPoolsMappers.ts @@ -20,6 +20,7 @@ export { ContainerServiceNetworkProfile, ContainerServiceSshConfiguration, ContainerServiceSshPublicKey, + CreationData, ExtendedLocation, KubeletConfig, LinuxOSConfig, @@ -61,6 +62,7 @@ export { PrivateLinkServiceConnectionState, Resource, ResourceReference, + Snapshot, SubResource, SysctlConfig, SystemData, diff --git a/sdk/containerservice/arm-containerservice/src/models/index.ts b/sdk/containerservice/arm-containerservice/src/models/index.ts index 0ea7bb6239ff..77a9ffd671c6 100644 --- a/sdk/containerservice/arm-containerservice/src/models/index.ts +++ b/sdk/containerservice/arm-containerservice/src/models/index.ts @@ -439,6 +439,16 @@ export interface LinuxOSConfig { swapFileSizeMB?: number; } +/** + * Data used when creating a target resource from a source resource. + */ +export interface CreationData { + /** + * This is the ARM ID of the source object to be used to create the target object. + */ + sourceResourceId?: string; +} + /** * Properties for the container service agent pool profile. */ @@ -464,6 +474,10 @@ export interface ManagedClusterAgentPoolProfileProperties { * Possible values include: 'OS', 'Temporary' */ kubeletDiskType?: KubeletDiskType; + /** + * Possible values include: 'OCIContainer', 'WasmWasi' + */ + workloadRuntime?: WorkloadRuntime; /** * The ID of the subnet which agent pool nodes and optionally pods will join on startup. If this * is not specified, a VNET and subnet will be generated and used. If no podSubnetID is @@ -628,6 +642,11 @@ export interface ManagedClusterAgentPoolProfileProperties { * Possible values include: 'MIG1g', 'MIG2g', 'MIG3g', 'MIG4g', 'MIG7g' */ gpuInstanceProfile?: GPUInstanceProfile; + /** + * CreationData to be used to specify the source Snapshot ID if the node pool will be + * created/upgraded using a snapshot. + */ + creationData?: CreationData; } /** @@ -666,6 +685,10 @@ export interface AgentPool extends SubResource { * Possible values include: 'OS', 'Temporary' */ kubeletDiskType?: KubeletDiskType; + /** + * Possible values include: 'OCIContainer', 'WasmWasi' + */ + workloadRuntime?: WorkloadRuntime; /** * The ID of the subnet which agent pool nodes and optionally pods will join on startup. If this * is not specified, a VNET and subnet will be generated and used. If no podSubnetID is @@ -830,6 +853,11 @@ export interface AgentPool extends SubResource { * Possible values include: 'MIG1g', 'MIG2g', 'MIG3g', 'MIG4g', 'MIG7g' */ gpuInstanceProfile?: GPUInstanceProfile; + /** + * CreationData to be used to specify the source Snapshot ID if the node pool will be + * created/upgraded using a snapshot. + */ + creationData?: CreationData; } /** @@ -976,6 +1004,10 @@ export interface ManagedClusterLoadBalancerProfile { * (inclusive). The default value is 30 minutes. Default value: 30. */ idleTimeoutInMinutes?: number; + /** + * Enable multiple standard load balancers per AKS cluster or not. + */ + enableMultipleStandardLoadBalancers?: boolean; } /** @@ -1667,6 +1699,10 @@ export interface ManagedClusterAPIServerAccessProfile { * Whether to create additional public FQDN for private cluster or not. */ enablePrivateClusterPublicFQDN?: boolean; + /** + * Whether to disable run command for the cluster or not. + */ + disableRunCommand?: boolean; } /** @@ -1905,6 +1941,12 @@ export interface ManagedCluster extends Resource { * Security profile for the managed cluster. */ securityProfile?: ManagedClusterSecurityProfile; + /** + * Whether the cluster can be accessed through public network or not. Default value is 'Enabled' + * (case insensitive). Could be set to 'Disabled' to enable private cluster. Possible values + * include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccess; } /** @@ -2274,6 +2316,25 @@ export interface OutboundEnvironmentEndpoint { endpoints?: EndpointDependency[]; } +/** + * A node pool snapshot resource. + */ +export interface Snapshot extends Resource { + /** + * The system metadata relating to this snapshot. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; + /** + * CreationData to be used to specify the source agent pool resource ID to create this snapshot. + */ + creationData?: CreationData; + /** + * Possible values include: 'NodePool'. Default value: 'NodePool'. + */ + snapshotType?: SnapshotType; +} + /** * Optional Parameters. */ @@ -2381,6 +2442,19 @@ export interface AgentPoolListResult extends Array { readonly nextLink?: string; } +/** + * @interface + * The response from the List Snapshots operation. + * @extends Array + */ +export interface SnapshotListResult extends Array { + /** + * The URL to get the next set of snapshot results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + /** * Defines values for ContainerServiceStorageProfileTypes. * Possible values include: 'StorageAccount', 'ManagedDisks' @@ -2450,6 +2524,14 @@ export type OSDiskType = 'Managed' | 'Ephemeral'; */ export type KubeletDiskType = 'OS' | 'Temporary'; +/** + * Defines values for WorkloadRuntime. + * Possible values include: 'OCIContainer', 'WasmWasi' + * @readonly + * @enum {string} + */ +export type WorkloadRuntime = 'OCIContainer' | 'WasmWasi'; + /** * Defines values for OSType. * Possible values include: 'Linux', 'Windows' @@ -2644,6 +2726,14 @@ export type UpgradeChannel = 'rapid' | 'stable' | 'patch' | 'node-image' | 'none */ export type Expander = 'least-waste' | 'most-pods' | 'priority' | 'random'; +/** + * Defines values for PublicNetworkAccess. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type PublicNetworkAccess = 'Enabled' | 'Disabled'; + /** * Defines values for PrivateEndpointConnectionProvisioningState. * Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Failed' @@ -2660,6 +2750,14 @@ export type PrivateEndpointConnectionProvisioningState = 'Succeeded' | 'Creating */ export type ConnectionStatus = 'Pending' | 'Approved' | 'Rejected' | 'Disconnected'; +/** + * Defines values for SnapshotType. + * Possible values include: 'NodePool' + * @readonly + * @enum {string} + */ +export type SnapshotType = 'NodePool'; + /** * Contains response data for the list operation. */ @@ -3439,3 +3537,143 @@ export type ResolvePrivateLinkServiceIdPOSTResponse = PrivateLinkResource & { parsedBody: PrivateLinkResource; }; }; + +/** + * Contains response data for the list operation. + */ +export type SnapshotsListResponse = SnapshotListResult & { + /** + * 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: SnapshotListResult; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type SnapshotsListByResourceGroupResponse = SnapshotListResult & { + /** + * 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: SnapshotListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type SnapshotsGetResponse = Snapshot & { + /** + * 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: Snapshot; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type SnapshotsCreateOrUpdateResponse = Snapshot & { + /** + * 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: Snapshot; + }; +}; + +/** + * Contains response data for the updateTags operation. + */ +export type SnapshotsUpdateTagsResponse = Snapshot & { + /** + * 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: Snapshot; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type SnapshotsListNextResponse = SnapshotListResult & { + /** + * 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: SnapshotListResult; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type SnapshotsListByResourceGroupNextResponse = SnapshotListResult & { + /** + * 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: SnapshotListResult; + }; +}; diff --git a/sdk/containerservice/arm-containerservice/src/models/maintenanceConfigurationsMappers.ts b/sdk/containerservice/arm-containerservice/src/models/maintenanceConfigurationsMappers.ts index be587f1d1f00..a6d534655e7f 100644 --- a/sdk/containerservice/arm-containerservice/src/models/maintenanceConfigurationsMappers.ts +++ b/sdk/containerservice/arm-containerservice/src/models/maintenanceConfigurationsMappers.ts @@ -15,6 +15,7 @@ export { ContainerServiceNetworkProfile, ContainerServiceSshConfiguration, ContainerServiceSshPublicKey, + CreationData, ExtendedLocation, KubeletConfig, LinuxOSConfig, @@ -57,6 +58,7 @@ export { PrivateLinkServiceConnectionState, Resource, ResourceReference, + Snapshot, SubResource, SysctlConfig, SystemData, diff --git a/sdk/containerservice/arm-containerservice/src/models/managedClustersMappers.ts b/sdk/containerservice/arm-containerservice/src/models/managedClustersMappers.ts index 9e179f1f3e4e..73a4058decb3 100644 --- a/sdk/containerservice/arm-containerservice/src/models/managedClustersMappers.ts +++ b/sdk/containerservice/arm-containerservice/src/models/managedClustersMappers.ts @@ -15,6 +15,7 @@ export { ContainerServiceNetworkProfile, ContainerServiceSshConfiguration, ContainerServiceSshPublicKey, + CreationData, CredentialResult, CredentialResults, EndpointDependency, @@ -70,6 +71,7 @@ export { ResourceReference, RunCommandRequest, RunCommandResult, + Snapshot, SubResource, SysctlConfig, SystemData, diff --git a/sdk/containerservice/arm-containerservice/src/models/mappers.ts b/sdk/containerservice/arm-containerservice/src/models/mappers.ts index eaf1e61dfd76..fca01d028fd9 100644 --- a/sdk/containerservice/arm-containerservice/src/models/mappers.ts +++ b/sdk/containerservice/arm-containerservice/src/models/mappers.ts @@ -580,6 +580,22 @@ export const LinuxOSConfig: msRest.CompositeMapper = { } }; +export const CreationData: msRest.CompositeMapper = { + serializedName: "CreationData", + type: { + name: "Composite", + className: "CreationData", + modelProperties: { + sourceResourceId: { + serializedName: "sourceResourceId", + type: { + name: "String" + } + } + } + } +}; + export const ManagedClusterAgentPoolProfileProperties: msRest.CompositeMapper = { serializedName: "ManagedClusterAgentPoolProfileProperties", type: { @@ -616,6 +632,12 @@ export const ManagedClusterAgentPoolProfileProperties: msRest.CompositeMapper = name: "String" } }, + workloadRuntime: { + serializedName: "workloadRuntime", + type: { + name: "String" + } + }, vnetSubnetID: { serializedName: "vnetSubnetID", type: { @@ -837,6 +859,13 @@ export const ManagedClusterAgentPoolProfileProperties: msRest.CompositeMapper = type: { name: "String" } + }, + creationData: { + serializedName: "creationData", + type: { + name: "Composite", + className: "CreationData" + } } } } @@ -900,6 +929,12 @@ export const AgentPool: msRest.CompositeMapper = { name: "String" } }, + workloadRuntime: { + serializedName: "properties.workloadRuntime", + type: { + name: "String" + } + }, vnetSubnetID: { serializedName: "properties.vnetSubnetID", type: { @@ -1121,6 +1156,13 @@ export const AgentPool: msRest.CompositeMapper = { type: { name: "String" } + }, + creationData: { + serializedName: "properties.creationData", + type: { + name: "Composite", + className: "CreationData" + } } } } @@ -1370,6 +1412,12 @@ export const ManagedClusterLoadBalancerProfile: msRest.CompositeMapper = { type: { name: "Number" } + }, + enableMultipleStandardLoadBalancers: { + serializedName: "enableMultipleStandardLoadBalancers", + type: { + name: "Boolean" + } } } } @@ -2418,6 +2466,12 @@ export const ManagedClusterAPIServerAccessProfile: msRest.CompositeMapper = { type: { name: "Boolean" } + }, + disableRunCommand: { + serializedName: "disableRunCommand", + type: { + name: "Boolean" + } } } } @@ -2796,6 +2850,12 @@ export const ManagedCluster: msRest.CompositeMapper = { name: "Composite", className: "ManagedClusterSecurityProfile" } + }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + type: { + name: "String" + } } } } @@ -3432,6 +3492,39 @@ export const OutboundEnvironmentEndpoint: msRest.CompositeMapper = { } }; +export const Snapshot: msRest.CompositeMapper = { + serializedName: "Snapshot", + type: { + name: "Composite", + className: "Snapshot", + modelProperties: { + ...Resource.type.modelProperties, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + creationData: { + serializedName: "properties.creationData", + type: { + name: "Composite", + className: "CreationData" + } + }, + snapshotType: { + serializedName: "properties.snapshotType", + defaultValue: 'NodePool', + type: { + name: "String" + } + } + } + } +}; + export const OperationListResult: msRest.CompositeMapper = { serializedName: "OperationListResult", type: { @@ -3571,3 +3664,32 @@ export const AgentPoolListResult: msRest.CompositeMapper = { } } }; + +export const SnapshotListResult: msRest.CompositeMapper = { + serializedName: "SnapshotListResult", + type: { + name: "Composite", + className: "SnapshotListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Snapshot" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/containerservice/arm-containerservice/src/models/privateEndpointConnectionsMappers.ts b/sdk/containerservice/arm-containerservice/src/models/privateEndpointConnectionsMappers.ts index e0dd80d1ac3e..50a397bcff8d 100644 --- a/sdk/containerservice/arm-containerservice/src/models/privateEndpointConnectionsMappers.ts +++ b/sdk/containerservice/arm-containerservice/src/models/privateEndpointConnectionsMappers.ts @@ -15,6 +15,7 @@ export { ContainerServiceNetworkProfile, ContainerServiceSshConfiguration, ContainerServiceSshPublicKey, + CreationData, ExtendedLocation, KubeletConfig, LinuxOSConfig, @@ -57,6 +58,7 @@ export { PrivateLinkServiceConnectionState, Resource, ResourceReference, + Snapshot, SubResource, SysctlConfig, SystemData, diff --git a/sdk/containerservice/arm-containerservice/src/models/snapshotsMappers.ts b/sdk/containerservice/arm-containerservice/src/models/snapshotsMappers.ts new file mode 100644 index 000000000000..f22d766be685 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/models/snapshotsMappers.ts @@ -0,0 +1,69 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AgentPool, + AgentPoolUpgradeSettings, + BaseResource, + CloudError, + ContainerServiceLinuxProfile, + ContainerServiceNetworkProfile, + ContainerServiceSshConfiguration, + ContainerServiceSshPublicKey, + CreationData, + ExtendedLocation, + KubeletConfig, + LinuxOSConfig, + MaintenanceConfiguration, + ManagedCluster, + ManagedClusterAADProfile, + ManagedClusterAccessProfile, + ManagedClusterAddonProfile, + ManagedClusterAddonProfileIdentity, + ManagedClusterAgentPoolProfile, + ManagedClusterAgentPoolProfileProperties, + ManagedClusterAPIServerAccessProfile, + ManagedClusterAutoUpgradeProfile, + ManagedClusterHTTPProxyConfig, + ManagedClusterIdentity, + ManagedClusterIdentityUserAssignedIdentitiesValue, + ManagedClusterLoadBalancerProfile, + ManagedClusterLoadBalancerProfileManagedOutboundIPs, + ManagedClusterLoadBalancerProfileOutboundIPPrefixes, + ManagedClusterLoadBalancerProfileOutboundIPs, + ManagedClusterManagedOutboundIPProfile, + ManagedClusterNATGatewayProfile, + ManagedClusterPodIdentity, + ManagedClusterPodIdentityException, + ManagedClusterPodIdentityProfile, + ManagedClusterPodIdentityProvisioningError, + ManagedClusterPodIdentityProvisioningErrorBody, + ManagedClusterPodIdentityProvisioningInfo, + ManagedClusterPropertiesAutoScalerProfile, + ManagedClusterSecurityProfile, + ManagedClusterSecurityProfileAzureDefender, + ManagedClusterServicePrincipalProfile, + ManagedClusterSKU, + ManagedClusterWindowsProfile, + PowerState, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + Resource, + ResourceReference, + Snapshot, + SnapshotListResult, + SubResource, + SysctlConfig, + SystemData, + TagsObject, + TimeInWeek, + TimeSpan, + UserAssignedIdentity +} from "../models/mappers"; diff --git a/sdk/containerservice/arm-containerservice/src/operations/index.ts b/sdk/containerservice/arm-containerservice/src/operations/index.ts index 64b742f284a9..479733eea8e5 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/index.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/index.ts @@ -14,3 +14,4 @@ export * from "./agentPools"; export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; export * from "./resolvePrivateLinkServiceId"; +export * from "./snapshots"; diff --git a/sdk/containerservice/arm-containerservice/src/operations/snapshots.ts b/sdk/containerservice/arm-containerservice/src/operations/snapshots.ts new file mode 100644 index 000000000000..f5e863b1286b --- /dev/null +++ b/sdk/containerservice/arm-containerservice/src/operations/snapshots.ts @@ -0,0 +1,484 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/snapshotsMappers"; +import * as Parameters from "../models/parameters"; +import { ContainerServiceClientContext } from "../containerServiceClientContext"; + +/** Class representing a Snapshots. */ +export class Snapshots { + private readonly client: ContainerServiceClientContext; + + /** + * Create a Snapshots. + * @param {ContainerServiceClientContext} client Reference to the service client. + */ + constructor(client: ContainerServiceClientContext) { + this.client = client; + } + + /** + * @summary Gets a list of snapshots in the specified 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; + } + + /** + * @summary Lists snapshots in the specified subscription and 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; + } + + /** + * @summary Gets a snapshot. + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param callback The callback + */ + get(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * @summary Creates or updates a snapshot. + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters The snapshot to create or update. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, resourceName: string, parameters: Models.Snapshot, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters The snapshot to create or update. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, resourceName: string, parameters: Models.Snapshot, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters The snapshot to create or update. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, resourceName: string, parameters: Models.Snapshot, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, resourceName: string, parameters: Models.Snapshot, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * @summary Updates tags on a snapshot. + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update snapshot Tags operation. + * @param [options] The optional parameters + * @returns Promise + */ + updateTags(resourceGroupName: string, resourceName: string, parameters: Models.TagsObject, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update snapshot Tags operation. + * @param callback The callback + */ + updateTags(resourceGroupName: string, resourceName: string, parameters: Models.TagsObject, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update snapshot Tags operation. + * @param options The optional parameters + * @param callback The callback + */ + updateTags(resourceGroupName: string, resourceName: string, parameters: Models.TagsObject, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + updateTags(resourceGroupName: string, resourceName: string, parameters: Models.TagsObject, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + parameters, + options + }, + updateTagsOperationSpec, + callback) as Promise; + } + + /** + * @summary Deletes a snapshot. + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, resourceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param resourceName The name of the managed cluster resource. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, resourceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + resourceName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * @summary Gets a list of snapshots in the specified 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; + } + + /** + * @summary Lists snapshots in the specified subscription and 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.ContainerService/snapshots", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SnapshotListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SnapshotListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Snapshot + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Snapshot, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Snapshot + }, + 201: { + bodyMapper: Mappers.Snapshot + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const updateTagsOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.TagsObject, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Snapshot + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SnapshotListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SnapshotListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +};