Skip to content

Commit

Permalink
CodeGen from PR 27211 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 3f236e3dad7ae4afe6349da3da1702362320da77 into fa8683f6725e5447cc808420c4542ce8375f0325
  • Loading branch information
SDKAuto committed Dec 29, 2023
1 parent d639ee0 commit c764559
Show file tree
Hide file tree
Showing 11 changed files with 496 additions and 402 deletions.
752 changes: 377 additions & 375 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions sdk/resourcemover/arm-resourcemover/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Release History

## 2.3.0 (2023-12-29)

**Features**

- Interface MoveResourceProperties has a new optional parameter extendedMoveResourceProperties
- Interface ResourceMoveRequest has a new optional parameter extendedMoveProperties
- Interface ResourceSettings has a new optional parameter targetSubscriptionId
- Interface SubnetResourceSettings has a new optional parameter addressPrefixes


## 2.2.0 (2023-10-24)

**Features**
Expand Down
8 changes: 4 additions & 4 deletions sdk/resourcemover/arm-resourcemover/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "6a2e3c7617314fe4ea7e5706da5437214e8a602b",
"commit": "61b2b4b394584ef5e9a76bc6e023ba5604a1b510",
"readme": "specification/resourcemover/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\\resourcemover\\resource-manager\\readme.md --use=@autorest/typescript@6.0.9 --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/resourcemover/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.2",
"use": "@autorest/typescript@6.0.9"
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.4",
"use": "@autorest/typescript@^6.0.12"
}
18 changes: 6 additions & 12 deletions sdk/resourcemover/arm-resourcemover/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 ResourceMoverServiceAPI.",
"version": "2.2.0",
"version": "2.3.0",
"engines": {
"node": ">=18.0.0"
},
Expand Down Expand Up @@ -34,15 +34,17 @@
"uglify-js": "^3.4.9",
"rimraf": "^5.0.0",
"dotenv": "^16.0.0",
"@azure/dev-tool": "^1.0.0",
"@azure/identity": "^3.3.0",
"@azure-tools/test-recorder": "^3.0.0",
"@azure-tools/test-credential": "^1.0.0",
"mocha": "^10.0.0",
"@types/mocha": "^10.0.0",
"esm": "^3.2.18",
"@types/chai": "^4.2.8",
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"@types/node": "^18.0.0",
"@azure/dev-tool": "^1.0.0",
"ts-node": "^10.0.0"
},
"repository": {
Expand Down Expand Up @@ -105,13 +107,5 @@
]
},
"autoPublish": true,
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/resourcemover/arm-resourcemover",
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-resourcemover?view=azure-node-preview"
}
}
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/resourcemover/arm-resourcemover"
}
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,9 @@ export interface MoveResourceProperties {
dependsOnOverrides?: MoveResourceDependencyOverride[];
readonly errors?: MoveResourcePropertiesErrors;
existingTargetId?: string;
readonly extendedMoveResourceProperties?: {
[propertyName: string]: string;
};
readonly isResolveRequired?: boolean;
readonly moveStatus?: MoveResourcePropertiesMoveStatus;
readonly provisioningState?: ProvisioningState;
Expand Down Expand Up @@ -738,6 +741,9 @@ export type ResourceIdentityType = string;

// @public
export interface ResourceMoveRequest {
extendedMoveProperties?: {
[propertyName: string]: string;
};
moveResourceInputType?: MoveResourceInputType;
moveResources: string[];
validateOnly?: boolean;
Expand Down Expand Up @@ -775,6 +781,7 @@ export interface ResourceSettings {
resourceType: "Microsoft.Compute/virtualMachines" | "Microsoft.Compute/availabilitySets" | "Microsoft.Network/virtualNetworks" | "Microsoft.Network/networkInterfaces" | "Microsoft.Network/networkSecurityGroups" | "Microsoft.Network/loadBalancers" | "Microsoft.Sql/servers" | "Microsoft.Sql/servers/elasticPools" | "Microsoft.Sql/servers/databases" | "resourceGroups" | "Microsoft.Network/publicIPAddresses" | "Microsoft.KeyVault/vaults" | "Microsoft.Compute/diskEncryptionSets";
targetResourceGroupName?: string;
targetResourceName?: string;
targetSubscriptionId?: string;
}

// @public (undocumented)
Expand Down Expand Up @@ -810,6 +817,7 @@ export interface SubnetReference extends ProxyResourceReference {
// @public
export interface SubnetResourceSettings {
addressPrefix?: string;
addressPrefixes?: string[];
name?: string;
networkSecurityGroup?: NsgReference;
}
Expand Down
11 changes: 11 additions & 0 deletions sdk/resourcemover/arm-resourcemover/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,8 @@ export interface ResourceMoveRequest {
moveResources: string[];
/** Defines the move resource input type. */
moveResourceInputType?: MoveResourceInputType;
/** Gets or sets the extended move properties. */
extendedMoveProperties?: { [propertyName: string]: string };
}

/** Defines the request body for commit operation. */
Expand Down Expand Up @@ -398,6 +400,11 @@ export interface MoveResourceProperties {
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly errors?: MoveResourcePropertiesErrors;
/**
* Gets or sets the extended move resource properties.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly extendedMoveResourceProperties?: { [propertyName: string]: string };
}

/** Gets or sets the resource settings. */
Expand All @@ -421,6 +428,8 @@ export interface ResourceSettings {
targetResourceName?: string;
/** Gets or sets the target resource group name. */
targetResourceGroupName?: string;
/** Gets or sets the target subscription Id. */
targetSubscriptionId?: string;
}

/** Defines the move resource status. */
Expand Down Expand Up @@ -694,6 +703,8 @@ export interface SubnetResourceSettings {
name?: string;
/** Gets or sets address prefix for the subnet. */
addressPrefix?: string;
/** Gets or sets multiple address prefixes for the subnet. */
addressPrefixes?: string[];
/** Defines reference to NSG. */
networkSecurityGroup?: NsgReference;
}
Expand Down
32 changes: 32 additions & 0 deletions sdk/resourcemover/arm-resourcemover/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,13 @@ export const ResourceMoveRequest: coreClient.CompositeMapper = {
type: {
name: "String"
}
},
extendedMoveProperties: {
serializedName: "extendedMoveProperties",
type: {
name: "Dictionary",
value: { type: { name: "String" } }
}
}
}
}
Expand Down Expand Up @@ -838,6 +845,14 @@ export const MoveResourceProperties: coreClient.CompositeMapper = {
name: "Composite",
className: "MoveResourcePropertiesErrors"
}
},
extendedMoveResourceProperties: {
serializedName: "extendedMoveResourceProperties",
readOnly: true,
type: {
name: "Dictionary",
value: { type: { name: "String" } }
}
}
}
}
Expand Down Expand Up @@ -871,6 +886,12 @@ export const ResourceSettings: coreClient.CompositeMapper = {
type: {
name: "String"
}
},
targetSubscriptionId: {
serializedName: "targetSubscriptionId",
type: {
name: "String"
}
}
}
}
Expand Down Expand Up @@ -1402,6 +1423,17 @@ export const SubnetResourceSettings: coreClient.CompositeMapper = {
name: "String"
}
},
addressPrefixes: {
serializedName: "addressPrefixes",
type: {
name: "Sequence",
element: {
type: {
name: "String"
}
}
}
},
networkSecurityGroup: {
serializedName: "networkSecurityGroup",
type: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export const moveCollectionName: OperationURLParameter = {
export const apiVersion: OperationQueryParameter = {
parameterPath: "apiVersion",
mapper: {
defaultValue: "2023-08-01",
defaultValue: "2024-01-01",
isConstant: true,
serializedName: "api-version",
type: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export class ResourceMoverServiceAPI extends coreClient.ServiceClient {
credential: credentials
};

const packageDetails = `azsdk-js-arm-resourcemover/2.2.0`;
const packageDetails = `azsdk-js-arm-resourcemover/2.3.0`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
Expand Down Expand Up @@ -127,7 +127,7 @@ export class ResourceMoverServiceAPI extends coreClient.ServiceClient {

// Assigning values to Constant parameters
this.$host = options.$host || "https://management.azure.com";
this.apiVersion = options.apiVersion || "2023-08-01";
this.apiVersion = options.apiVersion || "2024-01-01";
this.moveCollections = new MoveCollectionsImpl(this);
this.moveResources = new MoveResourcesImpl(this);
this.unresolvedDependencies = new UnresolvedDependenciesImpl(this);
Expand Down
43 changes: 43 additions & 0 deletions sdk/resourcemover/arm-resourcemover/test/sampleTest.ts
Original file line number Diff line number Diff line change
@@ -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<string, string> = {
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!");
});
});
10 changes: 2 additions & 8 deletions sdk/resourcemover/arm-resourcemover/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,11 @@
],
"declaration": true,
"outDir": "./dist-esm",
"importHelpers": true,
"paths": {
"@azure/arm-resourcemover": [
"./src/index"
]
}
"importHelpers": true
},
"include": [
"./src/**/*.ts",
"./test/**/*.ts",
"samples-dev/**/*.ts"
"./test/**/*.ts"
],
"exclude": [
"node_modules"
Expand Down

0 comments on commit c764559

Please sign in to comment.