Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR @azure/arm-resourcemover] New api version for resource mover 2024-01-01 #8091

Closed
wants to merge 1 commit into from
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
752 changes: 377 additions & 375 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

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

## 2.3.0 (2024-01-03)

**Features**

- 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
2 changes: 1 addition & 1 deletion sdk/resourcemover/arm-resourcemover/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/resourcemover/arm-resourcemover/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "6a2e3c7617314fe4ea7e5706da5437214e8a602b",
"commit": "9dad4b44bdf659d4c0c4d1990411e1830fbb76d0",
"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 @@ -775,6 +775,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 +811,7 @@ export interface SubnetReference extends ProxyResourceReference {
// @public
export interface SubnetResourceSettings {
addressPrefix?: string;
addressPrefixes?: string[];
name?: string;
networkSecurityGroup?: NsgReference;
}
Expand Down
4 changes: 4 additions & 0 deletions sdk/resourcemover/arm-resourcemover/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,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 +696,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
17 changes: 17 additions & 0 deletions sdk/resourcemover/arm-resourcemover/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,12 @@ export const ResourceSettings: coreClient.CompositeMapper = {
type: {
name: "String"
}
},
targetSubscriptionId: {
serializedName: "targetSubscriptionId",
type: {
name: "String"
}
}
}
}
Expand Down Expand Up @@ -1402,6 +1408,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