Skip to content

Commit

Permalink
CodeGen from PR 21530 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge be0248e9876c5410f54c6998a4fcd3fd904a916f into 2278f5552561a7959a49a1e38cb7ddbb349d1589
  • Loading branch information
SDKAuto committed Nov 24, 2022
1 parent 60a1e63 commit 5068502
Show file tree
Hide file tree
Showing 11 changed files with 238 additions and 39 deletions.
25 changes: 15 additions & 10 deletions sdk/containerinstance/arm-containerinstance/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
# Release History

## 9.1.0-beta.1 (2022-11-24)

**Features**

## 9.0.1 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

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


## 9.0.0 (2022-08-30)

**Features**
Expand Down
2 changes: 1 addition & 1 deletion sdk/containerinstance/arm-containerinstance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
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": "ee364f685feedb2ad905c682b57117f9006f541f",
"commit": "5b05c080b24b2efe1e3687559f1b4e47daaf2b5a",
"readme": "specification/containerinstance/resource-manager/readme.md",
"autorest_command": "autorest --version=3.8.4 --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/[email protected].1.20220727.1 --generate-sample=true",
"autorest_command": "autorest --version=3.8.4 --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/[email protected].2",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.4.2",
"use": "@autorest/[email protected].1.20220727.1"
"release_tool": "@azure-tools/js-sdk-release-tools@2.5.1",
"use": "@autorest/[email protected].2"
}
14 changes: 3 additions & 11 deletions sdk/containerinstance/arm-containerinstance/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for ContainerInstanceManagementClient.",
"version": "9.0.1",
"version": "9.1.0-beta.1",
"engines": {
"node": ">=14.0.0"
},
Expand Down Expand Up @@ -109,13 +109,5 @@
}
]
},
"autoPublish": true,
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-containerinstance?view=azure-node-preview"
}
}
"autoPublish": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ export interface CloudErrorBody {
target?: string;
}

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

// @public
export interface Container {
command?: string[];
Expand Down Expand Up @@ -140,18 +145,24 @@ 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;
encryptionProperties?: EncryptionProperties;
extensions?: DeploymentExtensionSpec[];
identity?: ContainerGroupIdentity;
imageRegistryCredentials?: ImageRegistryCredential[];
initContainers?: InitContainerDefinition[];
readonly instanceView?: ContainerGroupPropertiesInstanceView;
ipAddress?: IpAddress;
osType: OperatingSystemTypes;
priority?: ContainerGroupPriority;
readonly provisioningState?: string;
restartPolicy?: ContainerGroupRestartPolicy;
sku?: ContainerGroupSku;
Expand Down Expand Up @@ -386,6 +397,15 @@ export interface ContainerState {
readonly state?: string;
}

// @public
export interface DeploymentExtensionSpec {
extensionType?: string;
name: string;
protectedSettings?: Record<string, unknown>;
settings?: Record<string, unknown>;
version?: string;
}

// @public
export interface DnsConfiguration {
nameServers: string[];
Expand All @@ -398,6 +418,7 @@ export type DnsNameLabelReusePolicy = string;

// @public
export interface EncryptionProperties {
identity?: string;
keyName: string;
keyVersion: string;
vaultBaseUrl: string;
Expand Down Expand Up @@ -492,6 +513,12 @@ export enum KnownContainerGroupNetworkProtocol {
UDP = "UDP"
}

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

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

// @public
export enum KnownContainerGroupSku {
Confidential = "Confidential",
Dedicated = "Dedicated",
Standard = "Standard"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class ContainerInstanceManagementClient extends coreClient.ServiceClient
credential: credentials
};

const packageDetails = `azsdk-js-arm-containerinstance/9.0.1`;
const packageDetails = `azsdk-js-arm-containerinstance/9.1.0-beta.1`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
Expand Down Expand Up @@ -117,7 +117,7 @@ export class ContainerInstanceManagementClient extends coreClient.ServiceClient

// Assigning values to Constant parameters
this.$host = options.$host || "https://management.azure.com";
this.apiVersion = options.apiVersion || "2021-10-01";
this.apiVersion = options.apiVersion || "2022-10-01-preview";
this.containerGroups = new ContainerGroupsImpl(this);
this.operations = new OperationsImpl(this);
this.location = new LocationImpl(this);
Expand Down
53 changes: 51 additions & 2 deletions sdk/containerinstance/arm-containerinstance/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ export interface ContainerGroupProperties {
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;
}

/** Identity for the container group. */
Expand Down Expand Up @@ -478,6 +484,8 @@ export interface EncryptionProperties {
keyName: string;
/** The encryption key version. */
keyVersion: string;
/** The keyvault managed identity. */
identity?: string;
}

/** The init container definition. */
Expand Down Expand Up @@ -523,6 +531,26 @@ export interface InitContainerPropertiesDefinitionInstanceView {
readonly events?: Event[];
}

/** Extension sidecars to be added to the deployment. */
export interface DeploymentExtensionSpec {
/** Name of the extension. */
name: string;
/** Type of extension to be added. */
extensionType?: string;
/** Version of the extension being used. */
version?: string;
/** Settings for the extension. */
settings?: Record<string, unknown>;
/** Protected settings for the extension. */
protectedSettings?: Record<string, unknown>;
}

/** The properties for confidential container group */
export interface ConfidentialComputeProperties {
/** The base64 encoded confidential compute enforcement policy */
ccePolicy?: string;
}

/** An error response from the Container Instance service. */
export interface CloudError {
/** An error response from the Container Instance service. */
Expand Down Expand Up @@ -925,7 +953,9 @@ export enum KnownContainerGroupSku {
/** Standard */
Standard = "Standard",
/** Dedicated */
Dedicated = "Dedicated"
Dedicated = "Dedicated",
/** Confidential */
Confidential = "Confidential"
}

/**
Expand All @@ -934,10 +964,29 @@ export enum KnownContainerGroupSku {
* this enum contains the known values that the service supports.
* ### Known values supported by the service
* **Standard** \
* **Dedicated**
* **Dedicated** \
* **Confidential**
*/
export type ContainerGroupSku = string;

/** Known values of {@link ContainerGroupPriority} that the service accepts. */
export enum KnownContainerGroupPriority {
/** Regular */
Regular = "Regular",
/** Spot */
Spot = "Spot"
}

/**
* Defines values for ContainerGroupPriority. \
* {@link KnownContainerGroupPriority} can be used interchangeably with ContainerGroupPriority,
* this enum contains the known values that the service supports.
* ### Known values supported by the service
* **Regular** \
* **Spot**
*/
export type ContainerGroupPriority = string;

/** Known values of {@link ContainerInstanceOperationsOrigin} that the service accepts. */
export enum KnownContainerInstanceOperationsOrigin {
/** User */
Expand Down
88 changes: 88 additions & 0 deletions sdk/containerinstance/arm-containerinstance/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,31 @@ export const ContainerGroupProperties: coreClient.CompositeMapper = {
}
}
}
},
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"
}
}
}
}
Expand Down Expand Up @@ -1238,6 +1263,12 @@ export const EncryptionProperties: coreClient.CompositeMapper = {
type: {
name: "String"
}
},
identity: {
serializedName: "identity",
type: {
name: "String"
}
}
}
}
Expand Down Expand Up @@ -1350,6 +1381,63 @@ export const InitContainerPropertiesDefinitionInstanceView: coreClient.Composite
}
};

export const DeploymentExtensionSpec: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "DeploymentExtensionSpec",
modelProperties: {
name: {
serializedName: "name",
required: true,
type: {
name: "String"
}
},
extensionType: {
serializedName: "properties.extensionType",
type: {
name: "String"
}
},
version: {
serializedName: "properties.version",
type: {
name: "String"
}
},
settings: {
serializedName: "properties.settings",
type: {
name: "Dictionary",
value: { type: { name: "any" } }
}
},
protectedSettings: {
serializedName: "properties.protectedSettings",
type: {
name: "Dictionary",
value: { type: { name: "any" } }
}
}
}
}
};

export const ConfidentialComputeProperties: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "ConfidentialComputeProperties",
modelProperties: {
ccePolicy: {
serializedName: "ccePolicy",
type: {
name: "String"
}
}
}
}
};

export const CloudError: coreClient.CompositeMapper = {
type: {
name: "Composite",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const subscriptionId: OperationURLParameter = {
export const apiVersion: OperationQueryParameter = {
parameterPath: "apiVersion",
mapper: {
defaultValue: "2021-10-01",
defaultValue: "2022-10-01-preview",
isConstant: true,
serializedName: "api-version",
type: {
Expand Down
Loading

0 comments on commit 5068502

Please sign in to comment.