From af2c1c67478b69485847accc72470dc6293e1601 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 4 Oct 2024 07:12:43 +0000 Subject: [PATCH] CodeGen from PR 30854 in Azure/azure-rest-api-specs Merge 9210d8f9352f151fc7d9888cf4513081f6c14fe6 into 75fdb87b5367a3ab306e85fb6daa7501d54f0553 --- common/config/rush/pnpm-lock.yaml | 13 +- .../arm-containerinstance/CHANGELOG.md | 51 +- .../arm-containerinstance/LICENSE | 2 +- .../arm-containerinstance/README.md | 2 +- .../arm-containerinstance/_meta.json | 8 +- .../arm-containerinstance/package.json | 77 +- .../review/arm-containerinstance.api.md | 158 +- .../src/containerInstanceManagementClient.ts | 49 +- .../arm-containerinstance/src/lroImpl.ts | 6 +- .../arm-containerinstance/src/models/index.ts | 211 ++- .../src/models/mappers.ts | 1676 ++++++++++------- .../src/models/parameters.ts | 142 +- .../containerGroupProfileOperations.ts | 255 +++ .../src/operations/containerGroupProfiles.ts | 485 +++++ .../src/operations/containerGroups.ts | 389 ++-- .../src/operations/containers.ts | 63 +- .../src/operations/index.ts | 2 + .../src/operations/location.ts | 129 +- .../src/operations/operations.ts | 32 +- .../subnetServiceAssociationLink.ts | 49 +- .../containerGroupProfileOperations.ts | 50 + .../containerGroupProfiles.ts | 99 + .../operationsInterfaces/containerGroups.ts | 56 +- .../src/operationsInterfaces/containers.ts | 14 +- .../src/operationsInterfaces/index.ts | 2 + .../src/operationsInterfaces/location.ts | 14 +- .../src/operationsInterfaces/operations.ts | 2 +- .../subnetServiceAssociationLink.ts | 8 +- .../arm-containerinstance/src/pagingHelper.ts | 2 +- .../arm-containerinstance/test/sampleTest.ts | 43 + .../arm-containerinstance/tsconfig.json | 10 +- 31 files changed, 2844 insertions(+), 1255 deletions(-) create mode 100644 sdk/containerinstance/arm-containerinstance/src/operations/containerGroupProfileOperations.ts create mode 100644 sdk/containerinstance/arm-containerinstance/src/operations/containerGroupProfiles.ts create mode 100644 sdk/containerinstance/arm-containerinstance/src/operationsInterfaces/containerGroupProfileOperations.ts create mode 100644 sdk/containerinstance/arm-containerinstance/src/operationsInterfaces/containerGroupProfiles.ts create mode 100644 sdk/containerinstance/arm-containerinstance/test/sampleTest.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index c36f1a659552..1a739ba61863 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -10782,7 +10782,7 @@ packages: resolve-import: 1.4.6 rimraf: 5.0.10 sync-content: 1.0.2 - typescript: 5.5.4 + typescript: 5.6.2 walk-up-path: 3.0.1 dev: false @@ -12055,7 +12055,7 @@ packages: dev: false file:projects/ai-inference.tgz: - resolution: {integrity: sha512-yKwDdyRmf+ngBuYLW09c8lzcreD+r9OC3ekRTRss1iQ6lZ86A4mr+We6b/6LJgXkmQCZ5GmCIsAdovjqR+m+gQ==, tarball: file:projects/ai-inference.tgz} + resolution: {integrity: sha512-Q6X9wbW7QeTbk4gw8qkRpVcIdIzZRS1jnI7Cx5WyrQMSFYlbQjNB7xrPeSoGlyGBOAkMmK9KMdV5ECIy0ebKfA==, tarball: file:projects/ai-inference.tgz} name: '@rush-temp/ai-inference' version: 0.0.0 dependencies: @@ -14039,7 +14039,7 @@ packages: dev: false file:projects/arm-containerinstance.tgz: - resolution: {integrity: sha512-SaSrVVISz1ZjPeO8jG5TiqvC+1hhhHv4PtTMZfzgDCxcfKp5zRXmcNRQ7CcRIjk4JPbWPLMwXELm78E9ykeRPw==, tarball: file:projects/arm-containerinstance.tgz} + resolution: {integrity: sha512-8a2fLFTxLQ0JMKVJzm8KpRI5LMacnO8+MDFHc7qv9Ig+Ji1oOd1vGYTeuOJNI83Ru14weGLDgXUpSB2HYbyVoQ==, tarball: file:projects/arm-containerinstance.tgz} name: '@rush-temp/arm-containerinstance' version: 0.0.0 dependencies: @@ -14058,9 +14058,10 @@ packages: mkdirp: 3.0.1 mocha: 10.7.3 rimraf: 5.0.10 - ts-node: 10.9.2(@types/node@18.19.54)(typescript@5.6.2) + ts-node: 10.9.2(@types/node@18.19.54)(typescript@5.5.4) tslib: 2.7.0 - typescript: 5.6.2 + tsx: 4.19.1 + typescript: 5.5.4 uglify-js: 3.19.3 transitivePeerDependencies: - '@swc/core' @@ -21394,7 +21395,7 @@ packages: dev: false file:projects/create-microsoft-playwright-testing.tgz: - resolution: {integrity: sha512-Y0Ilm/OrJbjbGM6pfER/LV17OHMPFnHOjhPnrexQiVTWZcYY/jbi3etI+5+ONzxy36/shS3+gd066AJkDyCM6g==, tarball: file:projects/create-microsoft-playwright-testing.tgz} + resolution: {integrity: sha512-B1PGNf3XJYeElEN9dW97Ai1Vx86+ak5xrU8tz9br+/CfWlEpae91H05L1u8F44dYwjgLhm4B67dNfTIc5twheA==, tarball: file:projects/create-microsoft-playwright-testing.tgz} name: '@rush-temp/create-microsoft-playwright-testing' version: 0.0.0 dependencies: diff --git a/sdk/containerinstance/arm-containerinstance/CHANGELOG.md b/sdk/containerinstance/arm-containerinstance/CHANGELOG.md index 40b0e39ec592..f098933608cc 100644 --- a/sdk/containerinstance/arm-containerinstance/CHANGELOG.md +++ b/sdk/containerinstance/arm-containerinstance/CHANGELOG.md @@ -1,15 +1,46 @@ # Release History - -## 9.1.1 (Unreleased) - + +## 9.2.0-beta.1 (2024-10-04) +Compared with version 9.1.0 + ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added operation group ContainerGroupProfileOperations + - Added operation group ContainerGroupProfiles + - Added Interface ConfigMap + - Added Interface ContainerGroupProfile + - Added Interface ContainerGroupProfileGetByRevisionNumberOptionalParams + - Added Interface ContainerGroupProfileListAllRevisionsNextOptionalParams + - Added Interface ContainerGroupProfileListAllRevisionsOptionalParams + - Added Interface ContainerGroupProfileListResult + - Added Interface ContainerGroupProfilePatch + - Added Interface ContainerGroupProfileProperties + - Added Interface ContainerGroupProfileReferenceDefinition + - Added Interface ContainerGroupProfilesCreateOrUpdateOptionalParams + - Added Interface ContainerGroupProfilesDeleteOptionalParams + - Added Interface ContainerGroupProfilesGetOptionalParams + - Added Interface ContainerGroupProfilesListByResourceGroupNextOptionalParams + - Added Interface ContainerGroupProfilesListByResourceGroupOptionalParams + - Added Interface ContainerGroupProfilesListNextOptionalParams + - Added Interface ContainerGroupProfilesListOptionalParams + - Added Interface ContainerGroupProfilesPatchOptionalParams + - Added Interface StandbyPoolProfileDefinition + - Added Type Alias ContainerGroupProfileGetByRevisionNumberResponse + - Added Type Alias ContainerGroupProfileListAllRevisionsNextResponse + - Added Type Alias ContainerGroupProfileListAllRevisionsResponse + - Added Type Alias ContainerGroupProfilesCreateOrUpdateResponse + - Added Type Alias ContainerGroupProfilesGetResponse + - Added Type Alias ContainerGroupProfilesListByResourceGroupNextResponse + - Added Type Alias ContainerGroupProfilesListByResourceGroupResponse + - Added Type Alias ContainerGroupProfilesListNextResponse + - Added Type Alias ContainerGroupProfilesListResponse + - Added Type Alias ContainerGroupProfilesPatchResponse + - Interface Container has a new optional parameter configMap + - Interface ContainerGroupProperties has a new optional parameter containerGroupProfile + - Interface ContainerGroupProperties has a new optional parameter isCreatedFromStandbyPool + - Interface ContainerGroupProperties has a new optional parameter standbyPoolProfile + + ## 9.1.0 (2023-04-24) ### Features Added @@ -89,4 +120,4 @@ To understand the detail of the change, please refer to [Changelog](https://aka. To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide). -To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ). +To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart). diff --git a/sdk/containerinstance/arm-containerinstance/LICENSE b/sdk/containerinstance/arm-containerinstance/LICENSE index 3a1d9b6f24f7..7d5934740965 100644 --- a/sdk/containerinstance/arm-containerinstance/LICENSE +++ b/sdk/containerinstance/arm-containerinstance/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2023 Microsoft +Copyright (c) 2024 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/containerinstance/arm-containerinstance/README.md b/sdk/containerinstance/arm-containerinstance/README.md index e28b289cba0d..8b91c74654a4 100644 --- a/sdk/containerinstance/arm-containerinstance/README.md +++ b/sdk/containerinstance/arm-containerinstance/README.md @@ -6,7 +6,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/containerinstance/arm-containerinstance) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-containerinstance) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-containerinstance) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-containerinstance?view=azure-node-preview) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/containerinstance/arm-containerinstance/_meta.json b/sdk/containerinstance/arm-containerinstance/_meta.json index 18b8bd7a536c..33a0ce98a881 100644 --- a/sdk/containerinstance/arm-containerinstance/_meta.json +++ b/sdk/containerinstance/arm-containerinstance/_meta.json @@ -1,8 +1,8 @@ { - "commit": "7a65f22cf67826187f75981e914c7e679039257b", + "commit": "fc62e09bad9f6410f8956b44e97aa18668efb6f8", "readme": "specification/containerinstance/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\containerinstance\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.10 --generate-sample=true", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md --use=@autorest/typescript@^6.0.12", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.6.2", - "use": "@autorest/typescript@6.0.0-rc.10" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.14", + "use": "@autorest/typescript@^6.0.12" } \ No newline at end of file diff --git a/sdk/containerinstance/arm-containerinstance/package.json b/sdk/containerinstance/arm-containerinstance/package.json index 67edbfa8ec07..9f1ba8f7624b 100644 --- a/sdk/containerinstance/arm-containerinstance/package.json +++ b/sdk/containerinstance/arm-containerinstance/package.json @@ -3,17 +3,17 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ContainerInstanceManagementClient.", - "version": "9.1.1", + "version": "9.2.0-beta.1", "engines": { "node": ">=18.0.0" }, "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-client": "^1.7.0", - "@azure/core-lro": "^2.5.0", + "@azure/core-lro": "^2.5.4", + "@azure/abort-controller": "^2.1.2", "@azure/core-paging": "^1.2.0", - "@azure/core-rest-pipeline": "^1.8.0", + "@azure/core-client": "^1.7.0", + "@azure/core-auth": "^1.6.0", + "@azure/core-rest-pipeline": "^1.14.0", "tslib": "^2.2.0" }, "keywords": [ @@ -28,23 +28,24 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-containerinstance.d.ts", "devDependencies": { - "@azure-tools/test-credential": "^1.0.0", - "@azure-tools/test-recorder": "^3.0.0", - "@azure/dev-tool": "^1.0.0", - "@azure/identity": "^4.0.1", "@microsoft/api-extractor": "^7.31.1", - "@types/chai": "^4.2.8", + "mkdirp": "^3.0.1", + "typescript": "~5.5.3", + "uglify-js": "^3.4.9", + "rimraf": "^5.0.0", + "dotenv": "^16.0.0", + "@azure/dev-tool": "^1.0.0", + "@azure/identity": "^4.2.1", + "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-credential": "^1.1.0", + "mocha": "^10.0.0", "@types/mocha": "^10.0.0", - "@types/node": "^18.0.0", + "tsx": "^4.7.1", + "@types/chai": "^4.2.8", "chai": "^4.2.0", "cross-env": "^7.0.2", - "dotenv": "^16.0.0", - "mkdirp": "^3.0.1", - "mocha": "^10.0.0", - "rimraf": "^5.0.5", - "ts-node": "^10.0.0", - "typescript": "~5.6.2", - "uglify-js": "^3.4.9" + "@types/node": "^18.0.0", + "ts-node": "^10.0.0" }, "repository": { "type": "git", @@ -71,31 +72,29 @@ "types/*" ], "scripts": { - "audit": "echo skipped", "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && mkdirp ./review && npm run extract-api", - "build:browser": "echo skipped", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "prepack": "npm run build", + "pack": "npm pack 2>&1", + "extract-api": "dev-tool run extract-api", + "lint": "echo skipped", + "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", - "build:samples": "echo skipped.", + "build:browser": "echo skipped", "build:test": "echo skipped", + "build:samples": "echo skipped.", "check-format": "echo skipped", - "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "execute:samples": "echo skipped", - "extract-api": "dev-tool run extract-api", "format": "echo skipped", - "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:browser": "echo skipped", - "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", - "lint": "echo skipped", - "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", - "pack": "npm pack 2>&1", - "prepack": "npm run build", "test": "npm run integration-test", - "test:browser": "echo skipped", "test:node": "echo skipped", + "test:browser": "echo skipped", "unit-test": "npm run unit-test:node && npm run unit-test:browser", - "unit-test:browser": "echo skipped", "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", - "update-snippets": "echo skipped" + "unit-test:browser": "echo skipped", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:browser": "echo skipped" }, "sideEffects": false, "//metadata": { @@ -107,13 +106,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/containerinstance/arm-containerinstance", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-containerinstance?view=azure-node-preview" - } + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/containerinstance/arm-containerinstance" } \ No newline at end of file diff --git a/sdk/containerinstance/arm-containerinstance/review/arm-containerinstance.api.md b/sdk/containerinstance/arm-containerinstance/review/arm-containerinstance.api.md index c0a22659618c..6ba2e7c29655 100644 --- a/sdk/containerinstance/arm-containerinstance/review/arm-containerinstance.api.md +++ b/sdk/containerinstance/arm-containerinstance/review/arm-containerinstance.api.md @@ -71,17 +71,25 @@ export interface ConfidentialComputeProperties { ccePolicy?: string; } +// @public +export interface ConfigMap { + keyValuePairs?: { + [propertyName: string]: string; + }; +} + // @public export interface Container { command?: string[]; + configMap?: ConfigMap; environmentVariables?: EnvironmentVariable[]; - image: string; + image?: string; readonly instanceView?: ContainerPropertiesInstanceView; livenessProbe?: ContainerProbe; name: string; ports?: ContainerPort[]; readinessProbe?: ContainerProbe; - resources: ResourceRequirements; + resources?: ResourceRequirements; securityContext?: SecurityContextDefinition; volumeMounts?: VolumeMount[]; } @@ -149,9 +157,141 @@ export type ContainerGroupNetworkProtocol = string; // @public export type ContainerGroupPriority = string; +// @public +export interface ContainerGroupProfile extends Resource, ContainerGroupProfileProperties { +} + +// @public +export interface ContainerGroupProfileGetByRevisionNumberOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerGroupProfileGetByRevisionNumberResponse = ContainerGroupProfile; + +// @public +export interface ContainerGroupProfileListAllRevisionsNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerGroupProfileListAllRevisionsNextResponse = ContainerGroupProfileListResult; + +// @public +export interface ContainerGroupProfileListAllRevisionsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerGroupProfileListAllRevisionsResponse = ContainerGroupProfileListResult; + +// @public +export interface ContainerGroupProfileListResult { + nextLink?: string; + value?: ContainerGroupProfile[]; +} + +// @public +export interface ContainerGroupProfileOperations { + getByRevisionNumber(resourceGroupName: string, containerGroupProfileName: string, revisionNumber: string, options?: ContainerGroupProfileGetByRevisionNumberOptionalParams): Promise; + listAllRevisions(resourceGroupName: string, containerGroupProfileName: string, options?: ContainerGroupProfileListAllRevisionsOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ContainerGroupProfilePatch { + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface ContainerGroupProfileProperties { + confidentialComputeProperties?: ConfidentialComputeProperties; + containers: Container[]; + diagnostics?: ContainerGroupDiagnostics; + encryptionProperties?: EncryptionProperties; + extensions?: DeploymentExtensionSpec[]; + imageRegistryCredentials?: ImageRegistryCredential[]; + initContainers?: InitContainerDefinition[]; + ipAddress?: IpAddress; + osType: OperatingSystemTypes; + priority?: ContainerGroupPriority; + restartPolicy?: ContainerGroupRestartPolicy; + readonly revision?: number; + sku?: ContainerGroupSku; + volumes?: Volume[]; +} + +// @public +export interface ContainerGroupProfileReferenceDefinition { + id?: string; + revision?: number; +} + +// @public +export interface ContainerGroupProfiles { + createOrUpdate(resourceGroupName: string, containerGroupProfileName: string, containerGroupProfile: ContainerGroupProfile, options?: ContainerGroupProfilesCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, containerGroupProfileName: string, options?: ContainerGroupProfilesDeleteOptionalParams): Promise; + get(resourceGroupName: string, containerGroupProfileName: string, options?: ContainerGroupProfilesGetOptionalParams): Promise; + list(options?: ContainerGroupProfilesListOptionalParams): PagedAsyncIterableIterator; + listByResourceGroup(resourceGroupName: string, options?: ContainerGroupProfilesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + patch(resourceGroupName: string, containerGroupProfileName: string, properties: ContainerGroupProfilePatch, options?: ContainerGroupProfilesPatchOptionalParams): Promise; +} + +// @public +export interface ContainerGroupProfilesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerGroupProfilesCreateOrUpdateResponse = ContainerGroupProfile; + +// @public +export interface ContainerGroupProfilesDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ContainerGroupProfilesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerGroupProfilesGetResponse = ContainerGroupProfile; + +// @public +export interface ContainerGroupProfilesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerGroupProfilesListByResourceGroupNextResponse = ContainerGroupProfileListResult; + +// @public +export interface ContainerGroupProfilesListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerGroupProfilesListByResourceGroupResponse = ContainerGroupProfileListResult; + +// @public +export interface ContainerGroupProfilesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerGroupProfilesListNextResponse = ContainerGroupProfileListResult; + +// @public +export interface ContainerGroupProfilesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerGroupProfilesListResponse = ContainerGroupProfileListResult; + +// @public +export interface ContainerGroupProfilesPatchOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerGroupProfilesPatchResponse = ContainerGroupProfile; + // @public export interface ContainerGroupProperties { confidentialComputeProperties?: ConfidentialComputeProperties; + containerGroupProfile?: ContainerGroupProfileReferenceDefinition; containers: Container[]; diagnostics?: ContainerGroupDiagnostics; dnsConfig?: DnsConfiguration; @@ -162,11 +302,13 @@ export interface ContainerGroupProperties { initContainers?: InitContainerDefinition[]; readonly instanceView?: ContainerGroupPropertiesInstanceView; ipAddress?: IpAddress; - osType: OperatingSystemTypes; + readonly isCreatedFromStandbyPool?: boolean; + osType?: OperatingSystemTypes; priority?: ContainerGroupPriority; readonly provisioningState?: string; restartPolicy?: ContainerGroupRestartPolicy; sku?: ContainerGroupSku; + standbyPoolProfile?: StandbyPoolProfileDefinition; subnetIds?: ContainerGroupSubnetId[]; volumes?: Volume[]; } @@ -308,6 +450,10 @@ export class ContainerInstanceManagementClient extends coreClient.ServiceClient // (undocumented) apiVersion: string; // (undocumented) + containerGroupProfileOperations: ContainerGroupProfileOperations; + // (undocumented) + containerGroupProfiles: ContainerGroupProfiles; + // (undocumented) containerGroups: ContainerGroups; // (undocumented) containers: Containers; @@ -750,6 +896,12 @@ export interface SecurityContextDefinition { seccompProfile?: string; } +// @public +export interface StandbyPoolProfileDefinition { + failContainerGroupCreateOnReuseFailure?: boolean; + id?: string; +} + // @public export interface SubnetServiceAssociationLink { beginDelete(resourceGroupName: string, virtualNetworkName: string, subnetName: string, options?: SubnetServiceAssociationLinkDeleteOptionalParams): Promise, void>>; diff --git a/sdk/containerinstance/arm-containerinstance/src/containerInstanceManagementClient.ts b/sdk/containerinstance/arm-containerinstance/src/containerInstanceManagementClient.ts index 145566f2f459..6d9f68fe3986 100644 --- a/sdk/containerinstance/arm-containerinstance/src/containerInstanceManagementClient.ts +++ b/sdk/containerinstance/arm-containerinstance/src/containerInstanceManagementClient.ts @@ -11,7 +11,7 @@ import * as coreRestPipeline from "@azure/core-rest-pipeline"; import { PipelineRequest, PipelineResponse, - SendRequest + SendRequest, } from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { @@ -19,14 +19,18 @@ import { OperationsImpl, LocationImpl, ContainersImpl, - SubnetServiceAssociationLinkImpl + SubnetServiceAssociationLinkImpl, + ContainerGroupProfilesImpl, + ContainerGroupProfileOperationsImpl, } from "./operations"; import { ContainerGroups, Operations, Location, Containers, - SubnetServiceAssociationLink + SubnetServiceAssociationLink, + ContainerGroupProfiles, + ContainerGroupProfileOperations, } from "./operationsInterfaces"; import { ContainerInstanceManagementClientOptionalParams } from "./models"; @@ -38,14 +42,13 @@ export class ContainerInstanceManagementClient extends coreClient.ServiceClient /** * Initializes a new instance of the ContainerInstanceManagementClient class. * @param credentials Subscription credentials which uniquely identify client subscription. - * @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. The value must be an UUID. * @param options The parameter options */ constructor( credentials: coreAuth.TokenCredential, subscriptionId: string, - options?: ContainerInstanceManagementClientOptionalParams + options?: ContainerInstanceManagementClientOptionalParams, ) { if (credentials === undefined) { throw new Error("'credentials' cannot be null"); @@ -60,10 +63,10 @@ export class ContainerInstanceManagementClient extends coreClient.ServiceClient } const defaults: ContainerInstanceManagementClientOptionalParams = { requestContentType: "application/json; charset=utf-8", - credential: credentials + credential: credentials, }; - const packageDetails = `azsdk-js-arm-containerinstance/9.1.1`; + const packageDetails = `azsdk-js-arm-containerinstance/9.2.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -73,20 +76,21 @@ export class ContainerInstanceManagementClient extends coreClient.ServiceClient ...defaults, ...options, userAgentOptions: { - userAgentPrefix + userAgentPrefix, }, endpoint: - options.endpoint ?? options.baseUri ?? "https://management.azure.com" + options.endpoint ?? options.baseUri ?? "https://management.azure.com", }; super(optionsWithDefaults); let bearerTokenAuthenticationPolicyFound: boolean = false; if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { - const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); + const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = + options.pipeline.getOrderedPolicies(); bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( (pipelinePolicy) => pipelinePolicy.name === - coreRestPipeline.bearerTokenAuthenticationPolicyName + coreRestPipeline.bearerTokenAuthenticationPolicyName, ); } if ( @@ -96,7 +100,7 @@ export class ContainerInstanceManagementClient extends coreClient.ServiceClient !bearerTokenAuthenticationPolicyFound ) { this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName + name: coreRestPipeline.bearerTokenAuthenticationPolicyName, }); this.pipeline.addPolicy( coreRestPipeline.bearerTokenAuthenticationPolicy({ @@ -106,9 +110,9 @@ export class ContainerInstanceManagementClient extends coreClient.ServiceClient `${optionsWithDefaults.endpoint}/.default`, challengeCallbacks: { authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) + coreClient.authorizeRequestOnClaimChallenge, + }, + }), ); } // Parameter assignments @@ -116,14 +120,17 @@ export class ContainerInstanceManagementClient extends coreClient.ServiceClient // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2023-05-01"; + this.apiVersion = options.apiVersion || "2024-05-01-preview"; this.containerGroups = new ContainerGroupsImpl(this); this.operations = new OperationsImpl(this); this.location = new LocationImpl(this); this.containers = new ContainersImpl(this); this.subnetServiceAssociationLink = new SubnetServiceAssociationLinkImpl( - this + this, ); + this.containerGroupProfiles = new ContainerGroupProfilesImpl(this); + this.containerGroupProfileOperations = + new ContainerGroupProfileOperationsImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -136,7 +143,7 @@ export class ContainerInstanceManagementClient extends coreClient.ServiceClient name: "CustomApiVersionPolicy", async sendRequest( request: PipelineRequest, - next: SendRequest + next: SendRequest, ): Promise { const param = request.url.split("?"); if (param.length > 1) { @@ -150,7 +157,7 @@ export class ContainerInstanceManagementClient extends coreClient.ServiceClient request.url = param[0] + "?" + newParams.join("&"); } return next(request); - } + }, }; this.pipeline.addPolicy(apiVersionPolicy); } @@ -160,4 +167,6 @@ export class ContainerInstanceManagementClient extends coreClient.ServiceClient location: Location; containers: Containers; subnetServiceAssociationLink: SubnetServiceAssociationLink; + containerGroupProfiles: ContainerGroupProfiles; + containerGroupProfileOperations: ContainerGroupProfileOperations; } diff --git a/sdk/containerinstance/arm-containerinstance/src/lroImpl.ts b/sdk/containerinstance/arm-containerinstance/src/lroImpl.ts index 52f6eaacfb83..5f88efab981b 100644 --- a/sdk/containerinstance/arm-containerinstance/src/lroImpl.ts +++ b/sdk/containerinstance/arm-containerinstance/src/lroImpl.ts @@ -28,15 +28,15 @@ export function createLroSpec(inputs: { sendInitialRequest: () => sendOperationFn(args, spec), sendPollRequest: ( path: string, - options?: { abortSignal?: AbortSignalLike } + options?: { abortSignal?: AbortSignalLike }, ) => { const { requestBody, ...restSpec } = spec; return sendOperationFn(args, { ...restSpec, httpMethod: "GET", path, - abortSignal: options?.abortSignal + abortSignal: options?.abortSignal, }); - } + }, }; } diff --git a/sdk/containerinstance/arm-containerinstance/src/models/index.ts b/sdk/containerinstance/arm-containerinstance/src/models/index.ts index a82edd98b8b1..e18b0cb87754 100644 --- a/sdk/containerinstance/arm-containerinstance/src/models/index.ts +++ b/sdk/containerinstance/arm-containerinstance/src/models/index.ts @@ -65,7 +65,7 @@ export interface ContainerGroupProperties { /** The IP address type of the container group. */ ipAddress?: IpAddress; /** The operating system type required by the containers in the container group. */ - osType: OperatingSystemTypes; + osType?: OperatingSystemTypes; /** The list of volumes that can be mounted by containers in this container group. */ volumes?: Volume[]; /** @@ -91,6 +91,15 @@ export interface ContainerGroupProperties { confidentialComputeProperties?: ConfidentialComputeProperties; /** The priority of the container group. */ priority?: ContainerGroupPriority; + /** The reference container group profile properties. */ + containerGroupProfile?: ContainerGroupProfileReferenceDefinition; + /** The reference standby pool profile properties. */ + standbyPoolProfile?: StandbyPoolProfileDefinition; + /** + * The flag indicating whether the container group is created by standby pool. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isCreatedFromStandbyPool?: boolean; } /** Identity for the container group. */ @@ -130,7 +139,7 @@ export interface Container { /** The user-provided name of the container instance. */ name: string; /** The name of the image used to create the container instance. */ - image: string; + image?: string; /** The commands to execute within the container instance in exec form. */ command?: string[]; /** The exposed ports on the container instance. */ @@ -143,7 +152,7 @@ export interface Container { */ readonly instanceView?: ContainerPropertiesInstanceView; /** The resource requirements of the container instance. */ - resources: ResourceRequirements; + resources?: ResourceRequirements; /** The volume mounts available to the container instance. */ volumeMounts?: VolumeMount[]; /** The liveness probe. */ @@ -152,6 +161,8 @@ export interface Container { readinessProbe?: ContainerProbe; /** The container security properties. */ securityContext?: SecurityContextDefinition; + /** The config map. */ + configMap?: ConfigMap; } /** The port exposed on the container instance. */ @@ -373,6 +384,12 @@ export interface SecurityContextCapabilitiesDefinition { drop?: string[]; } +/** The container config map. */ +export interface ConfigMap { + /** The key value pairs dictionary in the config map. */ + keyValuePairs?: { [propertyName: string]: string }; +} + /** Image registry credential. */ export interface ImageRegistryCredential { /** The Docker image registry server without a protocol such as "http" and "https". */ @@ -579,6 +596,22 @@ export interface ConfidentialComputeProperties { ccePolicy?: string; } +/** The container group profile reference. */ +export interface ContainerGroupProfileReferenceDefinition { + /** The container group profile reference id.This will be an ARM resource id in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}'. */ + id?: string; + /** The container group profile reference revision. */ + revision?: number; +} + +/** The standby pool profile reference. */ +export interface StandbyPoolProfileDefinition { + /** The standby pool profile reference id.This will be an ARM resource id in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyPoolName}'. */ + id?: string; + /** The flag to determine whether ACI should fail the create request if the container group can not be obtained from standby pool. */ + failContainerGroupCreateOnReuseFailure?: boolean; +} + /** An error response from the Container Instance service. */ export interface CloudError { /** An error response from the Container Instance service. */ @@ -796,15 +829,75 @@ export interface CapabilitiesCapabilities { readonly maxGpuCount?: number; } +/** The container group profile list response that contains the container group profile properties. */ +export interface ContainerGroupProfileListResult { + /** The list of container group profiles. */ + value?: ContainerGroupProfile[]; + /** The URI to fetch the next page of container group profiles. */ + nextLink?: string; +} + +/** The container group profile properties */ +export interface ContainerGroupProfileProperties { + /** The containers within the container group. */ + containers: Container[]; + /** The image registry credentials by which the container group is created from. */ + imageRegistryCredentials?: ImageRegistryCredential[]; + /** + * Restart policy for all containers within the container group. + * - `Always` Always restart + * - `OnFailure` Restart on failure + * - `Never` Never restart + * + */ + restartPolicy?: ContainerGroupRestartPolicy; + /** The IP address type of the container group. */ + ipAddress?: IpAddress; + /** The operating system type required by the containers in the container group. */ + osType: OperatingSystemTypes; + /** The list of volumes that can be mounted by containers in this container group. */ + volumes?: Volume[]; + /** The diagnostic information for a container group. */ + diagnostics?: ContainerGroupDiagnostics; + /** The SKU for a container group. */ + sku?: ContainerGroupSku; + /** The encryption properties for a container group. */ + encryptionProperties?: EncryptionProperties; + /** The init containers for a container group. */ + initContainers?: InitContainerDefinition[]; + /** extensions used by virtual kubelet */ + extensions?: DeploymentExtensionSpec[]; + /** The properties for confidential container group */ + confidentialComputeProperties?: ConfidentialComputeProperties; + /** The priority of the container group. */ + priority?: ContainerGroupPriority; + /** + * The container group profile current revision number. This only appears in the response. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly revision?: number; +} + +/** Properties of container group profile that need to be patched */ +export interface ContainerGroupProfilePatch { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; +} + /** A container group. */ export interface ContainerGroup extends Resource, ContainerGroupProperties {} +/** A container group profile. */ +export interface ContainerGroupProfile + extends Resource, + ContainerGroupProfileProperties {} + /** Known values of {@link ContainerNetworkProtocol} that the service accepts. */ export enum KnownContainerNetworkProtocol { /** TCP */ TCP = "TCP", /** UDP */ - UDP = "UDP" + UDP = "UDP", } /** @@ -824,7 +917,7 @@ export enum KnownGpuSku { /** P100 */ P100 = "P100", /** V100 */ - V100 = "V100" + V100 = "V100", } /** @@ -843,7 +936,7 @@ export enum KnownScheme { /** Http */ Http = "http", /** Https */ - Https = "https" + Https = "https", } /** @@ -863,7 +956,7 @@ export enum KnownContainerGroupRestartPolicy { /** OnFailure */ OnFailure = "OnFailure", /** Never */ - Never = "Never" + Never = "Never", } /** @@ -882,7 +975,7 @@ export enum KnownContainerGroupNetworkProtocol { /** TCP */ TCP = "TCP", /** UDP */ - UDP = "UDP" + UDP = "UDP", } /** @@ -900,7 +993,7 @@ export enum KnownContainerGroupIpAddressType { /** Public */ Public = "Public", /** Private */ - Private = "Private" + Private = "Private", } /** @@ -924,7 +1017,7 @@ export enum KnownDnsNameLabelReusePolicy { /** ResourceGroupReuse */ ResourceGroupReuse = "ResourceGroupReuse", /** Noreuse */ - Noreuse = "Noreuse" + Noreuse = "Noreuse", } /** @@ -945,7 +1038,7 @@ export enum KnownOperatingSystemTypes { /** Windows */ Windows = "Windows", /** Linux */ - Linux = "Linux" + Linux = "Linux", } /** @@ -963,7 +1056,7 @@ export enum KnownLogAnalyticsLogType { /** ContainerInsights */ ContainerInsights = "ContainerInsights", /** ContainerInstanceLogs */ - ContainerInstanceLogs = "ContainerInstanceLogs" + ContainerInstanceLogs = "ContainerInstanceLogs", } /** @@ -983,7 +1076,7 @@ export enum KnownContainerGroupSku { /** Dedicated */ Dedicated = "Dedicated", /** Confidential */ - Confidential = "Confidential" + Confidential = "Confidential", } /** @@ -1002,7 +1095,7 @@ export enum KnownContainerGroupPriority { /** Regular */ Regular = "Regular", /** Spot */ - Spot = "Spot" + Spot = "Spot", } /** @@ -1020,7 +1113,7 @@ export enum KnownContainerInstanceOperationsOrigin { /** User */ User = "User", /** System */ - System = "System" + System = "System", } /** @@ -1051,7 +1144,8 @@ export interface ContainerGroupsListByResourceGroupOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByResourceGroup operation. */ -export type ContainerGroupsListByResourceGroupResponse = ContainerGroupListResult; +export type ContainerGroupsListByResourceGroupResponse = + ContainerGroupListResult; /** Optional parameters. */ export interface ContainerGroupsGetOptionalParams @@ -1135,7 +1229,8 @@ export interface ContainerGroupsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByResourceGroupNext operation. */ -export type ContainerGroupsListByResourceGroupNextResponse = ContainerGroupListResult; +export type ContainerGroupsListByResourceGroupNextResponse = + ContainerGroupListResult; /** Optional parameters. */ export interface OperationsListOptionalParams @@ -1221,6 +1316,88 @@ export interface SubnetServiceAssociationLinkDeleteOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface ContainerGroupProfilesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ContainerGroupProfilesListResponse = + ContainerGroupProfileListResult; + +/** Optional parameters. */ +export interface ContainerGroupProfilesListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type ContainerGroupProfilesListByResourceGroupResponse = + ContainerGroupProfileListResult; + +/** Optional parameters. */ +export interface ContainerGroupProfilesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ContainerGroupProfilesGetResponse = ContainerGroupProfile; + +/** Optional parameters. */ +export interface ContainerGroupProfilesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type ContainerGroupProfilesCreateOrUpdateResponse = + ContainerGroupProfile; + +/** Optional parameters. */ +export interface ContainerGroupProfilesPatchOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the patch operation. */ +export type ContainerGroupProfilesPatchResponse = ContainerGroupProfile; + +/** Optional parameters. */ +export interface ContainerGroupProfilesDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface ContainerGroupProfilesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ContainerGroupProfilesListNextResponse = + ContainerGroupProfileListResult; + +/** Optional parameters. */ +export interface ContainerGroupProfilesListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type ContainerGroupProfilesListByResourceGroupNextResponse = + ContainerGroupProfileListResult; + +/** Optional parameters. */ +export interface ContainerGroupProfileListAllRevisionsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listAllRevisions operation. */ +export type ContainerGroupProfileListAllRevisionsResponse = + ContainerGroupProfileListResult; + +/** Optional parameters. */ +export interface ContainerGroupProfileGetByRevisionNumberOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getByRevisionNumber operation. */ +export type ContainerGroupProfileGetByRevisionNumberResponse = + ContainerGroupProfile; + +/** Optional parameters. */ +export interface ContainerGroupProfileListAllRevisionsNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listAllRevisionsNext operation. */ +export type ContainerGroupProfileListAllRevisionsNextResponse = + ContainerGroupProfileListResult; + /** Optional parameters. */ export interface ContainerInstanceManagementClientOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/containerinstance/arm-containerinstance/src/models/mappers.ts b/sdk/containerinstance/arm-containerinstance/src/models/mappers.ts index b4b482c66ac1..5022b042c8e6 100644 --- a/sdk/containerinstance/arm-containerinstance/src/models/mappers.ts +++ b/sdk/containerinstance/arm-containerinstance/src/models/mappers.ts @@ -20,19 +20,19 @@ export const ContainerGroupListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ContainerGroup" - } - } - } + className: "ContainerGroup", + }, + }, + }, }, nextLink: { serializedName: "nextLink", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const Resource: coreClient.CompositeMapper = { @@ -44,35 +44,35 @@ export const Resource: coreClient.CompositeMapper = { serializedName: "id", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, name: { serializedName: "name", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, type: { serializedName: "type", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, location: { serializedName: "location", type: { - name: "String" - } + name: "String", + }, }, tags: { serializedName: "tags", type: { name: "Dictionary", - value: { type: { name: "String" } } - } + value: { type: { name: "String" } }, + }, }, zones: { serializedName: "zones", @@ -80,13 +80,13 @@ export const Resource: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } - } - } - } + name: "String", + }, + }, + }, + }, + }, + }, }; export const ContainerGroupProperties: coreClient.CompositeMapper = { @@ -98,15 +98,15 @@ export const ContainerGroupProperties: coreClient.CompositeMapper = { serializedName: "identity", type: { name: "Composite", - className: "ContainerGroupIdentity" - } + className: "ContainerGroupIdentity", + }, }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, containers: { serializedName: "properties.containers", @@ -116,10 +116,10 @@ export const ContainerGroupProperties: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Container" - } - } - } + className: "Container", + }, + }, + }, }, imageRegistryCredentials: { serializedName: "properties.imageRegistryCredentials", @@ -128,30 +128,29 @@ export const ContainerGroupProperties: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ImageRegistryCredential" - } - } - } + className: "ImageRegistryCredential", + }, + }, + }, }, restartPolicy: { serializedName: "properties.restartPolicy", type: { - name: "String" - } + name: "String", + }, }, ipAddress: { serializedName: "properties.ipAddress", type: { name: "Composite", - className: "IpAddress" - } + className: "IpAddress", + }, }, osType: { serializedName: "properties.osType", - required: true, type: { - name: "String" - } + name: "String", + }, }, volumes: { serializedName: "properties.volumes", @@ -160,24 +159,24 @@ export const ContainerGroupProperties: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Volume" - } - } - } + className: "Volume", + }, + }, + }, }, instanceView: { serializedName: "properties.instanceView", type: { name: "Composite", - className: "ContainerGroupPropertiesInstanceView" - } + className: "ContainerGroupPropertiesInstanceView", + }, }, diagnostics: { serializedName: "properties.diagnostics", type: { name: "Composite", - className: "ContainerGroupDiagnostics" - } + className: "ContainerGroupDiagnostics", + }, }, subnetIds: { serializedName: "properties.subnetIds", @@ -186,30 +185,30 @@ export const ContainerGroupProperties: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ContainerGroupSubnetId" - } - } - } + className: "ContainerGroupSubnetId", + }, + }, + }, }, dnsConfig: { serializedName: "properties.dnsConfig", type: { name: "Composite", - className: "DnsConfiguration" - } + className: "DnsConfiguration", + }, }, sku: { serializedName: "properties.sku", type: { - name: "String" - } + name: "String", + }, }, encryptionProperties: { serializedName: "properties.encryptionProperties", type: { name: "Composite", - className: "EncryptionProperties" - } + className: "EncryptionProperties", + }, }, initContainers: { serializedName: "properties.initContainers", @@ -218,10 +217,10 @@ export const ContainerGroupProperties: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "InitContainerDefinition" - } - } - } + className: "InitContainerDefinition", + }, + }, + }, }, extensions: { serializedName: "properties.extensions", @@ -230,26 +229,47 @@ export const ContainerGroupProperties: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "DeploymentExtensionSpec" - } - } - } + className: "DeploymentExtensionSpec", + }, + }, + }, }, confidentialComputeProperties: { serializedName: "properties.confidentialComputeProperties", type: { name: "Composite", - className: "ConfidentialComputeProperties" - } + className: "ConfidentialComputeProperties", + }, }, priority: { serializedName: "properties.priority", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + containerGroupProfile: { + serializedName: "properties.containerGroupProfile", + type: { + name: "Composite", + className: "ContainerGroupProfileReferenceDefinition", + }, + }, + standbyPoolProfile: { + serializedName: "properties.standbyPoolProfile", + type: { + name: "Composite", + className: "StandbyPoolProfileDefinition", + }, + }, + isCreatedFromStandbyPool: { + serializedName: "properties.isCreatedFromStandbyPool", + readOnly: true, + type: { + name: "Boolean", + }, + }, + }, + }, }; export const ContainerGroupIdentity: coreClient.CompositeMapper = { @@ -261,15 +281,15 @@ export const ContainerGroupIdentity: coreClient.CompositeMapper = { serializedName: "principalId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, tenantId: { serializedName: "tenantId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, type: { serializedName: "type", @@ -279,21 +299,21 @@ export const ContainerGroupIdentity: coreClient.CompositeMapper = { "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", - "None" - ] - } + "None", + ], + }, }, userAssignedIdentities: { serializedName: "userAssignedIdentities", type: { name: "Dictionary", value: { - type: { name: "Composite", className: "UserAssignedIdentities" } - } - } - } - } - } + type: { name: "Composite", className: "UserAssignedIdentities" }, + }, + }, + }, + }, + }, }; export const UserAssignedIdentities: coreClient.CompositeMapper = { @@ -305,18 +325,18 @@ export const UserAssignedIdentities: coreClient.CompositeMapper = { serializedName: "principalId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, clientId: { serializedName: "clientId", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const Container: coreClient.CompositeMapper = { @@ -328,15 +348,14 @@ export const Container: coreClient.CompositeMapper = { serializedName: "name", required: true, type: { - name: "String" - } + name: "String", + }, }, image: { serializedName: "properties.image", - required: true, type: { - name: "String" - } + name: "String", + }, }, command: { serializedName: "properties.command", @@ -344,10 +363,10 @@ export const Container: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, ports: { serializedName: "properties.ports", @@ -356,10 +375,10 @@ export const Container: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ContainerPort" - } - } - } + className: "ContainerPort", + }, + }, + }, }, environmentVariables: { serializedName: "properties.environmentVariables", @@ -368,24 +387,24 @@ export const Container: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "EnvironmentVariable" - } - } - } + className: "EnvironmentVariable", + }, + }, + }, }, instanceView: { serializedName: "properties.instanceView", type: { name: "Composite", - className: "ContainerPropertiesInstanceView" - } + className: "ContainerPropertiesInstanceView", + }, }, resources: { serializedName: "properties.resources", type: { name: "Composite", - className: "ResourceRequirements" - } + className: "ResourceRequirements", + }, }, volumeMounts: { serializedName: "properties.volumeMounts", @@ -394,34 +413,41 @@ export const Container: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "VolumeMount" - } - } - } + className: "VolumeMount", + }, + }, + }, }, livenessProbe: { serializedName: "properties.livenessProbe", type: { name: "Composite", - className: "ContainerProbe" - } + className: "ContainerProbe", + }, }, readinessProbe: { serializedName: "properties.readinessProbe", type: { name: "Composite", - className: "ContainerProbe" - } + className: "ContainerProbe", + }, }, securityContext: { serializedName: "properties.securityContext", type: { name: "Composite", - className: "SecurityContextDefinition" - } - } - } - } + className: "SecurityContextDefinition", + }, + }, + configMap: { + serializedName: "properties.configMap", + type: { + name: "Composite", + className: "ConfigMap", + }, + }, + }, + }, }; export const ContainerPort: coreClient.CompositeMapper = { @@ -432,18 +458,18 @@ export const ContainerPort: coreClient.CompositeMapper = { protocol: { serializedName: "protocol", type: { - name: "String" - } + name: "String", + }, }, port: { serializedName: "port", required: true, type: { - name: "Number" - } - } - } - } + name: "Number", + }, + }, + }, + }, }; export const EnvironmentVariable: coreClient.CompositeMapper = { @@ -455,23 +481,23 @@ export const EnvironmentVariable: coreClient.CompositeMapper = { serializedName: "name", required: true, type: { - name: "String" - } + name: "String", + }, }, value: { serializedName: "value", type: { - name: "String" - } + name: "String", + }, }, secureValue: { serializedName: "secureValue", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ContainerPropertiesInstanceView: coreClient.CompositeMapper = { @@ -483,22 +509,22 @@ export const ContainerPropertiesInstanceView: coreClient.CompositeMapper = { serializedName: "restartCount", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, currentState: { serializedName: "currentState", type: { name: "Composite", - className: "ContainerState" - } + className: "ContainerState", + }, }, previousState: { serializedName: "previousState", type: { name: "Composite", - className: "ContainerState" - } + className: "ContainerState", + }, }, events: { serializedName: "events", @@ -508,13 +534,13 @@ export const ContainerPropertiesInstanceView: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Event" - } - } - } - } - } - } + className: "Event", + }, + }, + }, + }, + }, + }, }; export const ContainerState: coreClient.CompositeMapper = { @@ -526,39 +552,39 @@ export const ContainerState: coreClient.CompositeMapper = { serializedName: "state", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, startTime: { serializedName: "startTime", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, exitCode: { serializedName: "exitCode", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, finishTime: { serializedName: "finishTime", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, detailStatus: { serializedName: "detailStatus", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const Event: coreClient.CompositeMapper = { @@ -570,46 +596,46 @@ export const Event: coreClient.CompositeMapper = { serializedName: "count", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, firstTimestamp: { serializedName: "firstTimestamp", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, lastTimestamp: { serializedName: "lastTimestamp", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, name: { serializedName: "name", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, message: { serializedName: "message", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, type: { serializedName: "type", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ResourceRequirements: coreClient.CompositeMapper = { @@ -621,18 +647,18 @@ export const ResourceRequirements: coreClient.CompositeMapper = { serializedName: "requests", type: { name: "Composite", - className: "ResourceRequests" - } + className: "ResourceRequests", + }, }, limits: { serializedName: "limits", type: { name: "Composite", - className: "ResourceLimits" - } - } - } - } + className: "ResourceLimits", + }, + }, + }, + }, }; export const ResourceRequests: coreClient.CompositeMapper = { @@ -644,25 +670,25 @@ export const ResourceRequests: coreClient.CompositeMapper = { serializedName: "memoryInGB", required: true, type: { - name: "Number" - } + name: "Number", + }, }, cpu: { serializedName: "cpu", required: true, type: { - name: "Number" - } + name: "Number", + }, }, gpu: { serializedName: "gpu", type: { name: "Composite", - className: "GpuResource" - } - } - } - } + className: "GpuResource", + }, + }, + }, + }, }; export const GpuResource: coreClient.CompositeMapper = { @@ -674,18 +700,18 @@ export const GpuResource: coreClient.CompositeMapper = { serializedName: "count", required: true, type: { - name: "Number" - } + name: "Number", + }, }, sku: { serializedName: "sku", required: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ResourceLimits: coreClient.CompositeMapper = { @@ -696,24 +722,24 @@ export const ResourceLimits: coreClient.CompositeMapper = { memoryInGB: { serializedName: "memoryInGB", type: { - name: "Number" - } + name: "Number", + }, }, cpu: { serializedName: "cpu", type: { - name: "Number" - } + name: "Number", + }, }, gpu: { serializedName: "gpu", type: { name: "Composite", - className: "GpuResource" - } - } - } - } + className: "GpuResource", + }, + }, + }, + }, }; export const VolumeMount: coreClient.CompositeMapper = { @@ -725,24 +751,24 @@ export const VolumeMount: coreClient.CompositeMapper = { serializedName: "name", required: true, type: { - name: "String" - } + name: "String", + }, }, mountPath: { serializedName: "mountPath", required: true, type: { - name: "String" - } + name: "String", + }, }, readOnly: { serializedName: "readOnly", type: { - name: "Boolean" - } - } - } - } + name: "Boolean", + }, + }, + }, + }, }; export const ContainerProbe: coreClient.CompositeMapper = { @@ -754,48 +780,48 @@ export const ContainerProbe: coreClient.CompositeMapper = { serializedName: "exec", type: { name: "Composite", - className: "ContainerExec" - } + className: "ContainerExec", + }, }, httpGet: { serializedName: "httpGet", type: { name: "Composite", - className: "ContainerHttpGet" - } + className: "ContainerHttpGet", + }, }, initialDelaySeconds: { serializedName: "initialDelaySeconds", type: { - name: "Number" - } + name: "Number", + }, }, periodSeconds: { serializedName: "periodSeconds", type: { - name: "Number" - } + name: "Number", + }, }, failureThreshold: { serializedName: "failureThreshold", type: { - name: "Number" - } + name: "Number", + }, }, successThreshold: { serializedName: "successThreshold", type: { - name: "Number" - } + name: "Number", + }, }, timeoutSeconds: { serializedName: "timeoutSeconds", type: { - name: "Number" - } - } - } - } + name: "Number", + }, + }, + }, + }, }; export const ContainerExec: coreClient.CompositeMapper = { @@ -809,13 +835,13 @@ export const ContainerExec: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } - } - } - } + name: "String", + }, + }, + }, + }, + }, + }, }; export const ContainerHttpGet: coreClient.CompositeMapper = { @@ -826,21 +852,21 @@ export const ContainerHttpGet: coreClient.CompositeMapper = { path: { serializedName: "path", type: { - name: "String" - } + name: "String", + }, }, port: { serializedName: "port", required: true, type: { - name: "Number" - } + name: "Number", + }, }, scheme: { serializedName: "scheme", type: { - name: "String" - } + name: "String", + }, }, httpHeaders: { serializedName: "httpHeaders", @@ -849,13 +875,13 @@ export const ContainerHttpGet: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "HttpHeader" - } - } - } - } - } - } + className: "HttpHeader", + }, + }, + }, + }, + }, + }, }; export const HttpHeader: coreClient.CompositeMapper = { @@ -866,17 +892,17 @@ export const HttpHeader: coreClient.CompositeMapper = { name: { serializedName: "name", type: { - name: "String" - } + name: "String", + }, }, value: { serializedName: "value", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const SecurityContextDefinition: coreClient.CompositeMapper = { @@ -887,73 +913,90 @@ export const SecurityContextDefinition: coreClient.CompositeMapper = { privileged: { serializedName: "privileged", type: { - name: "Boolean" - } + name: "Boolean", + }, }, allowPrivilegeEscalation: { serializedName: "allowPrivilegeEscalation", type: { - name: "Boolean" - } + name: "Boolean", + }, }, capabilities: { serializedName: "capabilities", type: { name: "Composite", - className: "SecurityContextCapabilitiesDefinition" - } + className: "SecurityContextCapabilitiesDefinition", + }, }, runAsGroup: { serializedName: "runAsGroup", type: { - name: "Number" - } + name: "Number", + }, }, runAsUser: { serializedName: "runAsUser", type: { - name: "Number" - } + name: "Number", + }, }, seccompProfile: { serializedName: "seccompProfile", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; -export const SecurityContextCapabilitiesDefinition: coreClient.CompositeMapper = { +export const SecurityContextCapabilitiesDefinition: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "SecurityContextCapabilitiesDefinition", + modelProperties: { + add: { + serializedName: "add", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + drop: { + serializedName: "drop", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, + }; + +export const ConfigMap: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SecurityContextCapabilitiesDefinition", + className: "ConfigMap", modelProperties: { - add: { - serializedName: "add", + keyValuePairs: { + serializedName: "keyValuePairs", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } + name: "Dictionary", + value: { type: { name: "String" } }, + }, }, - drop: { - serializedName: "drop", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } + }, + }, }; export const ImageRegistryCredential: coreClient.CompositeMapper = { @@ -965,35 +1008,35 @@ export const ImageRegistryCredential: coreClient.CompositeMapper = { serializedName: "server", required: true, type: { - name: "String" - } + name: "String", + }, }, username: { serializedName: "username", type: { - name: "String" - } + name: "String", + }, }, password: { serializedName: "password", type: { - name: "String" - } + name: "String", + }, }, identity: { serializedName: "identity", type: { - name: "String" - } + name: "String", + }, }, identityUrl: { serializedName: "identityUrl", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const IpAddress: coreClient.CompositeMapper = { @@ -1009,46 +1052,46 @@ export const IpAddress: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Port" - } - } - } + className: "Port", + }, + }, + }, }, type: { serializedName: "type", required: true, type: { - name: "String" - } + name: "String", + }, }, ip: { serializedName: "ip", type: { - name: "String" - } + name: "String", + }, }, dnsNameLabel: { serializedName: "dnsNameLabel", type: { - name: "String" - } + name: "String", + }, }, autoGeneratedDomainNameLabelScope: { defaultValue: "Unsecure", serializedName: "autoGeneratedDomainNameLabelScope", type: { - name: "String" - } + name: "String", + }, }, fqdn: { serializedName: "fqdn", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const Port: coreClient.CompositeMapper = { @@ -1059,18 +1102,18 @@ export const Port: coreClient.CompositeMapper = { protocol: { serializedName: "protocol", type: { - name: "String" - } + name: "String", + }, }, port: { serializedName: "port", required: true, type: { - name: "Number" - } - } - } - } + name: "Number", + }, + }, + }, + }, }; export const Volume: coreClient.CompositeMapper = { @@ -1082,39 +1125,39 @@ export const Volume: coreClient.CompositeMapper = { serializedName: "name", required: true, type: { - name: "String" - } + name: "String", + }, }, azureFile: { serializedName: "azureFile", type: { name: "Composite", - className: "AzureFileVolume" - } + className: "AzureFileVolume", + }, }, emptyDir: { serializedName: "emptyDir", type: { name: "Dictionary", - value: { type: { name: "any" } } - } + value: { type: { name: "any" } }, + }, }, secret: { serializedName: "secret", type: { name: "Dictionary", - value: { type: { name: "String" } } - } + value: { type: { name: "String" } }, + }, }, gitRepo: { serializedName: "gitRepo", type: { name: "Composite", - className: "GitRepoVolume" - } - } - } - } + className: "GitRepoVolume", + }, + }, + }, + }, }; export const AzureFileVolume: coreClient.CompositeMapper = { @@ -1126,30 +1169,30 @@ export const AzureFileVolume: coreClient.CompositeMapper = { serializedName: "shareName", required: true, type: { - name: "String" - } + name: "String", + }, }, readOnly: { serializedName: "readOnly", type: { - name: "Boolean" - } + name: "Boolean", + }, }, storageAccountName: { serializedName: "storageAccountName", required: true, type: { - name: "String" - } + name: "String", + }, }, storageAccountKey: { serializedName: "storageAccountKey", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const GitRepoVolume: coreClient.CompositeMapper = { @@ -1160,55 +1203,56 @@ export const GitRepoVolume: coreClient.CompositeMapper = { directory: { serializedName: "directory", type: { - name: "String" - } + name: "String", + }, }, repository: { serializedName: "repository", required: true, type: { - name: "String" - } + name: "String", + }, }, revision: { serializedName: "revision", type: { - name: "String" - } - } - } - } -}; - -export const ContainerGroupPropertiesInstanceView: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ContainerGroupPropertiesInstanceView", - modelProperties: { - events: { - serializedName: "events", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Event" - } - } - } + name: "String", + }, }, - state: { - serializedName: "state", - readOnly: true, - type: { - name: "String" - } - } - } - } + }, + }, }; +export const ContainerGroupPropertiesInstanceView: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ContainerGroupPropertiesInstanceView", + modelProperties: { + events: { + serializedName: "events", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Event", + }, + }, + }, + }, + state: { + serializedName: "state", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, + }; + export const ContainerGroupDiagnostics: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1218,11 +1262,11 @@ export const ContainerGroupDiagnostics: coreClient.CompositeMapper = { serializedName: "logAnalytics", type: { name: "Composite", - className: "LogAnalytics" - } - } - } - } + className: "LogAnalytics", + }, + }, + }, + }, }; export const LogAnalytics: coreClient.CompositeMapper = { @@ -1234,37 +1278,37 @@ export const LogAnalytics: coreClient.CompositeMapper = { serializedName: "workspaceId", required: true, type: { - name: "String" - } + name: "String", + }, }, workspaceKey: { serializedName: "workspaceKey", required: true, type: { - name: "String" - } + name: "String", + }, }, logType: { serializedName: "logType", type: { - name: "String" - } + name: "String", + }, }, metadata: { serializedName: "metadata", type: { name: "Dictionary", - value: { type: { name: "String" } } - } + value: { type: { name: "String" } }, + }, }, workspaceResourceId: { serializedName: "workspaceResourceId", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ContainerGroupSubnetId: coreClient.CompositeMapper = { @@ -1276,17 +1320,17 @@ export const ContainerGroupSubnetId: coreClient.CompositeMapper = { serializedName: "id", required: true, type: { - name: "String" - } + name: "String", + }, }, name: { serializedName: "name", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const DnsConfiguration: coreClient.CompositeMapper = { @@ -1301,25 +1345,25 @@ export const DnsConfiguration: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, searchDomains: { serializedName: "searchDomains", type: { - name: "String" - } + name: "String", + }, }, options: { serializedName: "options", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const EncryptionProperties: coreClient.CompositeMapper = { @@ -1331,31 +1375,31 @@ export const EncryptionProperties: coreClient.CompositeMapper = { serializedName: "vaultBaseUrl", required: true, type: { - name: "String" - } + name: "String", + }, }, keyName: { serializedName: "keyName", required: true, type: { - name: "String" - } + name: "String", + }, }, keyVersion: { serializedName: "keyVersion", required: true, type: { - name: "String" - } + name: "String", + }, }, identity: { serializedName: "identity", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const InitContainerDefinition: coreClient.CompositeMapper = { @@ -1367,14 +1411,14 @@ export const InitContainerDefinition: coreClient.CompositeMapper = { serializedName: "name", required: true, type: { - name: "String" - } + name: "String", + }, }, image: { serializedName: "properties.image", type: { - name: "String" - } + name: "String", + }, }, command: { serializedName: "properties.command", @@ -1382,10 +1426,10 @@ export const InitContainerDefinition: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, environmentVariables: { serializedName: "properties.environmentVariables", @@ -1394,17 +1438,17 @@ export const InitContainerDefinition: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "EnvironmentVariable" - } - } - } + className: "EnvironmentVariable", + }, + }, + }, }, instanceView: { serializedName: "properties.instanceView", type: { name: "Composite", - className: "InitContainerPropertiesDefinitionInstanceView" - } + className: "InitContainerPropertiesDefinitionInstanceView", + }, }, volumeMounts: { serializedName: "properties.volumeMounts", @@ -1413,65 +1457,66 @@ export const InitContainerDefinition: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "VolumeMount" - } - } - } + className: "VolumeMount", + }, + }, + }, }, securityContext: { serializedName: "properties.securityContext", type: { name: "Composite", - className: "SecurityContextDefinition" - } - } - } - } -}; - -export const InitContainerPropertiesDefinitionInstanceView: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "InitContainerPropertiesDefinitionInstanceView", - modelProperties: { - restartCount: { - serializedName: "restartCount", - readOnly: true, - type: { - name: "Number" - } - }, - currentState: { - serializedName: "currentState", - type: { - name: "Composite", - className: "ContainerState" - } - }, - previousState: { - serializedName: "previousState", - type: { - name: "Composite", - className: "ContainerState" - } + className: "SecurityContextDefinition", + }, }, - events: { - serializedName: "events", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Event" - } - } - } - } - } - } + }, + }, }; +export const InitContainerPropertiesDefinitionInstanceView: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "InitContainerPropertiesDefinitionInstanceView", + modelProperties: { + restartCount: { + serializedName: "restartCount", + readOnly: true, + type: { + name: "Number", + }, + }, + currentState: { + serializedName: "currentState", + type: { + name: "Composite", + className: "ContainerState", + }, + }, + previousState: { + serializedName: "previousState", + type: { + name: "Composite", + className: "ContainerState", + }, + }, + events: { + serializedName: "events", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Event", + }, + }, + }, + }, + }, + }, + }; + export const DeploymentExtensionSpec: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1481,37 +1526,37 @@ export const DeploymentExtensionSpec: coreClient.CompositeMapper = { serializedName: "name", required: true, type: { - name: "String" - } + name: "String", + }, }, extensionType: { serializedName: "properties.extensionType", type: { - name: "String" - } + name: "String", + }, }, version: { serializedName: "properties.version", type: { - name: "String" - } + name: "String", + }, }, settings: { serializedName: "properties.settings", type: { name: "Dictionary", - value: { type: { name: "any" } } - } + value: { type: { name: "any" } }, + }, }, protectedSettings: { serializedName: "properties.protectedSettings", type: { name: "Dictionary", - value: { type: { name: "any" } } - } - } - } - } + value: { type: { name: "any" } }, + }, + }, + }, + }, }; export const ConfidentialComputeProperties: coreClient.CompositeMapper = { @@ -1522,11 +1567,54 @@ export const ConfidentialComputeProperties: coreClient.CompositeMapper = { ccePolicy: { serializedName: "ccePolicy", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, +}; + +export const ContainerGroupProfileReferenceDefinition: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ContainerGroupProfileReferenceDefinition", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String", + }, + }, + revision: { + serializedName: "revision", + type: { + name: "Number", + }, + }, + }, + }, + }; + +export const StandbyPoolProfileDefinition: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StandbyPoolProfileDefinition", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String", + }, + }, + failContainerGroupCreateOnReuseFailure: { + serializedName: "failContainerGroupCreateOnReuseFailure", + type: { + name: "Boolean", + }, + }, + }, + }, }; export const CloudError: coreClient.CompositeMapper = { @@ -1538,11 +1626,11 @@ export const CloudError: coreClient.CompositeMapper = { serializedName: "error", type: { name: "Composite", - className: "CloudErrorBody" - } - } - } - } + className: "CloudErrorBody", + }, + }, + }, + }, }; export const CloudErrorBody: coreClient.CompositeMapper = { @@ -1553,20 +1641,20 @@ export const CloudErrorBody: coreClient.CompositeMapper = { code: { serializedName: "code", type: { - name: "String" - } + name: "String", + }, }, message: { serializedName: "message", type: { - name: "String" - } + name: "String", + }, }, target: { serializedName: "target", type: { - name: "String" - } + name: "String", + }, }, details: { serializedName: "details", @@ -1575,13 +1663,13 @@ export const CloudErrorBody: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "CloudErrorBody" - } - } - } - } - } - } + className: "CloudErrorBody", + }, + }, + }, + }, + }, + }, }; export const OperationListResult: coreClient.CompositeMapper = { @@ -1596,19 +1684,19 @@ export const OperationListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Operation" - } - } - } + className: "Operation", + }, + }, + }, }, nextLink: { serializedName: "nextLink", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const Operation: coreClient.CompositeMapper = { @@ -1620,31 +1708,31 @@ export const Operation: coreClient.CompositeMapper = { serializedName: "name", required: true, type: { - name: "String" - } + name: "String", + }, }, display: { serializedName: "display", type: { name: "Composite", - className: "OperationDisplay" - } + className: "OperationDisplay", + }, }, properties: { serializedName: "properties", type: { name: "Dictionary", - value: { type: { name: "any" } } - } + value: { type: { name: "any" } }, + }, }, origin: { serializedName: "origin", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const OperationDisplay: coreClient.CompositeMapper = { @@ -1655,29 +1743,29 @@ export const OperationDisplay: coreClient.CompositeMapper = { provider: { serializedName: "provider", type: { - name: "String" - } + name: "String", + }, }, resource: { serializedName: "resource", type: { - name: "String" - } + name: "String", + }, }, operation: { serializedName: "operation", type: { - name: "String" - } + name: "String", + }, }, description: { serializedName: "description", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const UsageListResult: coreClient.CompositeMapper = { @@ -1693,13 +1781,13 @@ export const UsageListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Usage" - } - } - } - } - } - } + className: "Usage", + }, + }, + }, + }, + }, + }, }; export const Usage: coreClient.CompositeMapper = { @@ -1711,39 +1799,39 @@ export const Usage: coreClient.CompositeMapper = { serializedName: "id", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, unit: { serializedName: "unit", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, currentValue: { serializedName: "currentValue", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, limit: { serializedName: "limit", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, name: { serializedName: "name", type: { name: "Composite", - className: "UsageName" - } - } - } - } + className: "UsageName", + }, + }, + }, + }, }; export const UsageName: coreClient.CompositeMapper = { @@ -1755,18 +1843,18 @@ export const UsageName: coreClient.CompositeMapper = { serializedName: "value", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, localizedValue: { serializedName: "localizedValue", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const Logs: coreClient.CompositeMapper = { @@ -1777,11 +1865,11 @@ export const Logs: coreClient.CompositeMapper = { content: { serializedName: "content", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ContainerExecRequest: coreClient.CompositeMapper = { @@ -1792,18 +1880,18 @@ export const ContainerExecRequest: coreClient.CompositeMapper = { command: { serializedName: "command", type: { - name: "String" - } + name: "String", + }, }, terminalSize: { serializedName: "terminalSize", type: { name: "Composite", - className: "ContainerExecRequestTerminalSize" - } - } - } - } + className: "ContainerExecRequestTerminalSize", + }, + }, + }, + }, }; export const ContainerExecRequestTerminalSize: coreClient.CompositeMapper = { @@ -1814,17 +1902,17 @@ export const ContainerExecRequestTerminalSize: coreClient.CompositeMapper = { rows: { serializedName: "rows", type: { - name: "Number" - } + name: "Number", + }, }, cols: { serializedName: "cols", type: { - name: "Number" - } - } - } - } + name: "Number", + }, + }, + }, + }, }; export const ContainerExecResponse: coreClient.CompositeMapper = { @@ -1835,17 +1923,17 @@ export const ContainerExecResponse: coreClient.CompositeMapper = { webSocketUri: { serializedName: "webSocketUri", type: { - name: "String" - } + name: "String", + }, }, password: { serializedName: "password", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ContainerAttachResponse: coreClient.CompositeMapper = { @@ -1856,17 +1944,17 @@ export const ContainerAttachResponse: coreClient.CompositeMapper = { webSocketUri: { serializedName: "webSocketUri", type: { - name: "String" - } + name: "String", + }, }, password: { serializedName: "password", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const CachedImagesListResult: coreClient.CompositeMapper = { @@ -1881,19 +1969,19 @@ export const CachedImagesListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "CachedImages" - } - } - } + className: "CachedImages", + }, + }, + }, }, nextLink: { serializedName: "nextLink", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const CachedImages: coreClient.CompositeMapper = { @@ -1905,18 +1993,18 @@ export const CachedImages: coreClient.CompositeMapper = { serializedName: "osType", required: true, type: { - name: "String" - } + name: "String", + }, }, image: { serializedName: "image", required: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const CapabilitiesListResult: coreClient.CompositeMapper = { @@ -1931,19 +2019,19 @@ export const CapabilitiesListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Capabilities" - } - } - } + className: "Capabilities", + }, + }, + }, }, nextLink: { serializedName: "nextLink", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const Capabilities: coreClient.CompositeMapper = { @@ -1955,46 +2043,46 @@ export const Capabilities: coreClient.CompositeMapper = { serializedName: "resourceType", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, osType: { serializedName: "osType", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, location: { serializedName: "location", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, ipAddressType: { serializedName: "ipAddressType", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, gpu: { serializedName: "gpu", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, capabilities: { serializedName: "capabilities", type: { name: "Composite", - className: "CapabilitiesCapabilities" - } - } - } - } + className: "CapabilitiesCapabilities", + }, + }, + }, + }, }; export const CapabilitiesCapabilities: coreClient.CompositeMapper = { @@ -2006,25 +2094,198 @@ export const CapabilitiesCapabilities: coreClient.CompositeMapper = { serializedName: "maxMemoryInGB", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, maxCpu: { serializedName: "maxCpu", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, maxGpuCount: { serializedName: "maxGpuCount", readOnly: true, type: { - name: "Number" - } - } - } - } + name: "Number", + }, + }, + }, + }, +}; + +export const ContainerGroupProfileListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerGroupProfileListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerGroupProfile", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ContainerGroupProfileProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerGroupProfileProperties", + modelProperties: { + containers: { + serializedName: "properties.containers", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Container", + }, + }, + }, + }, + imageRegistryCredentials: { + serializedName: "properties.imageRegistryCredentials", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ImageRegistryCredential", + }, + }, + }, + }, + restartPolicy: { + serializedName: "properties.restartPolicy", + type: { + name: "String", + }, + }, + ipAddress: { + serializedName: "properties.ipAddress", + type: { + name: "Composite", + className: "IpAddress", + }, + }, + osType: { + serializedName: "properties.osType", + required: true, + type: { + name: "String", + }, + }, + volumes: { + serializedName: "properties.volumes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Volume", + }, + }, + }, + }, + diagnostics: { + serializedName: "properties.diagnostics", + type: { + name: "Composite", + className: "ContainerGroupDiagnostics", + }, + }, + sku: { + serializedName: "properties.sku", + type: { + name: "String", + }, + }, + encryptionProperties: { + serializedName: "properties.encryptionProperties", + type: { + name: "Composite", + className: "EncryptionProperties", + }, + }, + initContainers: { + serializedName: "properties.initContainers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InitContainerDefinition", + }, + }, + }, + }, + extensions: { + serializedName: "properties.extensions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DeploymentExtensionSpec", + }, + }, + }, + }, + confidentialComputeProperties: { + serializedName: "properties.confidentialComputeProperties", + type: { + name: "Composite", + className: "ConfidentialComputeProperties", + }, + }, + priority: { + serializedName: "properties.priority", + type: { + name: "String", + }, + }, + revision: { + serializedName: "properties.revision", + readOnly: true, + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const ContainerGroupProfilePatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerGroupProfilePatch", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + }, + }, }; export const ContainerGroup: coreClient.CompositeMapper = { @@ -2033,7 +2294,18 @@ export const ContainerGroup: coreClient.CompositeMapper = { className: "ContainerGroup", modelProperties: { ...Resource.type.modelProperties, - ...ContainerGroupProperties.type.modelProperties - } - } + ...ContainerGroupProperties.type.modelProperties, + }, + }, +}; + +export const ContainerGroupProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerGroupProfile", + modelProperties: { + ...Resource.type.modelProperties, + ...ContainerGroupProfileProperties.type.modelProperties, + }, + }, }; diff --git a/sdk/containerinstance/arm-containerinstance/src/models/parameters.ts b/sdk/containerinstance/arm-containerinstance/src/models/parameters.ts index e0cf5d2709cf..913e78247540 100644 --- a/sdk/containerinstance/arm-containerinstance/src/models/parameters.ts +++ b/sdk/containerinstance/arm-containerinstance/src/models/parameters.ts @@ -9,12 +9,14 @@ import { OperationParameter, OperationURLParameter, - OperationQueryParameter + OperationQueryParameter, } from "@azure/core-client"; import { ContainerGroup as ContainerGroupMapper, Resource as ResourceMapper, - ContainerExecRequest as ContainerExecRequestMapper + ContainerExecRequest as ContainerExecRequestMapper, + ContainerGroupProfile as ContainerGroupProfileMapper, + ContainerGroupProfilePatch as ContainerGroupProfilePatchMapper, } from "../models/mappers"; export const accept: OperationParameter = { @@ -24,9 +26,9 @@ export const accept: OperationParameter = { isConstant: true, serializedName: "Accept", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const $host: OperationURLParameter = { @@ -35,10 +37,10 @@ export const $host: OperationURLParameter = { serializedName: "$host", required: true, type: { - name: "String" - } + name: "String", + }, }, - skipEncoding: true + skipEncoding: true, }; export const subscriptionId: OperationURLParameter = { @@ -47,32 +49,36 @@ export const subscriptionId: OperationURLParameter = { serializedName: "subscriptionId", required: true, type: { - name: "String" - } - } + name: "Uuid", + }, + }, }; export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2023-05-01", + defaultValue: "2024-05-01-preview", isConstant: true, serializedName: "api-version", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const resourceGroupName: OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { + constraints: { + MaxLength: 90, + MinLength: 1, + }, serializedName: "resourceGroupName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const containerGroupName: OperationURLParameter = { @@ -81,9 +87,9 @@ export const containerGroupName: OperationURLParameter = { serializedName: "containerGroupName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const contentType: OperationParameter = { @@ -93,19 +99,19 @@ export const contentType: OperationParameter = { isConstant: true, serializedName: "Content-Type", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const containerGroup: OperationParameter = { parameterPath: "containerGroup", - mapper: ContainerGroupMapper + mapper: ContainerGroupMapper, }; export const resource: OperationParameter = { parameterPath: "resource", - mapper: ResourceMapper + mapper: ResourceMapper, }; export const nextLink: OperationURLParameter = { @@ -114,21 +120,24 @@ export const nextLink: OperationURLParameter = { serializedName: "nextLink", required: true, type: { - name: "String" - } + name: "String", + }, }, - skipEncoding: true + skipEncoding: true, }; export const location: OperationURLParameter = { parameterPath: "location", mapper: { + constraints: { + MinLength: 1, + }, serializedName: "location", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const containerName: OperationURLParameter = { @@ -137,9 +146,9 @@ export const containerName: OperationURLParameter = { serializedName: "containerName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const tail: OperationQueryParameter = { @@ -147,9 +156,9 @@ export const tail: OperationQueryParameter = { mapper: { serializedName: "tail", type: { - name: "Number" - } - } + name: "Number", + }, + }, }; export const timestamps: OperationQueryParameter = { @@ -157,14 +166,14 @@ export const timestamps: OperationQueryParameter = { mapper: { serializedName: "timestamps", type: { - name: "Boolean" - } - } + name: "Boolean", + }, + }, }; export const containerExecRequest: OperationParameter = { parameterPath: "containerExecRequest", - mapper: ContainerExecRequestMapper + mapper: ContainerExecRequestMapper, }; export const virtualNetworkName: OperationURLParameter = { @@ -173,9 +182,9 @@ export const virtualNetworkName: OperationURLParameter = { serializedName: "virtualNetworkName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const subnetName: OperationURLParameter = { @@ -184,7 +193,44 @@ export const subnetName: OperationURLParameter = { serializedName: "subnetName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, +}; + +export const containerGroupProfileName: OperationURLParameter = { + parameterPath: "containerGroupProfileName", + mapper: { + constraints: { + Pattern: new RegExp("^(?!.*--)[a-z0-9]([-a-z0-9]*[a-z0-9])?$"), + MaxLength: 63, + MinLength: 1, + }, + serializedName: "containerGroupProfileName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const containerGroupProfile: OperationParameter = { + parameterPath: "containerGroupProfile", + mapper: ContainerGroupProfileMapper, +}; + +export const properties: OperationParameter = { + parameterPath: "properties", + mapper: ContainerGroupProfilePatchMapper, +}; + +export const revisionNumber: OperationURLParameter = { + parameterPath: "revisionNumber", + mapper: { + serializedName: "revisionNumber", + required: true, + type: { + name: "String", + }, + }, }; diff --git a/sdk/containerinstance/arm-containerinstance/src/operations/containerGroupProfileOperations.ts b/sdk/containerinstance/arm-containerinstance/src/operations/containerGroupProfileOperations.ts new file mode 100644 index 000000000000..884cef58a568 --- /dev/null +++ b/sdk/containerinstance/arm-containerinstance/src/operations/containerGroupProfileOperations.ts @@ -0,0 +1,255 @@ +/* + * 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ContainerGroupProfileOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerInstanceManagementClient } from "../containerInstanceManagementClient"; +import { + ContainerGroupProfile, + ContainerGroupProfileListAllRevisionsNextOptionalParams, + ContainerGroupProfileListAllRevisionsOptionalParams, + ContainerGroupProfileListAllRevisionsResponse, + ContainerGroupProfileGetByRevisionNumberOptionalParams, + ContainerGroupProfileGetByRevisionNumberResponse, + ContainerGroupProfileListAllRevisionsNextResponse, +} from "../models"; + +/// +/** Class containing ContainerGroupProfileOperations operations. */ +export class ContainerGroupProfileOperationsImpl + implements ContainerGroupProfileOperations +{ + private readonly client: ContainerInstanceManagementClient; + + /** + * Initialize a new instance of the class ContainerGroupProfileOperations class. + * @param client Reference to the service client + */ + constructor(client: ContainerInstanceManagementClient) { + this.client = client; + } + + /** + * Get a list of all the revisions of the specified container group profile in the given subscription + * and resource group. This operation returns properties of each revision of the specified container + * group profile including containers, image registry credentials, restart policy, IP address type, OS + * type volumes, revision number, etc. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerGroupProfileName The name of the container group profile. + * @param options The options parameters. + */ + public listAllRevisions( + resourceGroupName: string, + containerGroupProfileName: string, + options?: ContainerGroupProfileListAllRevisionsOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listAllRevisionsPagingAll( + resourceGroupName, + containerGroupProfileName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listAllRevisionsPagingPage( + resourceGroupName, + containerGroupProfileName, + options, + settings, + ); + }, + }; + } + + private async *listAllRevisionsPagingPage( + resourceGroupName: string, + containerGroupProfileName: string, + options?: ContainerGroupProfileListAllRevisionsOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ContainerGroupProfileListAllRevisionsResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listAllRevisions( + resourceGroupName, + containerGroupProfileName, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listAllRevisionsNext( + resourceGroupName, + containerGroupProfileName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listAllRevisionsPagingAll( + resourceGroupName: string, + containerGroupProfileName: string, + options?: ContainerGroupProfileListAllRevisionsOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listAllRevisionsPagingPage( + resourceGroupName, + containerGroupProfileName, + options, + )) { + yield* page; + } + } + + /** + * Get a list of all the revisions of the specified container group profile in the given subscription + * and resource group. This operation returns properties of each revision of the specified container + * group profile including containers, image registry credentials, restart policy, IP address type, OS + * type volumes, revision number, etc. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerGroupProfileName The name of the container group profile. + * @param options The options parameters. + */ + private _listAllRevisions( + resourceGroupName: string, + containerGroupProfileName: string, + options?: ContainerGroupProfileListAllRevisionsOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerGroupProfileName, options }, + listAllRevisionsOperationSpec, + ); + } + + /** + * Gets the properties of the specified revision of the container group profile in the given + * subscription and resource group. The operation returns the properties of container group profile + * including containers, image registry credentials, restart policy, IP address type, OS type, volumes, + * current revision number, etc. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerGroupProfileName The name of the container group profile. + * @param revisionNumber The revision number of the container group profile. + * @param options The options parameters. + */ + getByRevisionNumber( + resourceGroupName: string, + containerGroupProfileName: string, + revisionNumber: string, + options?: ContainerGroupProfileGetByRevisionNumberOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerGroupProfileName, revisionNumber, options }, + getByRevisionNumberOperationSpec, + ); + } + + /** + * ListAllRevisionsNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerGroupProfileName The name of the container group profile. + * @param nextLink The nextLink from the previous successful call to the ListAllRevisions method. + * @param options The options parameters. + */ + private _listAllRevisionsNext( + resourceGroupName: string, + containerGroupProfileName: string, + nextLink: string, + options?: ContainerGroupProfileListAllRevisionsNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerGroupProfileName, nextLink, options }, + listAllRevisionsNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listAllRevisionsOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}/revisions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContainerGroupProfileListResult, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerGroupProfileName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getByRevisionNumberOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}/revisions/{revisionNumber}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContainerGroupProfile, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerGroupProfileName, + Parameters.revisionNumber, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listAllRevisionsNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContainerGroupProfileListResult, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.containerGroupProfileName, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/containerinstance/arm-containerinstance/src/operations/containerGroupProfiles.ts b/sdk/containerinstance/arm-containerinstance/src/operations/containerGroupProfiles.ts new file mode 100644 index 000000000000..6fd320807eb3 --- /dev/null +++ b/sdk/containerinstance/arm-containerinstance/src/operations/containerGroupProfiles.ts @@ -0,0 +1,485 @@ +/* + * 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ContainerGroupProfiles } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerInstanceManagementClient } from "../containerInstanceManagementClient"; +import { + ContainerGroupProfile, + ContainerGroupProfilesListNextOptionalParams, + ContainerGroupProfilesListOptionalParams, + ContainerGroupProfilesListResponse, + ContainerGroupProfilesListByResourceGroupNextOptionalParams, + ContainerGroupProfilesListByResourceGroupOptionalParams, + ContainerGroupProfilesListByResourceGroupResponse, + ContainerGroupProfilesGetOptionalParams, + ContainerGroupProfilesGetResponse, + ContainerGroupProfilesCreateOrUpdateOptionalParams, + ContainerGroupProfilesCreateOrUpdateResponse, + ContainerGroupProfilePatch, + ContainerGroupProfilesPatchOptionalParams, + ContainerGroupProfilesPatchResponse, + ContainerGroupProfilesDeleteOptionalParams, + ContainerGroupProfilesListNextResponse, + ContainerGroupProfilesListByResourceGroupNextResponse, +} from "../models"; + +/// +/** Class containing ContainerGroupProfiles operations. */ +export class ContainerGroupProfilesImpl implements ContainerGroupProfiles { + private readonly client: ContainerInstanceManagementClient; + + /** + * Initialize a new instance of the class ContainerGroupProfiles class. + * @param client Reference to the service client + */ + constructor(client: ContainerInstanceManagementClient) { + this.client = client; + } + + /** + * Get a list of container group profiles in the specified subscription. This operation returns + * properties of each container group profile including containers, image registry credentials, restart + * policy, IP address type, OS type,volumes,current revision number, etc. + * @param options The options parameters. + */ + public list( + options?: ContainerGroupProfilesListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(options, settings); + }, + }; + } + + private async *listPagingPage( + options?: ContainerGroupProfilesListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ContainerGroupProfilesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + options?: ContainerGroupProfilesListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * Get a list of container group profiles in a specified subscription and resource group. This + * operation returns properties of each container group profile including containers, image registry + * credentials, restart policy, IP address type, OS type volumes, current revision number, etc. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: ContainerGroupProfilesListByResourceGroupOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings, + ); + }, + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: ContainerGroupProfilesListByResourceGroupOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ContainerGroupProfilesListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: ContainerGroupProfilesListByResourceGroupOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options, + )) { + yield* page; + } + } + + /** + * Get a list of container group profiles in the specified subscription. This operation returns + * properties of each container group profile including containers, image registry credentials, restart + * policy, IP address type, OS type,volumes,current revision number, etc. + * @param options The options parameters. + */ + private _list( + options?: ContainerGroupProfilesListOptionalParams, + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * Get a list of container group profiles in a specified subscription and resource group. This + * operation returns properties of each container group profile including containers, image registry + * credentials, restart policy, IP address type, OS type volumes, current revision number, etc. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: ContainerGroupProfilesListByResourceGroupOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec, + ); + } + + /** + * Gets the properties of the specified container group profile in the specified subscription and + * resource group. The operation returns the properties of container group profile including + * containers, image registry credentials, restart policy, IP address type, OS type, volumes, current + * revision number, etc. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerGroupProfileName The name of the container group profile. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + containerGroupProfileName: string, + options?: ContainerGroupProfilesGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerGroupProfileName, options }, + getOperationSpec, + ); + } + + /** + * Create or update container group profiles with specified configurations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerGroupProfileName The name of the container group profile. + * @param containerGroupProfile The properties of the container group profile to be created or updated. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + containerGroupProfileName: string, + containerGroupProfile: ContainerGroupProfile, + options?: ContainerGroupProfilesCreateOrUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + containerGroupProfileName, + containerGroupProfile, + options, + }, + createOrUpdateOperationSpec, + ); + } + + /** + * Patches container group profile with specified properties. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerGroupProfileName The name of the container group profile. + * @param properties The container group profile properties that need to be updated. + * @param options The options parameters. + */ + patch( + resourceGroupName: string, + containerGroupProfileName: string, + properties: ContainerGroupProfilePatch, + options?: ContainerGroupProfilesPatchOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerGroupProfileName, properties, options }, + patchOperationSpec, + ); + } + + /** + * Delete the specified container group profile in the specified subscription and resource group. The + * operation does not delete other resources provided by the user, such as volumes. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerGroupProfileName The name of the container group profile. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + containerGroupProfileName: string, + options?: ContainerGroupProfilesDeleteOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerGroupProfileName, options }, + deleteOperationSpec, + ); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: ContainerGroupProfilesListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec, + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: ContainerGroupProfilesListByResourceGroupNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/containerGroupProfiles", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContainerGroupProfileListResult, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer, +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContainerGroupProfileListResult, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContainerGroupProfile, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerGroupProfileName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ContainerGroupProfile, + }, + 201: { + bodyMapper: Mappers.ContainerGroupProfile, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + requestBody: Parameters.containerGroupProfile, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerGroupProfileName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const patchOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.ContainerGroupProfile, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + requestBody: Parameters.properties, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerGroupProfileName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerGroupProfileName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContainerGroupProfileListResult, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContainerGroupProfileListResult, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/containerinstance/arm-containerinstance/src/operations/containerGroups.ts b/sdk/containerinstance/arm-containerinstance/src/operations/containerGroups.ts index 94cb7ea403cf..2cabb797de0d 100644 --- a/sdk/containerinstance/arm-containerinstance/src/operations/containerGroups.ts +++ b/sdk/containerinstance/arm-containerinstance/src/operations/containerGroups.ts @@ -16,7 +16,7 @@ import { ContainerInstanceManagementClient } from "../containerInstanceManagemen import { SimplePollerLike, OperationState, - createHttpPoller + createHttpPoller, } from "@azure/core-lro"; import { createLroSpec } from "../lroImpl"; import { @@ -42,7 +42,7 @@ import { ContainerGroupsGetOutboundNetworkDependenciesEndpointsOptionalParams, ContainerGroupsGetOutboundNetworkDependenciesEndpointsResponse, ContainerGroupsListNextResponse, - ContainerGroupsListByResourceGroupNextResponse + ContainerGroupsListByResourceGroupNextResponse, } from "../models"; /// @@ -65,7 +65,7 @@ export class ContainerGroupsImpl implements ContainerGroups { * @param options The options parameters. */ public list( - options?: ContainerGroupsListOptionalParams + options?: ContainerGroupsListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(options); return { @@ -80,13 +80,13 @@ export class ContainerGroupsImpl implements ContainerGroups { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(options, settings); - } + }, }; } private async *listPagingPage( options?: ContainerGroupsListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: ContainerGroupsListResponse; let continuationToken = settings?.continuationToken; @@ -107,7 +107,7 @@ export class ContainerGroupsImpl implements ContainerGroups { } private async *listPagingAll( - options?: ContainerGroupsListOptionalParams + options?: ContainerGroupsListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(options)) { yield* page; @@ -118,12 +118,12 @@ export class ContainerGroupsImpl implements ContainerGroups { * Get a list of container groups in a specified subscription and resource group. This operation * returns properties of each container group including containers, image registry credentials, restart * policy, IP address type, OS type, state, and volumes. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ public listByResourceGroup( resourceGroupName: string, - options?: ContainerGroupsListByResourceGroupOptionalParams + options?: ContainerGroupsListByResourceGroupOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); return { @@ -140,16 +140,16 @@ export class ContainerGroupsImpl implements ContainerGroups { return this.listByResourceGroupPagingPage( resourceGroupName, options, - settings + settings, ); - } + }, }; } private async *listByResourceGroupPagingPage( resourceGroupName: string, options?: ContainerGroupsListByResourceGroupOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: ContainerGroupsListByResourceGroupResponse; let continuationToken = settings?.continuationToken; @@ -164,7 +164,7 @@ export class ContainerGroupsImpl implements ContainerGroups { result = await this._listByResourceGroupNext( resourceGroupName, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -175,11 +175,11 @@ export class ContainerGroupsImpl implements ContainerGroups { private async *listByResourceGroupPagingAll( resourceGroupName: string, - options?: ContainerGroupsListByResourceGroupOptionalParams + options?: ContainerGroupsListByResourceGroupOptionalParams, ): AsyncIterableIterator { for await (const page of this.listByResourceGroupPagingPage( resourceGroupName, - options + options, )) { yield* page; } @@ -192,7 +192,7 @@ export class ContainerGroupsImpl implements ContainerGroups { * @param options The options parameters. */ private _list( - options?: ContainerGroupsListOptionalParams + options?: ContainerGroupsListOptionalParams, ): Promise { return this.client.sendOperationRequest({ options }, listOperationSpec); } @@ -201,16 +201,16 @@ export class ContainerGroupsImpl implements ContainerGroups { * Get a list of container groups in a specified subscription and resource group. This operation * returns properties of each container group including containers, image registry credentials, restart * policy, IP address type, OS type, state, and volumes. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ private _listByResourceGroup( resourceGroupName: string, - options?: ContainerGroupsListByResourceGroupOptionalParams + options?: ContainerGroupsListByResourceGroupOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, options }, - listByResourceGroupOperationSpec + listByResourceGroupOperationSpec, ); } @@ -218,24 +218,24 @@ export class ContainerGroupsImpl implements ContainerGroups { * Gets the properties of the specified container group in the specified subscription and resource * group. The operation returns the properties of each container group including containers, image * registry credentials, restart policy, IP address type, OS type, state, and volumes. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerGroupName The name of the container group. * @param options The options parameters. */ get( resourceGroupName: string, containerGroupName: string, - options?: ContainerGroupsGetOptionalParams + options?: ContainerGroupsGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, containerGroupName, options }, - getOperationSpec + getOperationSpec, ); } /** * Create or update container groups with specified configurations. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerGroupName The name of the container group. * @param containerGroup The properties of the container group to be created or updated. * @param options The options parameters. @@ -244,7 +244,7 @@ export class ContainerGroupsImpl implements ContainerGroups { resourceGroupName: string, containerGroupName: string, containerGroup: ContainerGroup, - options?: ContainerGroupsCreateOrUpdateOptionalParams + options?: ContainerGroupsCreateOrUpdateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -253,21 +253,20 @@ export class ContainerGroupsImpl implements ContainerGroups { > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -276,8 +275,8 @@ export class ContainerGroupsImpl implements ContainerGroups { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -285,22 +284,22 @@ export class ContainerGroupsImpl implements ContainerGroups { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, containerGroupName, containerGroup, options }, - spec: createOrUpdateOperationSpec + spec: createOrUpdateOperationSpec, }); const poller = await createHttpPoller< ContainerGroupsCreateOrUpdateResponse, OperationState >(lro, { restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -308,7 +307,7 @@ export class ContainerGroupsImpl implements ContainerGroups { /** * Create or update container groups with specified configurations. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerGroupName The name of the container group. * @param containerGroup The properties of the container group to be created or updated. * @param options The options parameters. @@ -317,20 +316,20 @@ export class ContainerGroupsImpl implements ContainerGroups { resourceGroupName: string, containerGroupName: string, containerGroup: ContainerGroup, - options?: ContainerGroupsCreateOrUpdateOptionalParams + options?: ContainerGroupsCreateOrUpdateOptionalParams, ): Promise { const poller = await this.beginCreateOrUpdate( resourceGroupName, containerGroupName, containerGroup, - options + options, ); return poller.pollUntilDone(); } /** * Updates container group tags with specified values. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerGroupName The name of the container group. * @param resource The container group resource with just the tags to be updated. * @param options The options parameters. @@ -339,25 +338,25 @@ export class ContainerGroupsImpl implements ContainerGroups { resourceGroupName: string, containerGroupName: string, resource: Resource, - options?: ContainerGroupsUpdateOptionalParams + options?: ContainerGroupsUpdateOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, containerGroupName, resource, options }, - updateOperationSpec + updateOperationSpec, ); } /** * Delete the specified container group in the specified subscription and resource group. The operation * does not delete other resources provided by the user, such as volumes. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerGroupName The name of the container group. * @param options The options parameters. */ async beginDelete( resourceGroupName: string, containerGroupName: string, - options?: ContainerGroupsDeleteOptionalParams + options?: ContainerGroupsDeleteOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -366,21 +365,20 @@ export class ContainerGroupsImpl implements ContainerGroups { > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -389,8 +387,8 @@ export class ContainerGroupsImpl implements ContainerGroups { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -398,22 +396,22 @@ export class ContainerGroupsImpl implements ContainerGroups { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, containerGroupName, options }, - spec: deleteOperationSpec + spec: deleteOperationSpec, }); const poller = await createHttpPoller< ContainerGroupsDeleteResponse, OperationState >(lro, { restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -422,19 +420,19 @@ export class ContainerGroupsImpl implements ContainerGroups { /** * Delete the specified container group in the specified subscription and resource group. The operation * does not delete other resources provided by the user, such as volumes. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerGroupName The name of the container group. * @param options The options parameters. */ async beginDeleteAndWait( resourceGroupName: string, containerGroupName: string, - options?: ContainerGroupsDeleteOptionalParams + options?: ContainerGroupsDeleteOptionalParams, ): Promise { const poller = await this.beginDelete( resourceGroupName, containerGroupName, - options + options, ); return poller.pollUntilDone(); } @@ -442,32 +440,31 @@ export class ContainerGroupsImpl implements ContainerGroups { /** * Restarts all containers in a container group in place. If container image has updates, new image * will be downloaded. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerGroupName The name of the container group. * @param options The options parameters. */ async beginRestart( resourceGroupName: string, containerGroupName: string, - options?: ContainerGroupsRestartOptionalParams + options?: ContainerGroupsRestartOptionalParams, ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -476,8 +473,8 @@ export class ContainerGroupsImpl implements ContainerGroups { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -485,19 +482,19 @@ export class ContainerGroupsImpl implements ContainerGroups { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, containerGroupName, options }, - spec: restartOperationSpec + spec: restartOperationSpec, }); const poller = await createHttpPoller>(lro, { restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -506,19 +503,19 @@ export class ContainerGroupsImpl implements ContainerGroups { /** * Restarts all containers in a container group in place. If container image has updates, new image * will be downloaded. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerGroupName The name of the container group. * @param options The options parameters. */ async beginRestartAndWait( resourceGroupName: string, containerGroupName: string, - options?: ContainerGroupsRestartOptionalParams + options?: ContainerGroupsRestartOptionalParams, ): Promise { const poller = await this.beginRestart( resourceGroupName, containerGroupName, - options + options, ); return poller.pollUntilDone(); } @@ -526,50 +523,49 @@ export class ContainerGroupsImpl implements ContainerGroups { /** * Stops all containers in a container group. Compute resources will be deallocated and billing will * stop. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerGroupName The name of the container group. * @param options The options parameters. */ stop( resourceGroupName: string, containerGroupName: string, - options?: ContainerGroupsStopOptionalParams + options?: ContainerGroupsStopOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, containerGroupName, options }, - stopOperationSpec + stopOperationSpec, ); } /** * Starts all containers in a container group. Compute resources will be allocated and billing will * start. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerGroupName The name of the container group. * @param options The options parameters. */ async beginStart( resourceGroupName: string, containerGroupName: string, - options?: ContainerGroupsStartOptionalParams + options?: ContainerGroupsStartOptionalParams, ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -578,8 +574,8 @@ export class ContainerGroupsImpl implements ContainerGroups { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -587,19 +583,19 @@ export class ContainerGroupsImpl implements ContainerGroups { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, containerGroupName, options }, - spec: startOperationSpec + spec: startOperationSpec, }); const poller = await createHttpPoller>(lro, { restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -608,19 +604,19 @@ export class ContainerGroupsImpl implements ContainerGroups { /** * Starts all containers in a container group. Compute resources will be allocated and billing will * start. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerGroupName The name of the container group. * @param options The options parameters. */ async beginStartAndWait( resourceGroupName: string, containerGroupName: string, - options?: ContainerGroupsStartOptionalParams + options?: ContainerGroupsStartOptionalParams, ): Promise { const poller = await this.beginStart( resourceGroupName, containerGroupName, - options + options, ); return poller.pollUntilDone(); } @@ -628,18 +624,18 @@ export class ContainerGroupsImpl implements ContainerGroups { /** * Gets all the network dependencies for this container group to allow complete control of network * setting and configuration. For container groups, this will always be an empty list. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerGroupName The name of the container group. * @param options The options parameters. */ getOutboundNetworkDependenciesEndpoints( resourceGroupName: string, containerGroupName: string, - options?: ContainerGroupsGetOutboundNetworkDependenciesEndpointsOptionalParams + options?: ContainerGroupsGetOutboundNetworkDependenciesEndpointsOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, containerGroupName, options }, - getOutboundNetworkDependenciesEndpointsOperationSpec + getOutboundNetworkDependenciesEndpointsOperationSpec, ); } @@ -650,28 +646,28 @@ export class ContainerGroupsImpl implements ContainerGroups { */ private _listNext( nextLink: string, - options?: ContainerGroupsListNextOptionalParams + options?: ContainerGroupsListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { nextLink, options }, - listNextOperationSpec + listNextOperationSpec, ); } /** * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. * @param options The options parameters. */ private _listByResourceGroupNext( resourceGroupName: string, nextLink: string, - options?: ContainerGroupsListByResourceGroupNextOptionalParams + options?: ContainerGroupsListByResourceGroupNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec + listByResourceGroupNextOperationSpec, ); } } @@ -679,85 +675,81 @@ export class ContainerGroupsImpl implements ContainerGroups { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/containerGroups", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/containerGroups", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ContainerGroupListResult + bodyMapper: Mappers.ContainerGroupListResult, }, default: { - bodyMapper: Mappers.CloudError - } + bodyMapper: Mappers.CloudError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], - serializer + serializer, }; const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ContainerGroupListResult + bodyMapper: Mappers.ContainerGroupListResult, }, default: { - bodyMapper: Mappers.CloudError - } + bodyMapper: Mappers.CloudError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName + Parameters.resourceGroupName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ContainerGroup + bodyMapper: Mappers.ContainerGroup, }, default: { - bodyMapper: Mappers.CloudError - } + bodyMapper: Mappers.CloudError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.containerGroupName + Parameters.containerGroupName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.ContainerGroup + bodyMapper: Mappers.ContainerGroup, }, 201: { - bodyMapper: Mappers.ContainerGroup + bodyMapper: Mappers.ContainerGroup, }, 202: { - bodyMapper: Mappers.ContainerGroup + bodyMapper: Mappers.ContainerGroup, }, 204: { - bodyMapper: Mappers.ContainerGroup + bodyMapper: Mappers.ContainerGroup, }, default: { - bodyMapper: Mappers.CloudError - } + bodyMapper: Mappers.CloudError, + }, }, requestBody: Parameters.containerGroup, queryParameters: [Parameters.apiVersion], @@ -765,23 +757,22 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.containerGroupName + Parameters.containerGroupName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}", httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.ContainerGroup + bodyMapper: Mappers.ContainerGroup, }, default: { - bodyMapper: Mappers.CloudError - } + bodyMapper: Mappers.CloudError, + }, }, requestBody: Parameters.resource, queryParameters: [Parameters.apiVersion], @@ -789,46 +780,44 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.containerGroupName + Parameters.containerGroupName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}", httpMethod: "DELETE", responses: { 200: { - bodyMapper: Mappers.ContainerGroup + bodyMapper: Mappers.ContainerGroup, }, 201: { - bodyMapper: Mappers.ContainerGroup + bodyMapper: Mappers.ContainerGroup, }, 202: { - bodyMapper: Mappers.ContainerGroup + bodyMapper: Mappers.ContainerGroup, }, 204: { - bodyMapper: Mappers.ContainerGroup + bodyMapper: Mappers.ContainerGroup, }, default: { - bodyMapper: Mappers.CloudError - } + bodyMapper: Mappers.CloudError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.containerGroupName + Parameters.containerGroupName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const restartOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/restart", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/restart", httpMethod: "POST", responses: { 200: {}, @@ -836,42 +825,40 @@ const restartOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError - } + bodyMapper: Mappers.CloudError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.containerGroupName + Parameters.containerGroupName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const stopOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/stop", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/stop", httpMethod: "POST", responses: { 204: {}, default: { - bodyMapper: Mappers.CloudError - } + bodyMapper: Mappers.CloudError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.containerGroupName + Parameters.containerGroupName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const startOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/start", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/start", httpMethod: "POST", responses: { 200: {}, @@ -879,79 +866,79 @@ const startOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.containerGroupName - ], - headerParameters: [Parameters.accept], - serializer -}; -const getOutboundNetworkDependenciesEndpointsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/outboundNetworkDependenciesEndpoints", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: { - type: { name: "Sequence", element: { type: { name: "String" } } } - } + bodyMapper: Mappers.CloudError, }, - default: { - bodyMapper: Mappers.CloudError - } }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.containerGroupName + Parameters.containerGroupName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; +const getOutboundNetworkDependenciesEndpointsOperationSpec: coreClient.OperationSpec = + { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/outboundNetworkDependenciesEndpoints", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: { + type: { name: "Sequence", element: { type: { name: "String" } } }, + }, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerGroupName, + ], + headerParameters: [Parameters.accept], + serializer, + }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ContainerGroupListResult + bodyMapper: Mappers.ContainerGroupListResult, }, default: { - bodyMapper: Mappers.CloudError - } + bodyMapper: Mappers.CloudError, + }, }, urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.nextLink + Parameters.nextLink, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ContainerGroupListResult + bodyMapper: Mappers.ContainerGroupListResult, }, default: { - bodyMapper: Mappers.CloudError - } + bodyMapper: Mappers.CloudError, + }, }, urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.nextLink + Parameters.nextLink, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/containerinstance/arm-containerinstance/src/operations/containers.ts b/sdk/containerinstance/arm-containerinstance/src/operations/containers.ts index 38aad41bea55..d1a13762e8b0 100644 --- a/sdk/containerinstance/arm-containerinstance/src/operations/containers.ts +++ b/sdk/containerinstance/arm-containerinstance/src/operations/containers.ts @@ -18,7 +18,7 @@ import { ContainersExecuteCommandOptionalParams, ContainersExecuteCommandResponse, ContainersAttachOptionalParams, - ContainersAttachResponse + ContainersAttachResponse, } from "../models"; /** Class containing Containers operations. */ @@ -35,7 +35,7 @@ export class ContainersImpl implements Containers { /** * Get the logs for a specified container instance in a specified resource group and container group. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @param options The options parameters. @@ -44,18 +44,18 @@ export class ContainersImpl implements Containers { resourceGroupName: string, containerGroupName: string, containerName: string, - options?: ContainersListLogsOptionalParams + options?: ContainersListLogsOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, containerGroupName, containerName, options }, - listLogsOperationSpec + listLogsOperationSpec, ); } /** * Executes a command for a specific container instance in a specified resource group and container * group. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @param containerExecRequest The request for the exec command. @@ -66,7 +66,7 @@ export class ContainersImpl implements Containers { containerGroupName: string, containerName: string, containerExecRequest: ContainerExecRequest, - options?: ContainersExecuteCommandOptionalParams + options?: ContainersExecuteCommandOptionalParams, ): Promise { return this.client.sendOperationRequest( { @@ -74,16 +74,16 @@ export class ContainersImpl implements Containers { containerGroupName, containerName, containerExecRequest, - options + options, }, - executeCommandOperationSpec + executeCommandOperationSpec, ); } /** * Attach to the output stream of a specific container instance in a specified resource group and * container group. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @param options The options parameters. @@ -92,11 +92,11 @@ export class ContainersImpl implements Containers { resourceGroupName: string, containerGroupName: string, containerName: string, - options?: ContainersAttachOptionalParams + options?: ContainersAttachOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, containerGroupName, containerName, options }, - attachOperationSpec + attachOperationSpec, ); } } @@ -104,43 +104,41 @@ export class ContainersImpl implements Containers { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listLogsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/logs", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/logs", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.Logs + bodyMapper: Mappers.Logs, }, default: { - bodyMapper: Mappers.CloudError - } + bodyMapper: Mappers.CloudError, + }, }, queryParameters: [ Parameters.apiVersion, Parameters.tail, - Parameters.timestamps + Parameters.timestamps, ], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.containerGroupName, - Parameters.containerName + Parameters.containerName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const executeCommandOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/exec", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/exec", httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.ContainerExecResponse + bodyMapper: Mappers.ContainerExecResponse, }, default: { - bodyMapper: Mappers.CloudError - } + bodyMapper: Mappers.CloudError, + }, }, requestBody: Parameters.containerExecRequest, queryParameters: [Parameters.apiVersion], @@ -149,23 +147,22 @@ const executeCommandOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.containerGroupName, - Parameters.containerName + Parameters.containerName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const attachOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/attach", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/attach", httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.ContainerAttachResponse + bodyMapper: Mappers.ContainerAttachResponse, }, default: { - bodyMapper: Mappers.CloudError - } + bodyMapper: Mappers.CloudError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -173,8 +170,8 @@ const attachOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.containerGroupName, - Parameters.containerName + Parameters.containerName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/containerinstance/arm-containerinstance/src/operations/index.ts b/sdk/containerinstance/arm-containerinstance/src/operations/index.ts index 84770e8d339d..7023c151ec9a 100644 --- a/sdk/containerinstance/arm-containerinstance/src/operations/index.ts +++ b/sdk/containerinstance/arm-containerinstance/src/operations/index.ts @@ -11,3 +11,5 @@ export * from "./operations"; export * from "./location"; export * from "./containers"; export * from "./subnetServiceAssociationLink"; +export * from "./containerGroupProfiles"; +export * from "./containerGroupProfileOperations"; diff --git a/sdk/containerinstance/arm-containerinstance/src/operations/location.ts b/sdk/containerinstance/arm-containerinstance/src/operations/location.ts index 302be880d41c..d793a8ff6952 100644 --- a/sdk/containerinstance/arm-containerinstance/src/operations/location.ts +++ b/sdk/containerinstance/arm-containerinstance/src/operations/location.ts @@ -26,7 +26,7 @@ import { LocationListCapabilitiesOptionalParams, LocationListCapabilitiesResponse, LocationListCachedImagesNextResponse, - LocationListCapabilitiesNextResponse + LocationListCapabilitiesNextResponse, } from "../models"; /// @@ -44,12 +44,12 @@ export class LocationImpl implements Location { /** * Get the usage for a subscription - * @param location The identifier for the physical azure location. + * @param location The name of the Azure region. * @param options The options parameters. */ public listUsage( location: string, - options?: LocationListUsageOptionalParams + options?: LocationListUsageOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listUsagePagingAll(location, options); return { @@ -64,14 +64,14 @@ export class LocationImpl implements Location { throw new Error("maxPageSize is not supported by this operation."); } return this.listUsagePagingPage(location, options, settings); - } + }, }; } private async *listUsagePagingPage( location: string, options?: LocationListUsageOptionalParams, - _settings?: PageSettings + _settings?: PageSettings, ): AsyncIterableIterator { let result: LocationListUsageResponse; result = await this._listUsage(location, options); @@ -80,7 +80,7 @@ export class LocationImpl implements Location { private async *listUsagePagingAll( location: string, - options?: LocationListUsageOptionalParams + options?: LocationListUsageOptionalParams, ): AsyncIterableIterator { for await (const page of this.listUsagePagingPage(location, options)) { yield* page; @@ -89,12 +89,12 @@ export class LocationImpl implements Location { /** * Get the list of cached images on specific OS type for a subscription in a region. - * @param location The identifier for the physical azure location. + * @param location The name of the Azure region. * @param options The options parameters. */ public listCachedImages( location: string, - options?: LocationListCachedImagesOptionalParams + options?: LocationListCachedImagesOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listCachedImagesPagingAll(location, options); return { @@ -109,14 +109,14 @@ export class LocationImpl implements Location { throw new Error("maxPageSize is not supported by this operation."); } return this.listCachedImagesPagingPage(location, options, settings); - } + }, }; } private async *listCachedImagesPagingPage( location: string, options?: LocationListCachedImagesOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: LocationListCachedImagesResponse; let continuationToken = settings?.continuationToken; @@ -131,7 +131,7 @@ export class LocationImpl implements Location { result = await this._listCachedImagesNext( location, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -142,11 +142,11 @@ export class LocationImpl implements Location { private async *listCachedImagesPagingAll( location: string, - options?: LocationListCachedImagesOptionalParams + options?: LocationListCachedImagesOptionalParams, ): AsyncIterableIterator { for await (const page of this.listCachedImagesPagingPage( location, - options + options, )) { yield* page; } @@ -154,12 +154,12 @@ export class LocationImpl implements Location { /** * Get the list of CPU/memory/GPU capabilities of a region. - * @param location The identifier for the physical azure location. + * @param location The name of the Azure region. * @param options The options parameters. */ public listCapabilities( location: string, - options?: LocationListCapabilitiesOptionalParams + options?: LocationListCapabilitiesOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listCapabilitiesPagingAll(location, options); return { @@ -174,14 +174,14 @@ export class LocationImpl implements Location { throw new Error("maxPageSize is not supported by this operation."); } return this.listCapabilitiesPagingPage(location, options, settings); - } + }, }; } private async *listCapabilitiesPagingPage( location: string, options?: LocationListCapabilitiesOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: LocationListCapabilitiesResponse; let continuationToken = settings?.continuationToken; @@ -196,7 +196,7 @@ export class LocationImpl implements Location { result = await this._listCapabilitiesNext( location, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -207,11 +207,11 @@ export class LocationImpl implements Location { private async *listCapabilitiesPagingAll( location: string, - options?: LocationListCapabilitiesOptionalParams + options?: LocationListCapabilitiesOptionalParams, ): AsyncIterableIterator { for await (const page of this.listCapabilitiesPagingPage( location, - options + options, )) { yield* page; } @@ -219,80 +219,80 @@ export class LocationImpl implements Location { /** * Get the usage for a subscription - * @param location The identifier for the physical azure location. + * @param location The name of the Azure region. * @param options The options parameters. */ private _listUsage( location: string, - options?: LocationListUsageOptionalParams + options?: LocationListUsageOptionalParams, ): Promise { return this.client.sendOperationRequest( { location, options }, - listUsageOperationSpec + listUsageOperationSpec, ); } /** * Get the list of cached images on specific OS type for a subscription in a region. - * @param location The identifier for the physical azure location. + * @param location The name of the Azure region. * @param options The options parameters. */ private _listCachedImages( location: string, - options?: LocationListCachedImagesOptionalParams + options?: LocationListCachedImagesOptionalParams, ): Promise { return this.client.sendOperationRequest( { location, options }, - listCachedImagesOperationSpec + listCachedImagesOperationSpec, ); } /** * Get the list of CPU/memory/GPU capabilities of a region. - * @param location The identifier for the physical azure location. + * @param location The name of the Azure region. * @param options The options parameters. */ private _listCapabilities( location: string, - options?: LocationListCapabilitiesOptionalParams + options?: LocationListCapabilitiesOptionalParams, ): Promise { return this.client.sendOperationRequest( { location, options }, - listCapabilitiesOperationSpec + listCapabilitiesOperationSpec, ); } /** * ListCachedImagesNext - * @param location The identifier for the physical azure location. + * @param location The name of the Azure region. * @param nextLink The nextLink from the previous successful call to the ListCachedImages method. * @param options The options parameters. */ private _listCachedImagesNext( location: string, nextLink: string, - options?: LocationListCachedImagesNextOptionalParams + options?: LocationListCachedImagesNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { location, nextLink, options }, - listCachedImagesNextOperationSpec + listCachedImagesNextOperationSpec, ); } /** * ListCapabilitiesNext - * @param location The identifier for the physical azure location. + * @param location The name of the Azure region. * @param nextLink The nextLink from the previous successful call to the ListCapabilities method. * @param options The options parameters. */ private _listCapabilitiesNext( location: string, nextLink: string, - options?: LocationListCapabilitiesNextOptionalParams + options?: LocationListCapabilitiesNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { location, nextLink, options }, - listCapabilitiesNextOperationSpec + listCapabilitiesNextOperationSpec, ); } } @@ -300,105 +300,102 @@ export class LocationImpl implements Location { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listUsageOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/usages", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/usages", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.UsageListResult + bodyMapper: Mappers.UsageListResult, }, default: { - bodyMapper: Mappers.CloudError - } + bodyMapper: Mappers.CloudError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.location + Parameters.location, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listCachedImagesOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/cachedImages", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/cachedImages", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.CachedImagesListResult + bodyMapper: Mappers.CachedImagesListResult, }, default: { - bodyMapper: Mappers.CloudError - } + bodyMapper: Mappers.CloudError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.location + Parameters.location, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listCapabilitiesOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/capabilities", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/capabilities", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.CapabilitiesListResult + bodyMapper: Mappers.CapabilitiesListResult, }, default: { - bodyMapper: Mappers.CloudError - } + bodyMapper: Mappers.CloudError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.location + Parameters.location, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listCachedImagesNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.CachedImagesListResult + bodyMapper: Mappers.CachedImagesListResult, }, default: { - bodyMapper: Mappers.CloudError - } + bodyMapper: Mappers.CloudError, + }, }, urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.nextLink, - Parameters.location + Parameters.location, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listCapabilitiesNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.CapabilitiesListResult + bodyMapper: Mappers.CapabilitiesListResult, }, default: { - bodyMapper: Mappers.CloudError - } + bodyMapper: Mappers.CloudError, + }, }, urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.nextLink, - Parameters.location + Parameters.location, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/containerinstance/arm-containerinstance/src/operations/operations.ts b/sdk/containerinstance/arm-containerinstance/src/operations/operations.ts index 1d79540446f0..c1b64ba7d3d3 100644 --- a/sdk/containerinstance/arm-containerinstance/src/operations/operations.ts +++ b/sdk/containerinstance/arm-containerinstance/src/operations/operations.ts @@ -18,7 +18,7 @@ import { OperationsListNextOptionalParams, OperationsListOptionalParams, OperationsListResponse, - OperationsListNextResponse + OperationsListNextResponse, } from "../models"; /// @@ -39,7 +39,7 @@ export class OperationsImpl implements Operations { * @param options The options parameters. */ public list( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(options); return { @@ -54,13 +54,13 @@ export class OperationsImpl implements Operations { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(options, settings); - } + }, }; } private async *listPagingPage( options?: OperationsListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: OperationsListResponse; let continuationToken = settings?.continuationToken; @@ -81,7 +81,7 @@ export class OperationsImpl implements Operations { } private async *listPagingAll( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(options)) { yield* page; @@ -93,7 +93,7 @@ export class OperationsImpl implements Operations { * @param options The options parameters. */ private _list( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): Promise { return this.client.sendOperationRequest({ options }, listOperationSpec); } @@ -105,11 +105,11 @@ export class OperationsImpl implements Operations { */ private _listNext( nextLink: string, - options?: OperationsListNextOptionalParams + options?: OperationsListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { nextLink, options }, - listNextOperationSpec + listNextOperationSpec, ); } } @@ -121,29 +121,29 @@ const listOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.OperationListResult + bodyMapper: Mappers.OperationListResult, }, default: { - bodyMapper: Mappers.CloudError - } + bodyMapper: Mappers.CloudError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.OperationListResult + bodyMapper: Mappers.OperationListResult, }, default: { - bodyMapper: Mappers.CloudError - } + bodyMapper: Mappers.CloudError, + }, }, urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/containerinstance/arm-containerinstance/src/operations/subnetServiceAssociationLink.ts b/sdk/containerinstance/arm-containerinstance/src/operations/subnetServiceAssociationLink.ts index 542674000148..86c9281af1b2 100644 --- a/sdk/containerinstance/arm-containerinstance/src/operations/subnetServiceAssociationLink.ts +++ b/sdk/containerinstance/arm-containerinstance/src/operations/subnetServiceAssociationLink.ts @@ -14,14 +14,15 @@ import { ContainerInstanceManagementClient } from "../containerInstanceManagemen import { SimplePollerLike, OperationState, - createHttpPoller + createHttpPoller, } from "@azure/core-lro"; import { createLroSpec } from "../lroImpl"; import { SubnetServiceAssociationLinkDeleteOptionalParams } from "../models"; /** Class containing SubnetServiceAssociationLink operations. */ export class SubnetServiceAssociationLinkImpl - implements SubnetServiceAssociationLink { + implements SubnetServiceAssociationLink +{ private readonly client: ContainerInstanceManagementClient; /** @@ -35,7 +36,7 @@ export class SubnetServiceAssociationLinkImpl /** * Delete container group virtual network association links. The operation does not delete other * resources provided by the user. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName The name of the virtual network. * @param subnetName The name of the subnet. * @param options The options parameters. @@ -44,25 +45,24 @@ export class SubnetServiceAssociationLinkImpl resourceGroupName: string, virtualNetworkName: string, subnetName: string, - options?: SubnetServiceAssociationLinkDeleteOptionalParams + options?: SubnetServiceAssociationLinkDeleteOptionalParams, ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -71,8 +71,8 @@ export class SubnetServiceAssociationLinkImpl ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -80,19 +80,19 @@ export class SubnetServiceAssociationLinkImpl rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; const lro = createLroSpec({ sendOperationFn, args: { resourceGroupName, virtualNetworkName, subnetName, options }, - spec: deleteOperationSpec + spec: deleteOperationSpec, }); const poller = await createHttpPoller>(lro, { restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -101,7 +101,7 @@ export class SubnetServiceAssociationLinkImpl /** * Delete container group virtual network association links. The operation does not delete other * resources provided by the user. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName The name of the virtual network. * @param subnetName The name of the subnet. * @param options The options parameters. @@ -110,13 +110,13 @@ export class SubnetServiceAssociationLinkImpl resourceGroupName: string, virtualNetworkName: string, subnetName: string, - options?: SubnetServiceAssociationLinkDeleteOptionalParams + options?: SubnetServiceAssociationLinkDeleteOptionalParams, ): Promise { const poller = await this.beginDelete( resourceGroupName, virtualNetworkName, subnetName, - options + options, ); return poller.pollUntilDone(); } @@ -125,8 +125,7 @@ export class SubnetServiceAssociationLinkImpl const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/providers/Microsoft.ContainerInstance/serviceAssociationLinks/default", + path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/providers/Microsoft.ContainerInstance/serviceAssociationLinks/default", httpMethod: "DELETE", responses: { 200: {}, @@ -134,8 +133,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError - } + bodyMapper: Mappers.CloudError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -143,8 +142,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.virtualNetworkName, - Parameters.subnetName + Parameters.subnetName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/containerinstance/arm-containerinstance/src/operationsInterfaces/containerGroupProfileOperations.ts b/sdk/containerinstance/arm-containerinstance/src/operationsInterfaces/containerGroupProfileOperations.ts new file mode 100644 index 000000000000..d4c18dcb1441 --- /dev/null +++ b/sdk/containerinstance/arm-containerinstance/src/operationsInterfaces/containerGroupProfileOperations.ts @@ -0,0 +1,50 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + ContainerGroupProfile, + ContainerGroupProfileListAllRevisionsOptionalParams, + ContainerGroupProfileGetByRevisionNumberOptionalParams, + ContainerGroupProfileGetByRevisionNumberResponse, +} from "../models"; + +/// +/** Interface representing a ContainerGroupProfileOperations. */ +export interface ContainerGroupProfileOperations { + /** + * Get a list of all the revisions of the specified container group profile in the given subscription + * and resource group. This operation returns properties of each revision of the specified container + * group profile including containers, image registry credentials, restart policy, IP address type, OS + * type volumes, revision number, etc. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerGroupProfileName The name of the container group profile. + * @param options The options parameters. + */ + listAllRevisions( + resourceGroupName: string, + containerGroupProfileName: string, + options?: ContainerGroupProfileListAllRevisionsOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Gets the properties of the specified revision of the container group profile in the given + * subscription and resource group. The operation returns the properties of container group profile + * including containers, image registry credentials, restart policy, IP address type, OS type, volumes, + * current revision number, etc. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerGroupProfileName The name of the container group profile. + * @param revisionNumber The revision number of the container group profile. + * @param options The options parameters. + */ + getByRevisionNumber( + resourceGroupName: string, + containerGroupProfileName: string, + revisionNumber: string, + options?: ContainerGroupProfileGetByRevisionNumberOptionalParams, + ): Promise; +} diff --git a/sdk/containerinstance/arm-containerinstance/src/operationsInterfaces/containerGroupProfiles.ts b/sdk/containerinstance/arm-containerinstance/src/operationsInterfaces/containerGroupProfiles.ts new file mode 100644 index 000000000000..a1575fe89ac6 --- /dev/null +++ b/sdk/containerinstance/arm-containerinstance/src/operationsInterfaces/containerGroupProfiles.ts @@ -0,0 +1,99 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + ContainerGroupProfile, + ContainerGroupProfilesListOptionalParams, + ContainerGroupProfilesListByResourceGroupOptionalParams, + ContainerGroupProfilesGetOptionalParams, + ContainerGroupProfilesGetResponse, + ContainerGroupProfilesCreateOrUpdateOptionalParams, + ContainerGroupProfilesCreateOrUpdateResponse, + ContainerGroupProfilePatch, + ContainerGroupProfilesPatchOptionalParams, + ContainerGroupProfilesPatchResponse, + ContainerGroupProfilesDeleteOptionalParams, +} from "../models"; + +/// +/** Interface representing a ContainerGroupProfiles. */ +export interface ContainerGroupProfiles { + /** + * Get a list of container group profiles in the specified subscription. This operation returns + * properties of each container group profile including containers, image registry credentials, restart + * policy, IP address type, OS type,volumes,current revision number, etc. + * @param options The options parameters. + */ + list( + options?: ContainerGroupProfilesListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Get a list of container group profiles in a specified subscription and resource group. This + * operation returns properties of each container group profile including containers, image registry + * credentials, restart policy, IP address type, OS type volumes, current revision number, etc. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: ContainerGroupProfilesListByResourceGroupOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Gets the properties of the specified container group profile in the specified subscription and + * resource group. The operation returns the properties of container group profile including + * containers, image registry credentials, restart policy, IP address type, OS type, volumes, current + * revision number, etc. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerGroupProfileName The name of the container group profile. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + containerGroupProfileName: string, + options?: ContainerGroupProfilesGetOptionalParams, + ): Promise; + /** + * Create or update container group profiles with specified configurations. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerGroupProfileName The name of the container group profile. + * @param containerGroupProfile The properties of the container group profile to be created or updated. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + containerGroupProfileName: string, + containerGroupProfile: ContainerGroupProfile, + options?: ContainerGroupProfilesCreateOrUpdateOptionalParams, + ): Promise; + /** + * Patches container group profile with specified properties. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerGroupProfileName The name of the container group profile. + * @param properties The container group profile properties that need to be updated. + * @param options The options parameters. + */ + patch( + resourceGroupName: string, + containerGroupProfileName: string, + properties: ContainerGroupProfilePatch, + options?: ContainerGroupProfilesPatchOptionalParams, + ): Promise; + /** + * Delete the specified container group profile in the specified subscription and resource group. The + * operation does not delete other resources provided by the user, such as volumes. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerGroupProfileName The name of the container group profile. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + containerGroupProfileName: string, + options?: ContainerGroupProfilesDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/containerinstance/arm-containerinstance/src/operationsInterfaces/containerGroups.ts b/sdk/containerinstance/arm-containerinstance/src/operationsInterfaces/containerGroups.ts index 177bc1c29b77..74011b0924ed 100644 --- a/sdk/containerinstance/arm-containerinstance/src/operationsInterfaces/containerGroups.ts +++ b/sdk/containerinstance/arm-containerinstance/src/operationsInterfaces/containerGroups.ts @@ -25,7 +25,7 @@ import { ContainerGroupsStopOptionalParams, ContainerGroupsStartOptionalParams, ContainerGroupsGetOutboundNetworkDependenciesEndpointsOptionalParams, - ContainerGroupsGetOutboundNetworkDependenciesEndpointsResponse + ContainerGroupsGetOutboundNetworkDependenciesEndpointsResponse, } from "../models"; /// @@ -38,35 +38,35 @@ export interface ContainerGroups { * @param options The options parameters. */ list( - options?: ContainerGroupsListOptionalParams + options?: ContainerGroupsListOptionalParams, ): PagedAsyncIterableIterator; /** * Get a list of container groups in a specified subscription and resource group. This operation * returns properties of each container group including containers, image registry credentials, restart * policy, IP address type, OS type, state, and volumes. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ listByResourceGroup( resourceGroupName: string, - options?: ContainerGroupsListByResourceGroupOptionalParams + options?: ContainerGroupsListByResourceGroupOptionalParams, ): PagedAsyncIterableIterator; /** * Gets the properties of the specified container group in the specified subscription and resource * group. The operation returns the properties of each container group including containers, image * registry credentials, restart policy, IP address type, OS type, state, and volumes. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerGroupName The name of the container group. * @param options The options parameters. */ get( resourceGroupName: string, containerGroupName: string, - options?: ContainerGroupsGetOptionalParams + options?: ContainerGroupsGetOptionalParams, ): Promise; /** * Create or update container groups with specified configurations. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerGroupName The name of the container group. * @param containerGroup The properties of the container group to be created or updated. * @param options The options parameters. @@ -75,7 +75,7 @@ export interface ContainerGroups { resourceGroupName: string, containerGroupName: string, containerGroup: ContainerGroup, - options?: ContainerGroupsCreateOrUpdateOptionalParams + options?: ContainerGroupsCreateOrUpdateOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -84,7 +84,7 @@ export interface ContainerGroups { >; /** * Create or update container groups with specified configurations. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerGroupName The name of the container group. * @param containerGroup The properties of the container group to be created or updated. * @param options The options parameters. @@ -93,11 +93,11 @@ export interface ContainerGroups { resourceGroupName: string, containerGroupName: string, containerGroup: ContainerGroup, - options?: ContainerGroupsCreateOrUpdateOptionalParams + options?: ContainerGroupsCreateOrUpdateOptionalParams, ): Promise; /** * Updates container group tags with specified values. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerGroupName The name of the container group. * @param resource The container group resource with just the tags to be updated. * @param options The options parameters. @@ -106,19 +106,19 @@ export interface ContainerGroups { resourceGroupName: string, containerGroupName: string, resource: Resource, - options?: ContainerGroupsUpdateOptionalParams + options?: ContainerGroupsUpdateOptionalParams, ): Promise; /** * Delete the specified container group in the specified subscription and resource group. The operation * does not delete other resources provided by the user, such as volumes. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerGroupName The name of the container group. * @param options The options parameters. */ beginDelete( resourceGroupName: string, containerGroupName: string, - options?: ContainerGroupsDeleteOptionalParams + options?: ContainerGroupsDeleteOptionalParams, ): Promise< SimplePollerLike< OperationState, @@ -128,85 +128,85 @@ export interface ContainerGroups { /** * Delete the specified container group in the specified subscription and resource group. The operation * does not delete other resources provided by the user, such as volumes. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerGroupName The name of the container group. * @param options The options parameters. */ beginDeleteAndWait( resourceGroupName: string, containerGroupName: string, - options?: ContainerGroupsDeleteOptionalParams + options?: ContainerGroupsDeleteOptionalParams, ): Promise; /** * Restarts all containers in a container group in place. If container image has updates, new image * will be downloaded. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerGroupName The name of the container group. * @param options The options parameters. */ beginRestart( resourceGroupName: string, containerGroupName: string, - options?: ContainerGroupsRestartOptionalParams + options?: ContainerGroupsRestartOptionalParams, ): Promise, void>>; /** * Restarts all containers in a container group in place. If container image has updates, new image * will be downloaded. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerGroupName The name of the container group. * @param options The options parameters. */ beginRestartAndWait( resourceGroupName: string, containerGroupName: string, - options?: ContainerGroupsRestartOptionalParams + options?: ContainerGroupsRestartOptionalParams, ): Promise; /** * Stops all containers in a container group. Compute resources will be deallocated and billing will * stop. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerGroupName The name of the container group. * @param options The options parameters. */ stop( resourceGroupName: string, containerGroupName: string, - options?: ContainerGroupsStopOptionalParams + options?: ContainerGroupsStopOptionalParams, ): Promise; /** * Starts all containers in a container group. Compute resources will be allocated and billing will * start. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerGroupName The name of the container group. * @param options The options parameters. */ beginStart( resourceGroupName: string, containerGroupName: string, - options?: ContainerGroupsStartOptionalParams + options?: ContainerGroupsStartOptionalParams, ): Promise, void>>; /** * Starts all containers in a container group. Compute resources will be allocated and billing will * start. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerGroupName The name of the container group. * @param options The options parameters. */ beginStartAndWait( resourceGroupName: string, containerGroupName: string, - options?: ContainerGroupsStartOptionalParams + options?: ContainerGroupsStartOptionalParams, ): Promise; /** * Gets all the network dependencies for this container group to allow complete control of network * setting and configuration. For container groups, this will always be an empty list. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerGroupName The name of the container group. * @param options The options parameters. */ getOutboundNetworkDependenciesEndpoints( resourceGroupName: string, containerGroupName: string, - options?: ContainerGroupsGetOutboundNetworkDependenciesEndpointsOptionalParams + options?: ContainerGroupsGetOutboundNetworkDependenciesEndpointsOptionalParams, ): Promise; } diff --git a/sdk/containerinstance/arm-containerinstance/src/operationsInterfaces/containers.ts b/sdk/containerinstance/arm-containerinstance/src/operationsInterfaces/containers.ts index 2cbcfb2f5ffd..b696d71c1e07 100644 --- a/sdk/containerinstance/arm-containerinstance/src/operationsInterfaces/containers.ts +++ b/sdk/containerinstance/arm-containerinstance/src/operationsInterfaces/containers.ts @@ -13,14 +13,14 @@ import { ContainersExecuteCommandOptionalParams, ContainersExecuteCommandResponse, ContainersAttachOptionalParams, - ContainersAttachResponse + ContainersAttachResponse, } from "../models"; /** Interface representing a Containers. */ export interface Containers { /** * Get the logs for a specified container instance in a specified resource group and container group. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @param options The options parameters. @@ -29,12 +29,12 @@ export interface Containers { resourceGroupName: string, containerGroupName: string, containerName: string, - options?: ContainersListLogsOptionalParams + options?: ContainersListLogsOptionalParams, ): Promise; /** * Executes a command for a specific container instance in a specified resource group and container * group. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @param containerExecRequest The request for the exec command. @@ -45,12 +45,12 @@ export interface Containers { containerGroupName: string, containerName: string, containerExecRequest: ContainerExecRequest, - options?: ContainersExecuteCommandOptionalParams + options?: ContainersExecuteCommandOptionalParams, ): Promise; /** * Attach to the output stream of a specific container instance in a specified resource group and * container group. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerGroupName The name of the container group. * @param containerName The name of the container instance. * @param options The options parameters. @@ -59,6 +59,6 @@ export interface Containers { resourceGroupName: string, containerGroupName: string, containerName: string, - options?: ContainersAttachOptionalParams + options?: ContainersAttachOptionalParams, ): Promise; } diff --git a/sdk/containerinstance/arm-containerinstance/src/operationsInterfaces/index.ts b/sdk/containerinstance/arm-containerinstance/src/operationsInterfaces/index.ts index 84770e8d339d..7023c151ec9a 100644 --- a/sdk/containerinstance/arm-containerinstance/src/operationsInterfaces/index.ts +++ b/sdk/containerinstance/arm-containerinstance/src/operationsInterfaces/index.ts @@ -11,3 +11,5 @@ export * from "./operations"; export * from "./location"; export * from "./containers"; export * from "./subnetServiceAssociationLink"; +export * from "./containerGroupProfiles"; +export * from "./containerGroupProfileOperations"; diff --git a/sdk/containerinstance/arm-containerinstance/src/operationsInterfaces/location.ts b/sdk/containerinstance/arm-containerinstance/src/operationsInterfaces/location.ts index 4362abd9bbf2..6cf8ea12e830 100644 --- a/sdk/containerinstance/arm-containerinstance/src/operationsInterfaces/location.ts +++ b/sdk/containerinstance/arm-containerinstance/src/operationsInterfaces/location.ts @@ -13,7 +13,7 @@ import { CachedImages, LocationListCachedImagesOptionalParams, Capabilities, - LocationListCapabilitiesOptionalParams + LocationListCapabilitiesOptionalParams, } from "../models"; /// @@ -21,29 +21,29 @@ import { export interface Location { /** * Get the usage for a subscription - * @param location The identifier for the physical azure location. + * @param location The name of the Azure region. * @param options The options parameters. */ listUsage( location: string, - options?: LocationListUsageOptionalParams + options?: LocationListUsageOptionalParams, ): PagedAsyncIterableIterator; /** * Get the list of cached images on specific OS type for a subscription in a region. - * @param location The identifier for the physical azure location. + * @param location The name of the Azure region. * @param options The options parameters. */ listCachedImages( location: string, - options?: LocationListCachedImagesOptionalParams + options?: LocationListCachedImagesOptionalParams, ): PagedAsyncIterableIterator; /** * Get the list of CPU/memory/GPU capabilities of a region. - * @param location The identifier for the physical azure location. + * @param location The name of the Azure region. * @param options The options parameters. */ listCapabilities( location: string, - options?: LocationListCapabilitiesOptionalParams + options?: LocationListCapabilitiesOptionalParams, ): PagedAsyncIterableIterator; } diff --git a/sdk/containerinstance/arm-containerinstance/src/operationsInterfaces/operations.ts b/sdk/containerinstance/arm-containerinstance/src/operationsInterfaces/operations.ts index 4b15b5de461e..fd5065a90111 100644 --- a/sdk/containerinstance/arm-containerinstance/src/operationsInterfaces/operations.ts +++ b/sdk/containerinstance/arm-containerinstance/src/operationsInterfaces/operations.ts @@ -17,6 +17,6 @@ export interface Operations { * @param options The options parameters. */ list( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): PagedAsyncIterableIterator; } diff --git a/sdk/containerinstance/arm-containerinstance/src/operationsInterfaces/subnetServiceAssociationLink.ts b/sdk/containerinstance/arm-containerinstance/src/operationsInterfaces/subnetServiceAssociationLink.ts index a7dbeffaf1ac..d3a9f1a1bd3f 100644 --- a/sdk/containerinstance/arm-containerinstance/src/operationsInterfaces/subnetServiceAssociationLink.ts +++ b/sdk/containerinstance/arm-containerinstance/src/operationsInterfaces/subnetServiceAssociationLink.ts @@ -14,7 +14,7 @@ export interface SubnetServiceAssociationLink { /** * Delete container group virtual network association links. The operation does not delete other * resources provided by the user. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName The name of the virtual network. * @param subnetName The name of the subnet. * @param options The options parameters. @@ -23,12 +23,12 @@ export interface SubnetServiceAssociationLink { resourceGroupName: string, virtualNetworkName: string, subnetName: string, - options?: SubnetServiceAssociationLinkDeleteOptionalParams + options?: SubnetServiceAssociationLinkDeleteOptionalParams, ): Promise, void>>; /** * Delete container group virtual network association links. The operation does not delete other * resources provided by the user. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param virtualNetworkName The name of the virtual network. * @param subnetName The name of the subnet. * @param options The options parameters. @@ -37,6 +37,6 @@ export interface SubnetServiceAssociationLink { resourceGroupName: string, virtualNetworkName: string, subnetName: string, - options?: SubnetServiceAssociationLinkDeleteOptionalParams + options?: SubnetServiceAssociationLinkDeleteOptionalParams, ): Promise; } diff --git a/sdk/containerinstance/arm-containerinstance/src/pagingHelper.ts b/sdk/containerinstance/arm-containerinstance/src/pagingHelper.ts index 269a2b9814b5..205cccc26592 100644 --- a/sdk/containerinstance/arm-containerinstance/src/pagingHelper.ts +++ b/sdk/containerinstance/arm-containerinstance/src/pagingHelper.ts @@ -28,7 +28,7 @@ export function getContinuationToken(page: unknown): string | undefined { export function setContinuationToken( page: unknown, - continuationToken: string | undefined + continuationToken: string | undefined, ): void { if (typeof page !== "object" || page === null || !continuationToken) { return; diff --git a/sdk/containerinstance/arm-containerinstance/test/sampleTest.ts b/sdk/containerinstance/arm-containerinstance/test/sampleTest.ts new file mode 100644 index 000000000000..d64be981b694 --- /dev/null +++ b/sdk/containerinstance/arm-containerinstance/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * 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 { + Recorder, + RecorderStartOptions, + env, +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id", +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables, +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function (this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("sample test", async function () { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/containerinstance/arm-containerinstance/tsconfig.json b/sdk/containerinstance/arm-containerinstance/tsconfig.json index c28d6295827d..3e6ae96443f3 100644 --- a/sdk/containerinstance/arm-containerinstance/tsconfig.json +++ b/sdk/containerinstance/arm-containerinstance/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-containerinstance": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"