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
777 changes: 389 additions & 388 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

22 changes: 12 additions & 10 deletions sdk/imagebuilder/arm-imagebuilder/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# Release History

## 4.1.0 (2024-05-30)

**Features**

## 4.0.1 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

- Added Interface ImageTemplateAutoRun
- Added Type Alias AutoRunState
- Interface ImageTemplate has a new optional parameter autoRun
- Interface ImageTemplate has a new optional parameter managedResourceTags
- Interface ImageTemplateUpdateParametersProperties has a new optional parameter vmProfile
- Interface VirtualNetworkConfig has a new optional parameter containerInstanceSubnetId


## 4.0.0 (2023-12-21)

**Features**
Expand Down
2 changes: 1 addition & 1 deletion sdk/imagebuilder/arm-imagebuilder/LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 4 additions & 4 deletions sdk/imagebuilder/arm-imagebuilder/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "77d1474d5dc8502fab361948160efb8a2769e517",
"commit": "9b68ddc40048b3bb2aa8d677f21eded73b703f02",
"readme": "specification/imagebuilder/resource-manager/readme.md",
"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=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\imagebuilder\\resource-manager\\readme.md --use=@autorest/typescript@6.0.12 --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/imagebuilder/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.7.4",
"use": "@autorest/typescript@6.0.12"
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.10",
"use": "@autorest/typescript@^6.0.12"
}
24 changes: 7 additions & 17 deletions sdk/imagebuilder/arm-imagebuilder/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 ImageBuilderClient.",
"version": "4.0.1",
"version": "4.1.0",
"engines": {
"node": ">=18.0.0"
},
Expand All @@ -12,8 +12,8 @@
"@azure/abort-controller": "^1.0.0",
"@azure/core-paging": "^1.2.0",
"@azure/core-client": "^1.7.0",
"@azure/core-auth": "^1.3.0",
"@azure/core-rest-pipeline": "^1.12.0",
"@azure/core-auth": "^1.6.0",
"@azure/core-rest-pipeline": "^1.14.0",
"tslib": "^2.2.0"
},
"keywords": [
Expand All @@ -37,15 +37,14 @@
"@azure/dev-tool": "^1.0.0",
"@azure/identity": "^4.0.1",
"@azure-tools/test-recorder": "^3.0.0",
"@azure-tools/test-credential": "^1.0.0",
"@azure-tools/test-credential": "^1.1.0",
"mocha": "^10.0.0",
"@types/mocha": "^10.0.0",
"tsx": "^4.7.1",
"@types/chai": "^4.2.8",
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"@types/node": "^18.0.0",
"@azure/arm-compute": "^21.0.0",
"@azure/arm-msi": "^2.0.0",
"ts-node": "^10.0.0"
},
"repository": {
Expand Down Expand Up @@ -79,7 +78,6 @@
"pack": "npm pack 2>&1",
"extract-api": "dev-tool run extract-api",
"lint": "echo skipped",
"audit": "echo skipped",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"build:node": "echo skipped",
"build:browser": "echo skipped",
Expand Down Expand Up @@ -108,13 +106,5 @@
]
},
"autoPublish": true,
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/imagebuilder/arm-imagebuilder",
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-imagebuilder?view=azure-node-preview"
}
}
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/imagebuilder/arm-imagebuilder"
}
14 changes: 14 additions & 0 deletions sdk/imagebuilder/arm-imagebuilder/review/arm-imagebuilder.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ import { OperationState } from '@azure/core-lro';
import { PagedAsyncIterableIterator } from '@azure/core-paging';
import { SimplePollerLike } from '@azure/core-lro';

// @public
export type AutoRunState = "Enabled" | "Disabled";

// @public
export type CreatedByType = string;

Expand Down Expand Up @@ -81,13 +84,17 @@ export interface ImageBuilderClientOptionalParams extends coreClient.ServiceClie

// @public
export interface ImageTemplate extends TrackedResource {
autoRun?: ImageTemplateAutoRun;
buildTimeoutInMinutes?: number;
customize?: ImageTemplateCustomizerUnion[];
distribute?: ImageTemplateDistributorUnion[];
errorHandling?: ImageTemplatePropertiesErrorHandling;
readonly exactStagingResourceGroup?: string;
identity: ImageTemplateIdentity;
readonly lastRunStatus?: ImageTemplateLastRunStatus;
managedResourceTags?: {
[propertyName: string]: string;
};
optimize?: ImageTemplatePropertiesOptimize;
readonly provisioningError?: ProvisioningError;
readonly provisioningState?: ProvisioningState;
Expand All @@ -97,6 +104,11 @@ export interface ImageTemplate extends TrackedResource {
vmProfile?: ImageTemplateVmProfile;
}

// @public
export interface ImageTemplateAutoRun {
state?: AutoRunState;
}

// @public
export interface ImageTemplateCustomizer {
name?: string;
Expand Down Expand Up @@ -297,6 +309,7 @@ export interface ImageTemplateUpdateParameters {
// @public
export interface ImageTemplateUpdateParametersProperties {
distribute?: ImageTemplateDistributorUnion[];
vmProfile?: ImageTemplateVmProfile;
}

// @public
Expand Down Expand Up @@ -703,6 +716,7 @@ export type VirtualMachineImageTemplatesUpdateResponse = ImageTemplate;

// @public
export interface VirtualNetworkConfig {
containerInstanceSubnetId?: string;
proxyVmSize?: string;
subnetId?: string;
}
Expand Down
37 changes: 19 additions & 18 deletions sdk/imagebuilder/arm-imagebuilder/src/imageBuilderClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ 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 {
VirtualMachineImageTemplatesImpl,
TriggersImpl,
OperationsImpl
OperationsImpl,
} from "./operations";
import {
VirtualMachineImageTemplates,
Triggers,
Operations
Operations,
} from "./operationsInterfaces";
import { ImageBuilderClientOptionalParams } from "./models";

Expand All @@ -41,7 +41,7 @@ export class ImageBuilderClient extends coreClient.ServiceClient {
constructor(
credentials: coreAuth.TokenCredential,
subscriptionId: string,
options?: ImageBuilderClientOptionalParams
options?: ImageBuilderClientOptionalParams,
) {
if (credentials === undefined) {
throw new Error("'credentials' cannot be null");
Expand All @@ -56,10 +56,10 @@ export class ImageBuilderClient extends coreClient.ServiceClient {
}
const defaults: ImageBuilderClientOptionalParams = {
requestContentType: "application/json; charset=utf-8",
credential: credentials
credential: credentials,
};

const packageDetails = `azsdk-js-arm-imagebuilder/4.0.1`;
const packageDetails = `azsdk-js-arm-imagebuilder/4.1.0`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
Expand All @@ -69,20 +69,21 @@ export class ImageBuilderClient 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 (
Expand All @@ -92,7 +93,7 @@ export class ImageBuilderClient extends coreClient.ServiceClient {
!bearerTokenAuthenticationPolicyFound
) {
this.pipeline.removePolicy({
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
name: coreRestPipeline.bearerTokenAuthenticationPolicyName,
});
this.pipeline.addPolicy(
coreRestPipeline.bearerTokenAuthenticationPolicy({
Expand All @@ -102,19 +103,19 @@ export class ImageBuilderClient extends coreClient.ServiceClient {
`${optionsWithDefaults.endpoint}/.default`,
challengeCallbacks: {
authorizeRequestOnChallenge:
coreClient.authorizeRequestOnClaimChallenge
}
})
coreClient.authorizeRequestOnClaimChallenge,
},
}),
);
}
// Parameter assignments
this.subscriptionId = subscriptionId;

// Assigning values to Constant parameters
this.$host = options.$host || "https://management.azure.com";
this.apiVersion = options.apiVersion || "2023-07-01";
this.apiVersion = options.apiVersion || "2024-02-01";
this.virtualMachineImageTemplates = new VirtualMachineImageTemplatesImpl(
this
this,
);
this.triggers = new TriggersImpl(this);
this.operations = new OperationsImpl(this);
Expand All @@ -130,7 +131,7 @@ export class ImageBuilderClient extends coreClient.ServiceClient {
name: "CustomApiVersionPolicy",
async sendRequest(
request: PipelineRequest,
next: SendRequest
next: SendRequest,
): Promise<PipelineResponse> {
const param = request.url.split("?");
if (param.length > 1) {
Expand All @@ -144,7 +145,7 @@ export class ImageBuilderClient extends coreClient.ServiceClient {
request.url = param[0] + "?" + newParams.join("&");
}
return next(request);
}
},
};
this.pipeline.addPolicy(apiVersionPolicy);
}
Expand Down
6 changes: 3 additions & 3 deletions sdk/imagebuilder/arm-imagebuilder/src/lroImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ export function createLroSpec<T>(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,
});
}
},
};
}
Loading