Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 6 additions & 18 deletions sdk/containerinstance/arm-containerinstance/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,16 @@
# Release History

## 9.1.0-beta.2 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

## 9.1.0-beta.1 (2023-01-13)

## 9.1.0-beta.2 (2023-03-27)

**Features**

- Added Interface ConfidentialComputeProperties
- Added Interface DeploymentExtensionSpec
- Added Type Alias ContainerGroupPriority
- Interface ContainerGroupProperties has a new optional parameter confidentialComputeProperties
- Added Type Alias IsCustomProvisioningTimeout
- Interface ContainerGroupProperties has a new optional parameter extensions
- Interface ContainerGroupProperties has a new optional parameter priority
- Interface ContainerGroupProperties has a new optional parameter isCustomProvisioningTimeout
- Interface ContainerGroupProperties has a new optional parameter provisioningTimeoutInSeconds
- Interface EncryptionProperties has a new optional parameter identity
- Added Enum KnownContainerGroupPriority
- Enum KnownContainerGroupSku has a new value Confidential
- Added Enum KnownIsCustomProvisioningTimeout
- Added function getContinuationToken


Expand Down
8 changes: 4 additions & 4 deletions sdk/containerinstance/arm-containerinstance/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "3f36931e7edfce60595fd5558a722e0230a44eb1",
"commit": "7efe20700592916a0ce1f8a80ff941e70712a8b2",
"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=F:\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\containerinstance\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.7 --generate-sample=true",
"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=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/containerinstance/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.10",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.5.4",
"use": "@autorest/typescript@6.0.0-rc.7"
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.0",
"use": "@autorest/typescript@6.0.0-rc.10"
}
18 changes: 5 additions & 13 deletions sdk/containerinstance/arm-containerinstance/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"node": ">=14.0.0"
},
"dependencies": {
"@azure/core-lro": "^2.2.0",
"@azure/core-lro": "^2.5.0",
"@azure/abort-controller": "^1.0.0",
"@azure/core-paging": "^1.2.0",
"@azure/core-client": "^1.6.1",
"@azure/core-client": "^1.7.0",
"@azure/core-auth": "^1.3.0",
"@azure/core-rest-pipeline": "^1.8.0",
"tslib": "^2.2.0"
Expand All @@ -33,7 +33,7 @@
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-multi-entry": "^6.0.0",
"@rollup/plugin-node-resolve": "^13.1.3",
"mkdirp": "^1.0.4",
"mkdirp": "^2.1.2",
"rollup": "^2.66.1",
"rollup-plugin-sourcemaps": "^0.6.3",
"typescript": "~4.8.0",
Expand Down Expand Up @@ -111,13 +111,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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

import * as coreAuth from '@azure/core-auth';
import * as coreClient from '@azure/core-client';
import { OperationState } from '@azure/core-lro';
import { PagedAsyncIterableIterator } from '@azure/core-paging';
import { PollerLike } from '@azure/core-lro';
import { PollOperationState } from '@azure/core-lro';
import { SimplePollerLike } from '@azure/core-lro';

// @public
export interface AzureFileVolume {
Expand Down Expand Up @@ -66,11 +66,6 @@ export interface CloudErrorBody {
target?: string;
}

// @public
export interface ConfidentialComputeProperties {
ccePolicy?: string;
}

// @public
export interface Container {
command?: string[];
Expand Down Expand Up @@ -145,12 +140,8 @@ export interface ContainerGroupListResult {
// @public
export type ContainerGroupNetworkProtocol = string;

// @public
export type ContainerGroupPriority = string;

// @public
export interface ContainerGroupProperties {
confidentialComputeProperties?: ConfidentialComputeProperties;
containers: Container[];
diagnostics?: ContainerGroupDiagnostics;
dnsConfig?: DnsConfiguration;
Expand All @@ -161,9 +152,10 @@ export interface ContainerGroupProperties {
initContainers?: InitContainerDefinition[];
readonly instanceView?: ContainerGroupPropertiesInstanceView;
ipAddress?: IpAddress;
readonly isCustomProvisioningTimeout?: IsCustomProvisioningTimeout;
osType: OperatingSystemTypes;
priority?: ContainerGroupPriority;
readonly provisioningState?: string;
provisioningTimeoutInSeconds?: number;
restartPolicy?: ContainerGroupRestartPolicy;
sku?: ContainerGroupSku;
subnetIds?: ContainerGroupSubnetId[];
Expand All @@ -181,13 +173,13 @@ export type ContainerGroupRestartPolicy = string;

// @public
export interface ContainerGroups {
beginCreateOrUpdate(resourceGroupName: string, containerGroupName: string, containerGroup: ContainerGroup, options?: ContainerGroupsCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<ContainerGroupsCreateOrUpdateResponse>, ContainerGroupsCreateOrUpdateResponse>>;
beginCreateOrUpdate(resourceGroupName: string, containerGroupName: string, containerGroup: ContainerGroup, options?: ContainerGroupsCreateOrUpdateOptionalParams): Promise<SimplePollerLike<OperationState<ContainerGroupsCreateOrUpdateResponse>, ContainerGroupsCreateOrUpdateResponse>>;
beginCreateOrUpdateAndWait(resourceGroupName: string, containerGroupName: string, containerGroup: ContainerGroup, options?: ContainerGroupsCreateOrUpdateOptionalParams): Promise<ContainerGroupsCreateOrUpdateResponse>;
beginDelete(resourceGroupName: string, containerGroupName: string, options?: ContainerGroupsDeleteOptionalParams): Promise<PollerLike<PollOperationState<ContainerGroupsDeleteResponse>, ContainerGroupsDeleteResponse>>;
beginDelete(resourceGroupName: string, containerGroupName: string, options?: ContainerGroupsDeleteOptionalParams): Promise<SimplePollerLike<OperationState<ContainerGroupsDeleteResponse>, ContainerGroupsDeleteResponse>>;
beginDeleteAndWait(resourceGroupName: string, containerGroupName: string, options?: ContainerGroupsDeleteOptionalParams): Promise<ContainerGroupsDeleteResponse>;
beginRestart(resourceGroupName: string, containerGroupName: string, options?: ContainerGroupsRestartOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
beginRestart(resourceGroupName: string, containerGroupName: string, options?: ContainerGroupsRestartOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
beginRestartAndWait(resourceGroupName: string, containerGroupName: string, options?: ContainerGroupsRestartOptionalParams): Promise<void>;
beginStart(resourceGroupName: string, containerGroupName: string, options?: ContainerGroupsStartOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
beginStart(resourceGroupName: string, containerGroupName: string, options?: ContainerGroupsStartOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
beginStartAndWait(resourceGroupName: string, containerGroupName: string, options?: ContainerGroupsStartOptionalParams): Promise<void>;
get(resourceGroupName: string, containerGroupName: string, options?: ContainerGroupsGetOptionalParams): Promise<ContainerGroupsGetResponse>;
getOutboundNetworkDependenciesEndpoints(resourceGroupName: string, containerGroupName: string, options?: ContainerGroupsGetOutboundNetworkDependenciesEndpointsOptionalParams): Promise<ContainerGroupsGetOutboundNetworkDependenciesEndpointsResponse>;
Expand Down Expand Up @@ -504,6 +496,9 @@ export interface IpAddress {
type: ContainerGroupIpAddressType;
}

// @public
export type IsCustomProvisioningTimeout = string;

// @public
export enum KnownContainerGroupIpAddressType {
Private = "Private",
Expand All @@ -516,12 +511,6 @@ export enum KnownContainerGroupNetworkProtocol {
UDP = "UDP"
}

// @public
export enum KnownContainerGroupPriority {
Regular = "Regular",
Spot = "Spot"
}

// @public
export enum KnownContainerGroupRestartPolicy {
Always = "Always",
Expand All @@ -531,7 +520,6 @@ export enum KnownContainerGroupRestartPolicy {

// @public
export enum KnownContainerGroupSku {
Confidential = "Confidential",
Dedicated = "Dedicated",
Standard = "Standard"
}
Expand Down Expand Up @@ -564,6 +552,12 @@ export enum KnownGpuSku {
V100 = "V100"
}

// @public
export enum KnownIsCustomProvisioningTimeout {
False = "False",
True = "True"
}

// @public
export enum KnownLogAnalyticsLogType {
ContainerInsights = "ContainerInsights",
Expand Down Expand Up @@ -734,7 +728,7 @@ export type Scheme = string;

// @public
export interface SubnetServiceAssociationLink {
beginDelete(resourceGroupName: string, virtualNetworkName: string, subnetName: string, options?: SubnetServiceAssociationLinkDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
beginDelete(resourceGroupName: string, virtualNetworkName: string, subnetName: string, options?: SubnetServiceAssociationLinkDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
beginDeleteAndWait(resourceGroupName: string, virtualNetworkName: string, subnetName: string, options?: SubnetServiceAssociationLinkDeleteOptionalParams): Promise<void>;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export class ContainerInstanceManagementClient extends coreClient.ServiceClient

// Assigning values to Constant parameters
this.$host = options.$host || "https://management.azure.com";
this.apiVersion = options.apiVersion || "2022-10-01-preview";
this.apiVersion = options.apiVersion || "2023-02-01-preview";
this.containerGroups = new ContainerGroupsImpl(this);
this.operations = new OperationsImpl(this);
this.location = new LocationImpl(this);
Expand Down
54 changes: 31 additions & 23 deletions sdk/containerinstance/arm-containerinstance/src/lroImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,37 @@
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import { AbortSignalLike } from "@azure/abort-controller";
import { LongRunningOperation, LroResponse } from "@azure/core-lro";

export class LroImpl<T> implements LongRunningOperation<T> {
constructor(
private sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>,
private args: Record<string, unknown>,
private spec: {
readonly requestBody?: unknown;
readonly path?: string;
readonly httpMethod: string;
} & Record<string, any>,
public requestPath: string = spec.path!,
public requestMethod: string = spec.httpMethod
) {}
public async sendInitialRequest(): Promise<LroResponse<T>> {
return this.sendOperationFn(this.args, this.spec);
}
public async sendPollRequest(path: string): Promise<LroResponse<T>> {
const { requestBody, ...restSpec } = this.spec;
return this.sendOperationFn(this.args, {
...restSpec,
path,
httpMethod: "GET"
});
}
export function createLroSpec<T>(inputs: {
sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>;
args: Record<string, unknown>;
spec: {
readonly requestBody?: unknown;
readonly path?: string;
readonly httpMethod: string;
} & Record<string, any>;
}): LongRunningOperation<T> {
const { args, spec, sendOperationFn } = inputs;
return {
requestMethod: spec.httpMethod,
requestPath: spec.path!,
sendInitialRequest: () => sendOperationFn(args, spec),
sendPollRequest: (
path: string,
options?: { abortSignal?: AbortSignalLike }
) => {
const { requestBody, ...restSpec } = spec;
return sendOperationFn(args, {
...restSpec,
httpMethod: "GET",
path,
abortSignal: options?.abortSignal
});
}
};
}
Loading