[mgmt] chaos release (#28794)
https://github.com/Azure/sdk-release-request/issues/4974
This commit is contained in:
Родитель
74aa10884d
Коммит
96f6fa277b
|
@ -1,14 +1,11 @@
|
|||
# Release History
|
||||
|
||||
## 1.0.1 (Unreleased)
|
||||
## 1.1.0 (2024-03-06)
|
||||
|
||||
### Features Added
|
||||
**Features**
|
||||
|
||||
### Breaking Changes
|
||||
- Interface ExperimentUpdate has a new optional parameter tags
|
||||
|
||||
### Bugs Fixed
|
||||
|
||||
### Other Changes
|
||||
|
||||
## 1.0.0 (2023-11-06)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"commit": "b13bd252f5a0ae3e870dcd5fb4dc5c1389a7a734",
|
||||
"commit": "0bfc45106eea53d49f1b554c25c509a9fd69b9fa",
|
||||
"readme": "specification/chaos/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\\chaos\\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=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\chaos\\resource-manager\\readme.md --use=@autorest/typescript@6.0.17 --generate-sample=true",
|
||||
"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.12"
|
||||
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.4",
|
||||
"use": "@autorest/typescript@6.0.17"
|
||||
}
|
|
@ -2,5 +2,5 @@
|
|||
"AssetsRepo": "Azure/azure-sdk-assets",
|
||||
"AssetsRepoPrefixPath": "js",
|
||||
"TagPrefix": "js/chaos/arm-chaos",
|
||||
"Tag": "js/chaos/arm-chaos_1a87d04f89"
|
||||
"Tag": "js/chaos/arm-chaos_82425202d7"
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"sdk-type": "mgmt",
|
||||
"author": "Microsoft Corporation",
|
||||
"description": "A generated SDK for ChaosManagementClient.",
|
||||
"version": "1.0.1",
|
||||
"version": "1.1.0",
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
|
@ -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": [
|
||||
|
@ -79,7 +79,6 @@
|
|||
"pack": "npm pack 2>&1",
|
||||
"extract-api": "api-extractor run --local",
|
||||
"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",
|
||||
|
|
|
@ -488,6 +488,9 @@ export type ExperimentsUpdateResponse = Experiment;
|
|||
// @public
|
||||
export interface ExperimentUpdate {
|
||||
identity?: ResourceIdentity;
|
||||
tags?: {
|
||||
[propertyName: string]: string;
|
||||
};
|
||||
}
|
||||
|
||||
// @public
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Create or update a Capability resource that extends a Target resource.
|
||||
*
|
||||
* @summary Create or update a Capability resource that extends a Target resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/CreateUpdateCapability.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CreateUpdateCapability.json
|
||||
*/
|
||||
async function createOrUpdateACapabilityThatExtendsAVirtualMachineTargetResource() {
|
||||
const subscriptionId =
|
||||
|
@ -40,7 +40,7 @@ async function createOrUpdateACapabilityThatExtendsAVirtualMachineTargetResource
|
|||
parentResourceName,
|
||||
targetName,
|
||||
capabilityName,
|
||||
capability
|
||||
capability,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Delete a Capability that extends a Target resource.
|
||||
*
|
||||
* @summary Delete a Capability that extends a Target resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/DeleteCapability.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/DeleteCapability.json
|
||||
*/
|
||||
async function deleteACapabilityThatExtendsAVirtualMachineTargetResource() {
|
||||
const subscriptionId =
|
||||
|
@ -38,7 +38,7 @@ async function deleteACapabilityThatExtendsAVirtualMachineTargetResource() {
|
|||
parentResourceType,
|
||||
parentResourceName,
|
||||
targetName,
|
||||
capabilityName
|
||||
capabilityName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a Capability resource that extends a Target resource.
|
||||
*
|
||||
* @summary Get a Capability resource that extends a Target resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetCapability.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetCapability.json
|
||||
*/
|
||||
async function getACapabilityThatExtendsAVirtualMachineTargetResource() {
|
||||
const subscriptionId =
|
||||
|
@ -38,7 +38,7 @@ async function getACapabilityThatExtendsAVirtualMachineTargetResource() {
|
|||
parentResourceType,
|
||||
parentResourceName,
|
||||
targetName,
|
||||
capabilityName
|
||||
capabilityName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a list of Capability resources that extend a Target resource..
|
||||
*
|
||||
* @summary Get a list of Capability resources that extend a Target resource..
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListCapabilities.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListCapabilities.json
|
||||
*/
|
||||
async function listAllCapabilitiesThatExtendAVirtualMachineTargetResource() {
|
||||
const subscriptionId =
|
||||
|
@ -37,7 +37,7 @@ async function listAllCapabilitiesThatExtendAVirtualMachineTargetResource() {
|
|||
parentProviderNamespace,
|
||||
parentResourceType,
|
||||
parentResourceName,
|
||||
targetName
|
||||
targetName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a Capability Type resource for given Target Type and location.
|
||||
*
|
||||
* @summary Get a Capability Type resource for given Target Type and location.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetCapabilityType.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetCapabilityType.json
|
||||
*/
|
||||
async function getACapabilityTypeForAVirtualMachineTargetResourceOnWestus2Location() {
|
||||
const subscriptionId =
|
||||
|
@ -32,7 +32,7 @@ async function getACapabilityTypeForAVirtualMachineTargetResourceOnWestus2Locati
|
|||
const result = await client.capabilityTypes.get(
|
||||
locationName,
|
||||
targetTypeName,
|
||||
capabilityTypeName
|
||||
capabilityTypeName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a list of Capability Type resources for given Target Type and location.
|
||||
*
|
||||
* @summary Get a list of Capability Type resources for given Target Type and location.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListCapabilityTypes.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListCapabilityTypes.json
|
||||
*/
|
||||
async function listAllCapabilityTypesForAVirtualMachineTargetResourceOnWestus2Location() {
|
||||
const subscriptionId =
|
||||
|
@ -31,7 +31,7 @@ async function listAllCapabilityTypesForAVirtualMachineTargetResourceOnWestus2Lo
|
|||
const resArray = new Array();
|
||||
for await (let item of client.capabilityTypes.list(
|
||||
locationName,
|
||||
targetTypeName
|
||||
targetTypeName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Cancel a running Experiment resource.
|
||||
*
|
||||
* @summary Cancel a running Experiment resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/CancelExperiment.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CancelExperiment.json
|
||||
*/
|
||||
async function cancelARunningExperiment() {
|
||||
const subscriptionId =
|
||||
|
@ -30,7 +30,7 @@ async function cancelARunningExperiment() {
|
|||
const client = new ChaosManagementClient(credential, subscriptionId);
|
||||
const result = await client.experiments.beginCancelAndWait(
|
||||
resourceGroupName,
|
||||
experimentName
|
||||
experimentName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Create or update a Experiment resource.
|
||||
*
|
||||
* @summary Create or update a Experiment resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/CreateUpdateExperiment.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CreateUpdateExperiment.json
|
||||
*/
|
||||
async function createOrUpdateAExperimentInAResourceGroup() {
|
||||
const subscriptionId =
|
||||
|
@ -36,11 +36,10 @@ async function createOrUpdateAExperimentInAResourceGroup() {
|
|||
targets: [
|
||||
{
|
||||
type: "ChaosTarget",
|
||||
id:
|
||||
"/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine"
|
||||
}
|
||||
]
|
||||
}
|
||||
id: "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
steps: [
|
||||
{
|
||||
|
@ -54,20 +53,20 @@ async function createOrUpdateAExperimentInAResourceGroup() {
|
|||
type: "continuous",
|
||||
duration: "PT10M",
|
||||
parameters: [{ key: "abruptShutdown", value: "false" }],
|
||||
selectorId: "selector1"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
selectorId: "selector1",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ChaosManagementClient(credential, subscriptionId);
|
||||
const result = await client.experiments.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
experimentName,
|
||||
experiment
|
||||
experiment,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Delete a Experiment resource.
|
||||
*
|
||||
* @summary Delete a Experiment resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/DeleteExperiment.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/DeleteExperiment.json
|
||||
*/
|
||||
async function deleteAExperimentInAResourceGroup() {
|
||||
const subscriptionId =
|
||||
|
@ -30,7 +30,7 @@ async function deleteAExperimentInAResourceGroup() {
|
|||
const client = new ChaosManagementClient(credential, subscriptionId);
|
||||
const result = await client.experiments.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
experimentName
|
||||
experimentName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Execution details of an experiment resource.
|
||||
*
|
||||
* @summary Execution details of an experiment resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/DetailsExperiment.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/DetailsExperiment.json
|
||||
*/
|
||||
async function getExperimentExecutionDetails() {
|
||||
const subscriptionId =
|
||||
|
@ -32,7 +32,7 @@ async function getExperimentExecutionDetails() {
|
|||
const result = await client.experiments.executionDetails(
|
||||
resourceGroupName,
|
||||
experimentName,
|
||||
executionId
|
||||
executionId,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get an execution of an Experiment resource.
|
||||
*
|
||||
* @summary Get an execution of an Experiment resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetExperimentExecution.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetExperimentExecution.json
|
||||
*/
|
||||
async function getTheExecutionOfAExperiment() {
|
||||
const subscriptionId =
|
||||
|
@ -32,7 +32,7 @@ async function getTheExecutionOfAExperiment() {
|
|||
const result = await client.experiments.getExecution(
|
||||
resourceGroupName,
|
||||
experimentName,
|
||||
executionId
|
||||
executionId,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a Experiment resource.
|
||||
*
|
||||
* @summary Get a Experiment resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetExperiment.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetExperiment.json
|
||||
*/
|
||||
async function getAExperimentInAResourceGroup() {
|
||||
const subscriptionId =
|
||||
|
@ -30,7 +30,7 @@ async function getAExperimentInAResourceGroup() {
|
|||
const client = new ChaosManagementClient(credential, subscriptionId);
|
||||
const result = await client.experiments.get(
|
||||
resourceGroupName,
|
||||
experimentName
|
||||
experimentName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a list of executions of an Experiment resource.
|
||||
*
|
||||
* @summary Get a list of executions of an Experiment resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListExperimentExecutions.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListExperimentExecutions.json
|
||||
*/
|
||||
async function listAllExecutionsOfAnExperiment() {
|
||||
const subscriptionId =
|
||||
|
@ -31,7 +31,7 @@ async function listAllExecutionsOfAnExperiment() {
|
|||
const resArray = new Array();
|
||||
for await (let item of client.experiments.listAllExecutions(
|
||||
resourceGroupName,
|
||||
experimentName
|
||||
experimentName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// Licensed under the MIT License.
|
||||
import {
|
||||
ExperimentsListAllOptionalParams,
|
||||
ChaosManagementClient
|
||||
ChaosManagementClient,
|
||||
} from "@azure/arm-chaos";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a list of Experiment resources in a subscription.
|
||||
*
|
||||
* @summary Get a list of Experiment resources in a subscription.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListExperimentsInASubscription.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListExperimentsInASubscription.json
|
||||
*/
|
||||
async function listAllExperimentsInASubscription() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// Licensed under the MIT License.
|
||||
import {
|
||||
ExperimentsListOptionalParams,
|
||||
ChaosManagementClient
|
||||
ChaosManagementClient,
|
||||
} from "@azure/arm-chaos";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a list of Experiment resources in a resource group.
|
||||
*
|
||||
* @summary Get a list of Experiment resources in a resource group.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListExperimentsInAResourceGroup.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListExperimentsInAResourceGroup.json
|
||||
*/
|
||||
async function listAllExperimentsInAResourceGroup() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Start a Experiment resource.
|
||||
*
|
||||
* @summary Start a Experiment resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/StartExperiment.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/StartExperiment.json
|
||||
*/
|
||||
async function startAExperiment() {
|
||||
const subscriptionId =
|
||||
|
@ -30,7 +30,7 @@ async function startAExperiment() {
|
|||
const client = new ChaosManagementClient(credential, subscriptionId);
|
||||
const result = await client.experiments.beginStartAndWait(
|
||||
resourceGroupName,
|
||||
experimentName
|
||||
experimentName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to The operation to update an experiment.
|
||||
*
|
||||
* @summary The operation to update an experiment.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/UpdateExperiment.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/UpdateExperiment.json
|
||||
*/
|
||||
async function updateAnExperimentInAResourceGroup() {
|
||||
const subscriptionId =
|
||||
|
@ -30,16 +30,18 @@ async function updateAnExperimentInAResourceGroup() {
|
|||
identity: {
|
||||
type: "UserAssigned",
|
||||
userAssignedIdentities: {
|
||||
"/subscriptions/6b052e1503d34f17B2e1Be7f07588291/resourceGroups/exampleRG/providers/MicrosoftManagedIdentity/userAssignedIdentity/exampleUMI": {}
|
||||
}
|
||||
}
|
||||
"/subscriptions/6b052e1503d34f17B2e1Be7f07588291/resourceGroups/exampleRG/providers/MicrosoftManagedIdentity/userAssignedIdentity/exampleUMI":
|
||||
{},
|
||||
},
|
||||
},
|
||||
tags: { key1: "value1", key2: "value2" },
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ChaosManagementClient(credential, subscriptionId);
|
||||
const result = await client.experiments.beginUpdateAndWait(
|
||||
resourceGroupName,
|
||||
experimentName,
|
||||
experiment
|
||||
experiment,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get the status of a long running azure asynchronous operation.
|
||||
*
|
||||
* @summary Get the status of a long running azure asynchronous operation.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetOperationStatus.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetOperationStatus.json
|
||||
*/
|
||||
async function getSpecificOperationStatus() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a Target Type resources for given location.
|
||||
*
|
||||
* @summary Get a Target Type resources for given location.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetTargetType.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetTargetType.json
|
||||
*/
|
||||
async function getATargetTypeForWestus2Location() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// Licensed under the MIT License.
|
||||
import {
|
||||
TargetTypesListOptionalParams,
|
||||
ChaosManagementClient
|
||||
ChaosManagementClient,
|
||||
} from "@azure/arm-chaos";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a list of Target Type resources for given location.
|
||||
*
|
||||
* @summary Get a list of Target Type resources for given location.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListTargetTypes.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListTargetTypes.json
|
||||
*/
|
||||
async function listAllTargetTypesForWestus2Location() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Create or update a Target resource that extends a tracked regional resource.
|
||||
*
|
||||
* @summary Create or update a Target resource that extends a tracked regional resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/CreateUpdateTarget.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CreateUpdateTarget.json
|
||||
*/
|
||||
async function createOrUpdateATargetThatExtendsAVirtualMachineResource() {
|
||||
const subscriptionId =
|
||||
|
@ -32,9 +32,9 @@ async function createOrUpdateATargetThatExtendsAVirtualMachineResource() {
|
|||
const target: Target = {
|
||||
properties: {
|
||||
identities: [
|
||||
{ type: "CertificateSubjectIssuer", subject: "CN=example.subject" }
|
||||
]
|
||||
}
|
||||
{ type: "CertificateSubjectIssuer", subject: "CN=example.subject" },
|
||||
],
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ChaosManagementClient(credential, subscriptionId);
|
||||
|
@ -44,7 +44,7 @@ async function createOrUpdateATargetThatExtendsAVirtualMachineResource() {
|
|||
parentResourceType,
|
||||
parentResourceName,
|
||||
targetName,
|
||||
target
|
||||
target,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Delete a Target resource that extends a tracked regional resource.
|
||||
*
|
||||
* @summary Delete a Target resource that extends a tracked regional resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/DeleteTarget.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/DeleteTarget.json
|
||||
*/
|
||||
async function deleteATargetThatExtendsAVirtualMachineResource() {
|
||||
const subscriptionId =
|
||||
|
@ -36,7 +36,7 @@ async function deleteATargetThatExtendsAVirtualMachineResource() {
|
|||
parentProviderNamespace,
|
||||
parentResourceType,
|
||||
parentResourceName,
|
||||
targetName
|
||||
targetName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a Target resource that extends a tracked regional resource.
|
||||
*
|
||||
* @summary Get a Target resource that extends a tracked regional resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetTarget.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetTarget.json
|
||||
*/
|
||||
async function getATargetThatExtendsAVirtualMachineResource() {
|
||||
const subscriptionId =
|
||||
|
@ -36,7 +36,7 @@ async function getATargetThatExtendsAVirtualMachineResource() {
|
|||
parentProviderNamespace,
|
||||
parentResourceType,
|
||||
parentResourceName,
|
||||
targetName
|
||||
targetName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// Licensed under the MIT License.
|
||||
import {
|
||||
TargetsListOptionalParams,
|
||||
ChaosManagementClient
|
||||
ChaosManagementClient,
|
||||
} from "@azure/arm-chaos";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a list of Target resources that extend a tracked regional resource.
|
||||
*
|
||||
* @summary Get a list of Target resources that extend a tracked regional resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListTargets.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListTargets.json
|
||||
*/
|
||||
async function listAllTargetsThatExtendAVirtualMachineResource() {
|
||||
const subscriptionId =
|
||||
|
@ -41,7 +41,7 @@ async function listAllTargetsThatExtendAVirtualMachineResource() {
|
|||
parentProviderNamespace,
|
||||
parentResourceType,
|
||||
parentResourceName,
|
||||
options
|
||||
options,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -4,30 +4,30 @@ These sample programs show how to use the JavaScript client libraries for in som
|
|||
|
||||
| **File Name** | **Description** |
|
||||
| --------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [capabilitiesCreateOrUpdateSample.js][capabilitiescreateorupdatesample] | Create or update a Capability resource that extends a Target resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/CreateUpdateCapability.json |
|
||||
| [capabilitiesDeleteSample.js][capabilitiesdeletesample] | Delete a Capability that extends a Target resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/DeleteCapability.json |
|
||||
| [capabilitiesGetSample.js][capabilitiesgetsample] | Get a Capability resource that extends a Target resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetCapability.json |
|
||||
| [capabilitiesListSample.js][capabilitieslistsample] | Get a list of Capability resources that extend a Target resource.. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListCapabilities.json |
|
||||
| [capabilityTypesGetSample.js][capabilitytypesgetsample] | Get a Capability Type resource for given Target Type and location. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetCapabilityType.json |
|
||||
| [capabilityTypesListSample.js][capabilitytypeslistsample] | Get a list of Capability Type resources for given Target Type and location. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListCapabilityTypes.json |
|
||||
| [experimentsCancelSample.js][experimentscancelsample] | Cancel a running Experiment resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/CancelExperiment.json |
|
||||
| [experimentsCreateOrUpdateSample.js][experimentscreateorupdatesample] | Create or update a Experiment resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/CreateUpdateExperiment.json |
|
||||
| [experimentsDeleteSample.js][experimentsdeletesample] | Delete a Experiment resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/DeleteExperiment.json |
|
||||
| [experimentsExecutionDetailsSample.js][experimentsexecutiondetailssample] | Execution details of an experiment resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/DetailsExperiment.json |
|
||||
| [experimentsGetExecutionSample.js][experimentsgetexecutionsample] | Get an execution of an Experiment resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetExperimentExecution.json |
|
||||
| [experimentsGetSample.js][experimentsgetsample] | Get a Experiment resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetExperiment.json |
|
||||
| [experimentsListAllExecutionsSample.js][experimentslistallexecutionssample] | Get a list of executions of an Experiment resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListExperimentExecutions.json |
|
||||
| [experimentsListAllSample.js][experimentslistallsample] | Get a list of Experiment resources in a subscription. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListExperimentsInASubscription.json |
|
||||
| [experimentsListSample.js][experimentslistsample] | Get a list of Experiment resources in a resource group. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListExperimentsInAResourceGroup.json |
|
||||
| [experimentsStartSample.js][experimentsstartsample] | Start a Experiment resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/StartExperiment.json |
|
||||
| [experimentsUpdateSample.js][experimentsupdatesample] | The operation to update an experiment. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/UpdateExperiment.json |
|
||||
| [operationStatusesGetSample.js][operationstatusesgetsample] | Get the status of a long running azure asynchronous operation. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetOperationStatus.json |
|
||||
| [targetTypesGetSample.js][targettypesgetsample] | Get a Target Type resources for given location. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetTargetType.json |
|
||||
| [targetTypesListSample.js][targettypeslistsample] | Get a list of Target Type resources for given location. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListTargetTypes.json |
|
||||
| [targetsCreateOrUpdateSample.js][targetscreateorupdatesample] | Create or update a Target resource that extends a tracked regional resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/CreateUpdateTarget.json |
|
||||
| [targetsDeleteSample.js][targetsdeletesample] | Delete a Target resource that extends a tracked regional resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/DeleteTarget.json |
|
||||
| [targetsGetSample.js][targetsgetsample] | Get a Target resource that extends a tracked regional resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetTarget.json |
|
||||
| [targetsListSample.js][targetslistsample] | Get a list of Target resources that extend a tracked regional resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListTargets.json |
|
||||
| [capabilitiesCreateOrUpdateSample.js][capabilitiescreateorupdatesample] | Create or update a Capability resource that extends a Target resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CreateUpdateCapability.json |
|
||||
| [capabilitiesDeleteSample.js][capabilitiesdeletesample] | Delete a Capability that extends a Target resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/DeleteCapability.json |
|
||||
| [capabilitiesGetSample.js][capabilitiesgetsample] | Get a Capability resource that extends a Target resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetCapability.json |
|
||||
| [capabilitiesListSample.js][capabilitieslistsample] | Get a list of Capability resources that extend a Target resource.. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListCapabilities.json |
|
||||
| [capabilityTypesGetSample.js][capabilitytypesgetsample] | Get a Capability Type resource for given Target Type and location. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetCapabilityType.json |
|
||||
| [capabilityTypesListSample.js][capabilitytypeslistsample] | Get a list of Capability Type resources for given Target Type and location. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListCapabilityTypes.json |
|
||||
| [experimentsCancelSample.js][experimentscancelsample] | Cancel a running Experiment resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CancelExperiment.json |
|
||||
| [experimentsCreateOrUpdateSample.js][experimentscreateorupdatesample] | Create or update a Experiment resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CreateUpdateExperiment.json |
|
||||
| [experimentsDeleteSample.js][experimentsdeletesample] | Delete a Experiment resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/DeleteExperiment.json |
|
||||
| [experimentsExecutionDetailsSample.js][experimentsexecutiondetailssample] | Execution details of an experiment resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/DetailsExperiment.json |
|
||||
| [experimentsGetExecutionSample.js][experimentsgetexecutionsample] | Get an execution of an Experiment resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetExperimentExecution.json |
|
||||
| [experimentsGetSample.js][experimentsgetsample] | Get a Experiment resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetExperiment.json |
|
||||
| [experimentsListAllExecutionsSample.js][experimentslistallexecutionssample] | Get a list of executions of an Experiment resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListExperimentExecutions.json |
|
||||
| [experimentsListAllSample.js][experimentslistallsample] | Get a list of Experiment resources in a subscription. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListExperimentsInASubscription.json |
|
||||
| [experimentsListSample.js][experimentslistsample] | Get a list of Experiment resources in a resource group. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListExperimentsInAResourceGroup.json |
|
||||
| [experimentsStartSample.js][experimentsstartsample] | Start a Experiment resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/StartExperiment.json |
|
||||
| [experimentsUpdateSample.js][experimentsupdatesample] | The operation to update an experiment. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/UpdateExperiment.json |
|
||||
| [operationStatusesGetSample.js][operationstatusesgetsample] | Get the status of a long running azure asynchronous operation. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetOperationStatus.json |
|
||||
| [targetTypesGetSample.js][targettypesgetsample] | Get a Target Type resources for given location. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetTargetType.json |
|
||||
| [targetTypesListSample.js][targettypeslistsample] | Get a list of Target Type resources for given location. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListTargetTypes.json |
|
||||
| [targetsCreateOrUpdateSample.js][targetscreateorupdatesample] | Create or update a Target resource that extends a tracked regional resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CreateUpdateTarget.json |
|
||||
| [targetsDeleteSample.js][targetsdeletesample] | Delete a Target resource that extends a tracked regional resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/DeleteTarget.json |
|
||||
| [targetsGetSample.js][targetsgetsample] | Get a Target resource that extends a tracked regional resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetTarget.json |
|
||||
| [targetsListSample.js][targetslistsample] | Get a list of Target resources that extend a tracked regional resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListTargets.json |
|
||||
|
||||
## Prerequisites
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Create or update a Capability resource that extends a Target resource.
|
||||
*
|
||||
* @summary Create or update a Capability resource that extends a Target resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/CreateUpdateCapability.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CreateUpdateCapability.json
|
||||
*/
|
||||
async function createOrUpdateACapabilityThatExtendsAVirtualMachineTargetResource() {
|
||||
const subscriptionId =
|
||||
|
@ -37,7 +37,7 @@ async function createOrUpdateACapabilityThatExtendsAVirtualMachineTargetResource
|
|||
parentResourceName,
|
||||
targetName,
|
||||
capabilityName,
|
||||
capability
|
||||
capability,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Delete a Capability that extends a Target resource.
|
||||
*
|
||||
* @summary Delete a Capability that extends a Target resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/DeleteCapability.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/DeleteCapability.json
|
||||
*/
|
||||
async function deleteACapabilityThatExtendsAVirtualMachineTargetResource() {
|
||||
const subscriptionId =
|
||||
|
@ -35,7 +35,7 @@ async function deleteACapabilityThatExtendsAVirtualMachineTargetResource() {
|
|||
parentResourceType,
|
||||
parentResourceName,
|
||||
targetName,
|
||||
capabilityName
|
||||
capabilityName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Get a Capability resource that extends a Target resource.
|
||||
*
|
||||
* @summary Get a Capability resource that extends a Target resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetCapability.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetCapability.json
|
||||
*/
|
||||
async function getACapabilityThatExtendsAVirtualMachineTargetResource() {
|
||||
const subscriptionId =
|
||||
|
@ -35,7 +35,7 @@ async function getACapabilityThatExtendsAVirtualMachineTargetResource() {
|
|||
parentResourceType,
|
||||
parentResourceName,
|
||||
targetName,
|
||||
capabilityName
|
||||
capabilityName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Get a list of Capability resources that extend a Target resource..
|
||||
*
|
||||
* @summary Get a list of Capability resources that extend a Target resource..
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListCapabilities.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListCapabilities.json
|
||||
*/
|
||||
async function listAllCapabilitiesThatExtendAVirtualMachineTargetResource() {
|
||||
const subscriptionId =
|
||||
|
@ -34,7 +34,7 @@ async function listAllCapabilitiesThatExtendAVirtualMachineTargetResource() {
|
|||
parentProviderNamespace,
|
||||
parentResourceType,
|
||||
parentResourceName,
|
||||
targetName
|
||||
targetName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Get a Capability Type resource for given Target Type and location.
|
||||
*
|
||||
* @summary Get a Capability Type resource for given Target Type and location.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetCapabilityType.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetCapabilityType.json
|
||||
*/
|
||||
async function getACapabilityTypeForAVirtualMachineTargetResourceOnWestus2Location() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Get a list of Capability Type resources for given Target Type and location.
|
||||
*
|
||||
* @summary Get a list of Capability Type resources for given Target Type and location.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListCapabilityTypes.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListCapabilityTypes.json
|
||||
*/
|
||||
async function listAllCapabilityTypesForAVirtualMachineTargetResourceOnWestus2Location() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Cancel a running Experiment resource.
|
||||
*
|
||||
* @summary Cancel a running Experiment resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/CancelExperiment.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CancelExperiment.json
|
||||
*/
|
||||
async function cancelARunningExperiment() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Create or update a Experiment resource.
|
||||
*
|
||||
* @summary Create or update a Experiment resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/CreateUpdateExperiment.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CreateUpdateExperiment.json
|
||||
*/
|
||||
async function createOrUpdateAExperimentInAResourceGroup() {
|
||||
const subscriptionId =
|
||||
|
@ -63,7 +63,7 @@ async function createOrUpdateAExperimentInAResourceGroup() {
|
|||
const result = await client.experiments.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
experimentName,
|
||||
experiment
|
||||
experiment,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Delete a Experiment resource.
|
||||
*
|
||||
* @summary Delete a Experiment resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/DeleteExperiment.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/DeleteExperiment.json
|
||||
*/
|
||||
async function deleteAExperimentInAResourceGroup() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Execution details of an experiment resource.
|
||||
*
|
||||
* @summary Execution details of an experiment resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/DetailsExperiment.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/DetailsExperiment.json
|
||||
*/
|
||||
async function getExperimentExecutionDetails() {
|
||||
const subscriptionId =
|
||||
|
@ -29,7 +29,7 @@ async function getExperimentExecutionDetails() {
|
|||
const result = await client.experiments.executionDetails(
|
||||
resourceGroupName,
|
||||
experimentName,
|
||||
executionId
|
||||
executionId,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Get an execution of an Experiment resource.
|
||||
*
|
||||
* @summary Get an execution of an Experiment resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetExperimentExecution.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetExperimentExecution.json
|
||||
*/
|
||||
async function getTheExecutionOfAExperiment() {
|
||||
const subscriptionId =
|
||||
|
@ -29,7 +29,7 @@ async function getTheExecutionOfAExperiment() {
|
|||
const result = await client.experiments.getExecution(
|
||||
resourceGroupName,
|
||||
experimentName,
|
||||
executionId
|
||||
executionId,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Get a Experiment resource.
|
||||
*
|
||||
* @summary Get a Experiment resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetExperiment.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetExperiment.json
|
||||
*/
|
||||
async function getAExperimentInAResourceGroup() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Get a list of executions of an Experiment resource.
|
||||
*
|
||||
* @summary Get a list of executions of an Experiment resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListExperimentExecutions.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListExperimentExecutions.json
|
||||
*/
|
||||
async function listAllExecutionsOfAnExperiment() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Get a list of Experiment resources in a subscription.
|
||||
*
|
||||
* @summary Get a list of Experiment resources in a subscription.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListExperimentsInASubscription.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListExperimentsInASubscription.json
|
||||
*/
|
||||
async function listAllExperimentsInASubscription() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Get a list of Experiment resources in a resource group.
|
||||
*
|
||||
* @summary Get a list of Experiment resources in a resource group.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListExperimentsInAResourceGroup.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListExperimentsInAResourceGroup.json
|
||||
*/
|
||||
async function listAllExperimentsInAResourceGroup() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Start a Experiment resource.
|
||||
*
|
||||
* @summary Start a Experiment resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/StartExperiment.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/StartExperiment.json
|
||||
*/
|
||||
async function startAExperiment() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to The operation to update an experiment.
|
||||
*
|
||||
* @summary The operation to update an experiment.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/UpdateExperiment.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/UpdateExperiment.json
|
||||
*/
|
||||
async function updateAnExperimentInAResourceGroup() {
|
||||
const subscriptionId =
|
||||
|
@ -31,13 +31,14 @@ async function updateAnExperimentInAResourceGroup() {
|
|||
{},
|
||||
},
|
||||
},
|
||||
tags: { key1: "value1", key2: "value2" },
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ChaosManagementClient(credential, subscriptionId);
|
||||
const result = await client.experiments.beginUpdateAndWait(
|
||||
resourceGroupName,
|
||||
experimentName,
|
||||
experiment
|
||||
experiment,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Get the status of a long running azure asynchronous operation.
|
||||
*
|
||||
* @summary Get the status of a long running azure asynchronous operation.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetOperationStatus.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetOperationStatus.json
|
||||
*/
|
||||
async function getSpecificOperationStatus() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Get a Target Type resources for given location.
|
||||
*
|
||||
* @summary Get a Target Type resources for given location.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetTargetType.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetTargetType.json
|
||||
*/
|
||||
async function getATargetTypeForWestus2Location() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Get a list of Target Type resources for given location.
|
||||
*
|
||||
* @summary Get a list of Target Type resources for given location.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListTargetTypes.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListTargetTypes.json
|
||||
*/
|
||||
async function listAllTargetTypesForWestus2Location() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Create or update a Target resource that extends a tracked regional resource.
|
||||
*
|
||||
* @summary Create or update a Target resource that extends a tracked regional resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/CreateUpdateTarget.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CreateUpdateTarget.json
|
||||
*/
|
||||
async function createOrUpdateATargetThatExtendsAVirtualMachineResource() {
|
||||
const subscriptionId =
|
||||
|
@ -39,7 +39,7 @@ async function createOrUpdateATargetThatExtendsAVirtualMachineResource() {
|
|||
parentResourceType,
|
||||
parentResourceName,
|
||||
targetName,
|
||||
target
|
||||
target,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Delete a Target resource that extends a tracked regional resource.
|
||||
*
|
||||
* @summary Delete a Target resource that extends a tracked regional resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/DeleteTarget.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/DeleteTarget.json
|
||||
*/
|
||||
async function deleteATargetThatExtendsAVirtualMachineResource() {
|
||||
const subscriptionId =
|
||||
|
@ -33,7 +33,7 @@ async function deleteATargetThatExtendsAVirtualMachineResource() {
|
|||
parentProviderNamespace,
|
||||
parentResourceType,
|
||||
parentResourceName,
|
||||
targetName
|
||||
targetName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Get a Target resource that extends a tracked regional resource.
|
||||
*
|
||||
* @summary Get a Target resource that extends a tracked regional resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetTarget.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetTarget.json
|
||||
*/
|
||||
async function getATargetThatExtendsAVirtualMachineResource() {
|
||||
const subscriptionId =
|
||||
|
@ -33,7 +33,7 @@ async function getATargetThatExtendsAVirtualMachineResource() {
|
|||
parentProviderNamespace,
|
||||
parentResourceType,
|
||||
parentResourceName,
|
||||
targetName
|
||||
targetName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ require("dotenv").config();
|
|||
* This sample demonstrates how to Get a list of Target resources that extend a tracked regional resource.
|
||||
*
|
||||
* @summary Get a list of Target resources that extend a tracked regional resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListTargets.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListTargets.json
|
||||
*/
|
||||
async function listAllTargetsThatExtendAVirtualMachineResource() {
|
||||
const subscriptionId =
|
||||
|
@ -35,7 +35,7 @@ async function listAllTargetsThatExtendAVirtualMachineResource() {
|
|||
parentProviderNamespace,
|
||||
parentResourceType,
|
||||
parentResourceName,
|
||||
options
|
||||
options,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -4,30 +4,30 @@ These sample programs show how to use the TypeScript client libraries for in som
|
|||
|
||||
| **File Name** | **Description** |
|
||||
| --------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [capabilitiesCreateOrUpdateSample.ts][capabilitiescreateorupdatesample] | Create or update a Capability resource that extends a Target resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/CreateUpdateCapability.json |
|
||||
| [capabilitiesDeleteSample.ts][capabilitiesdeletesample] | Delete a Capability that extends a Target resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/DeleteCapability.json |
|
||||
| [capabilitiesGetSample.ts][capabilitiesgetsample] | Get a Capability resource that extends a Target resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetCapability.json |
|
||||
| [capabilitiesListSample.ts][capabilitieslistsample] | Get a list of Capability resources that extend a Target resource.. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListCapabilities.json |
|
||||
| [capabilityTypesGetSample.ts][capabilitytypesgetsample] | Get a Capability Type resource for given Target Type and location. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetCapabilityType.json |
|
||||
| [capabilityTypesListSample.ts][capabilitytypeslistsample] | Get a list of Capability Type resources for given Target Type and location. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListCapabilityTypes.json |
|
||||
| [experimentsCancelSample.ts][experimentscancelsample] | Cancel a running Experiment resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/CancelExperiment.json |
|
||||
| [experimentsCreateOrUpdateSample.ts][experimentscreateorupdatesample] | Create or update a Experiment resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/CreateUpdateExperiment.json |
|
||||
| [experimentsDeleteSample.ts][experimentsdeletesample] | Delete a Experiment resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/DeleteExperiment.json |
|
||||
| [experimentsExecutionDetailsSample.ts][experimentsexecutiondetailssample] | Execution details of an experiment resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/DetailsExperiment.json |
|
||||
| [experimentsGetExecutionSample.ts][experimentsgetexecutionsample] | Get an execution of an Experiment resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetExperimentExecution.json |
|
||||
| [experimentsGetSample.ts][experimentsgetsample] | Get a Experiment resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetExperiment.json |
|
||||
| [experimentsListAllExecutionsSample.ts][experimentslistallexecutionssample] | Get a list of executions of an Experiment resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListExperimentExecutions.json |
|
||||
| [experimentsListAllSample.ts][experimentslistallsample] | Get a list of Experiment resources in a subscription. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListExperimentsInASubscription.json |
|
||||
| [experimentsListSample.ts][experimentslistsample] | Get a list of Experiment resources in a resource group. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListExperimentsInAResourceGroup.json |
|
||||
| [experimentsStartSample.ts][experimentsstartsample] | Start a Experiment resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/StartExperiment.json |
|
||||
| [experimentsUpdateSample.ts][experimentsupdatesample] | The operation to update an experiment. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/UpdateExperiment.json |
|
||||
| [operationStatusesGetSample.ts][operationstatusesgetsample] | Get the status of a long running azure asynchronous operation. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetOperationStatus.json |
|
||||
| [targetTypesGetSample.ts][targettypesgetsample] | Get a Target Type resources for given location. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetTargetType.json |
|
||||
| [targetTypesListSample.ts][targettypeslistsample] | Get a list of Target Type resources for given location. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListTargetTypes.json |
|
||||
| [targetsCreateOrUpdateSample.ts][targetscreateorupdatesample] | Create or update a Target resource that extends a tracked regional resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/CreateUpdateTarget.json |
|
||||
| [targetsDeleteSample.ts][targetsdeletesample] | Delete a Target resource that extends a tracked regional resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/DeleteTarget.json |
|
||||
| [targetsGetSample.ts][targetsgetsample] | Get a Target resource that extends a tracked regional resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetTarget.json |
|
||||
| [targetsListSample.ts][targetslistsample] | Get a list of Target resources that extend a tracked regional resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListTargets.json |
|
||||
| [capabilitiesCreateOrUpdateSample.ts][capabilitiescreateorupdatesample] | Create or update a Capability resource that extends a Target resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CreateUpdateCapability.json |
|
||||
| [capabilitiesDeleteSample.ts][capabilitiesdeletesample] | Delete a Capability that extends a Target resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/DeleteCapability.json |
|
||||
| [capabilitiesGetSample.ts][capabilitiesgetsample] | Get a Capability resource that extends a Target resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetCapability.json |
|
||||
| [capabilitiesListSample.ts][capabilitieslistsample] | Get a list of Capability resources that extend a Target resource.. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListCapabilities.json |
|
||||
| [capabilityTypesGetSample.ts][capabilitytypesgetsample] | Get a Capability Type resource for given Target Type and location. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetCapabilityType.json |
|
||||
| [capabilityTypesListSample.ts][capabilitytypeslistsample] | Get a list of Capability Type resources for given Target Type and location. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListCapabilityTypes.json |
|
||||
| [experimentsCancelSample.ts][experimentscancelsample] | Cancel a running Experiment resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CancelExperiment.json |
|
||||
| [experimentsCreateOrUpdateSample.ts][experimentscreateorupdatesample] | Create or update a Experiment resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CreateUpdateExperiment.json |
|
||||
| [experimentsDeleteSample.ts][experimentsdeletesample] | Delete a Experiment resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/DeleteExperiment.json |
|
||||
| [experimentsExecutionDetailsSample.ts][experimentsexecutiondetailssample] | Execution details of an experiment resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/DetailsExperiment.json |
|
||||
| [experimentsGetExecutionSample.ts][experimentsgetexecutionsample] | Get an execution of an Experiment resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetExperimentExecution.json |
|
||||
| [experimentsGetSample.ts][experimentsgetsample] | Get a Experiment resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetExperiment.json |
|
||||
| [experimentsListAllExecutionsSample.ts][experimentslistallexecutionssample] | Get a list of executions of an Experiment resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListExperimentExecutions.json |
|
||||
| [experimentsListAllSample.ts][experimentslistallsample] | Get a list of Experiment resources in a subscription. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListExperimentsInASubscription.json |
|
||||
| [experimentsListSample.ts][experimentslistsample] | Get a list of Experiment resources in a resource group. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListExperimentsInAResourceGroup.json |
|
||||
| [experimentsStartSample.ts][experimentsstartsample] | Start a Experiment resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/StartExperiment.json |
|
||||
| [experimentsUpdateSample.ts][experimentsupdatesample] | The operation to update an experiment. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/UpdateExperiment.json |
|
||||
| [operationStatusesGetSample.ts][operationstatusesgetsample] | Get the status of a long running azure asynchronous operation. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetOperationStatus.json |
|
||||
| [targetTypesGetSample.ts][targettypesgetsample] | Get a Target Type resources for given location. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetTargetType.json |
|
||||
| [targetTypesListSample.ts][targettypeslistsample] | Get a list of Target Type resources for given location. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListTargetTypes.json |
|
||||
| [targetsCreateOrUpdateSample.ts][targetscreateorupdatesample] | Create or update a Target resource that extends a tracked regional resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CreateUpdateTarget.json |
|
||||
| [targetsDeleteSample.ts][targetsdeletesample] | Delete a Target resource that extends a tracked regional resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/DeleteTarget.json |
|
||||
| [targetsGetSample.ts][targetsgetsample] | Get a Target resource that extends a tracked regional resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetTarget.json |
|
||||
| [targetsListSample.ts][targetslistsample] | Get a list of Target resources that extend a tracked regional resource. x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListTargets.json |
|
||||
|
||||
## Prerequisites
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Create or update a Capability resource that extends a Target resource.
|
||||
*
|
||||
* @summary Create or update a Capability resource that extends a Target resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/CreateUpdateCapability.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CreateUpdateCapability.json
|
||||
*/
|
||||
async function createOrUpdateACapabilityThatExtendsAVirtualMachineTargetResource() {
|
||||
const subscriptionId =
|
||||
|
@ -40,7 +40,7 @@ async function createOrUpdateACapabilityThatExtendsAVirtualMachineTargetResource
|
|||
parentResourceName,
|
||||
targetName,
|
||||
capabilityName,
|
||||
capability
|
||||
capability,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Delete a Capability that extends a Target resource.
|
||||
*
|
||||
* @summary Delete a Capability that extends a Target resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/DeleteCapability.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/DeleteCapability.json
|
||||
*/
|
||||
async function deleteACapabilityThatExtendsAVirtualMachineTargetResource() {
|
||||
const subscriptionId =
|
||||
|
@ -38,7 +38,7 @@ async function deleteACapabilityThatExtendsAVirtualMachineTargetResource() {
|
|||
parentResourceType,
|
||||
parentResourceName,
|
||||
targetName,
|
||||
capabilityName
|
||||
capabilityName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a Capability resource that extends a Target resource.
|
||||
*
|
||||
* @summary Get a Capability resource that extends a Target resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetCapability.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetCapability.json
|
||||
*/
|
||||
async function getACapabilityThatExtendsAVirtualMachineTargetResource() {
|
||||
const subscriptionId =
|
||||
|
@ -38,7 +38,7 @@ async function getACapabilityThatExtendsAVirtualMachineTargetResource() {
|
|||
parentResourceType,
|
||||
parentResourceName,
|
||||
targetName,
|
||||
capabilityName
|
||||
capabilityName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a list of Capability resources that extend a Target resource..
|
||||
*
|
||||
* @summary Get a list of Capability resources that extend a Target resource..
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListCapabilities.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListCapabilities.json
|
||||
*/
|
||||
async function listAllCapabilitiesThatExtendAVirtualMachineTargetResource() {
|
||||
const subscriptionId =
|
||||
|
@ -37,7 +37,7 @@ async function listAllCapabilitiesThatExtendAVirtualMachineTargetResource() {
|
|||
parentProviderNamespace,
|
||||
parentResourceType,
|
||||
parentResourceName,
|
||||
targetName
|
||||
targetName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a Capability Type resource for given Target Type and location.
|
||||
*
|
||||
* @summary Get a Capability Type resource for given Target Type and location.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetCapabilityType.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetCapabilityType.json
|
||||
*/
|
||||
async function getACapabilityTypeForAVirtualMachineTargetResourceOnWestus2Location() {
|
||||
const subscriptionId =
|
||||
|
@ -32,7 +32,7 @@ async function getACapabilityTypeForAVirtualMachineTargetResourceOnWestus2Locati
|
|||
const result = await client.capabilityTypes.get(
|
||||
locationName,
|
||||
targetTypeName,
|
||||
capabilityTypeName
|
||||
capabilityTypeName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a list of Capability Type resources for given Target Type and location.
|
||||
*
|
||||
* @summary Get a list of Capability Type resources for given Target Type and location.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListCapabilityTypes.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListCapabilityTypes.json
|
||||
*/
|
||||
async function listAllCapabilityTypesForAVirtualMachineTargetResourceOnWestus2Location() {
|
||||
const subscriptionId =
|
||||
|
@ -31,7 +31,7 @@ async function listAllCapabilityTypesForAVirtualMachineTargetResourceOnWestus2Lo
|
|||
const resArray = new Array();
|
||||
for await (let item of client.capabilityTypes.list(
|
||||
locationName,
|
||||
targetTypeName
|
||||
targetTypeName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Cancel a running Experiment resource.
|
||||
*
|
||||
* @summary Cancel a running Experiment resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/CancelExperiment.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CancelExperiment.json
|
||||
*/
|
||||
async function cancelARunningExperiment() {
|
||||
const subscriptionId =
|
||||
|
@ -30,7 +30,7 @@ async function cancelARunningExperiment() {
|
|||
const client = new ChaosManagementClient(credential, subscriptionId);
|
||||
const result = await client.experiments.beginCancelAndWait(
|
||||
resourceGroupName,
|
||||
experimentName
|
||||
experimentName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Create or update a Experiment resource.
|
||||
*
|
||||
* @summary Create or update a Experiment resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/CreateUpdateExperiment.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CreateUpdateExperiment.json
|
||||
*/
|
||||
async function createOrUpdateAExperimentInAResourceGroup() {
|
||||
const subscriptionId =
|
||||
|
@ -36,11 +36,10 @@ async function createOrUpdateAExperimentInAResourceGroup() {
|
|||
targets: [
|
||||
{
|
||||
type: "ChaosTarget",
|
||||
id:
|
||||
"/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine"
|
||||
}
|
||||
]
|
||||
}
|
||||
id: "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
steps: [
|
||||
{
|
||||
|
@ -54,20 +53,20 @@ async function createOrUpdateAExperimentInAResourceGroup() {
|
|||
type: "continuous",
|
||||
duration: "PT10M",
|
||||
parameters: [{ key: "abruptShutdown", value: "false" }],
|
||||
selectorId: "selector1"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
selectorId: "selector1",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ChaosManagementClient(credential, subscriptionId);
|
||||
const result = await client.experiments.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
experimentName,
|
||||
experiment
|
||||
experiment,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Delete a Experiment resource.
|
||||
*
|
||||
* @summary Delete a Experiment resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/DeleteExperiment.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/DeleteExperiment.json
|
||||
*/
|
||||
async function deleteAExperimentInAResourceGroup() {
|
||||
const subscriptionId =
|
||||
|
@ -30,7 +30,7 @@ async function deleteAExperimentInAResourceGroup() {
|
|||
const client = new ChaosManagementClient(credential, subscriptionId);
|
||||
const result = await client.experiments.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
experimentName
|
||||
experimentName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Execution details of an experiment resource.
|
||||
*
|
||||
* @summary Execution details of an experiment resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/DetailsExperiment.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/DetailsExperiment.json
|
||||
*/
|
||||
async function getExperimentExecutionDetails() {
|
||||
const subscriptionId =
|
||||
|
@ -32,7 +32,7 @@ async function getExperimentExecutionDetails() {
|
|||
const result = await client.experiments.executionDetails(
|
||||
resourceGroupName,
|
||||
experimentName,
|
||||
executionId
|
||||
executionId,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get an execution of an Experiment resource.
|
||||
*
|
||||
* @summary Get an execution of an Experiment resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetExperimentExecution.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetExperimentExecution.json
|
||||
*/
|
||||
async function getTheExecutionOfAExperiment() {
|
||||
const subscriptionId =
|
||||
|
@ -32,7 +32,7 @@ async function getTheExecutionOfAExperiment() {
|
|||
const result = await client.experiments.getExecution(
|
||||
resourceGroupName,
|
||||
experimentName,
|
||||
executionId
|
||||
executionId,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a Experiment resource.
|
||||
*
|
||||
* @summary Get a Experiment resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetExperiment.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetExperiment.json
|
||||
*/
|
||||
async function getAExperimentInAResourceGroup() {
|
||||
const subscriptionId =
|
||||
|
@ -30,7 +30,7 @@ async function getAExperimentInAResourceGroup() {
|
|||
const client = new ChaosManagementClient(credential, subscriptionId);
|
||||
const result = await client.experiments.get(
|
||||
resourceGroupName,
|
||||
experimentName
|
||||
experimentName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a list of executions of an Experiment resource.
|
||||
*
|
||||
* @summary Get a list of executions of an Experiment resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListExperimentExecutions.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListExperimentExecutions.json
|
||||
*/
|
||||
async function listAllExecutionsOfAnExperiment() {
|
||||
const subscriptionId =
|
||||
|
@ -31,7 +31,7 @@ async function listAllExecutionsOfAnExperiment() {
|
|||
const resArray = new Array();
|
||||
for await (let item of client.experiments.listAllExecutions(
|
||||
resourceGroupName,
|
||||
experimentName
|
||||
experimentName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// Licensed under the MIT License.
|
||||
import {
|
||||
ExperimentsListAllOptionalParams,
|
||||
ChaosManagementClient
|
||||
ChaosManagementClient,
|
||||
} from "@azure/arm-chaos";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a list of Experiment resources in a subscription.
|
||||
*
|
||||
* @summary Get a list of Experiment resources in a subscription.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListExperimentsInASubscription.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListExperimentsInASubscription.json
|
||||
*/
|
||||
async function listAllExperimentsInASubscription() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// Licensed under the MIT License.
|
||||
import {
|
||||
ExperimentsListOptionalParams,
|
||||
ChaosManagementClient
|
||||
ChaosManagementClient,
|
||||
} from "@azure/arm-chaos";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a list of Experiment resources in a resource group.
|
||||
*
|
||||
* @summary Get a list of Experiment resources in a resource group.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListExperimentsInAResourceGroup.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListExperimentsInAResourceGroup.json
|
||||
*/
|
||||
async function listAllExperimentsInAResourceGroup() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Start a Experiment resource.
|
||||
*
|
||||
* @summary Start a Experiment resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/StartExperiment.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/StartExperiment.json
|
||||
*/
|
||||
async function startAExperiment() {
|
||||
const subscriptionId =
|
||||
|
@ -30,7 +30,7 @@ async function startAExperiment() {
|
|||
const client = new ChaosManagementClient(credential, subscriptionId);
|
||||
const result = await client.experiments.beginStartAndWait(
|
||||
resourceGroupName,
|
||||
experimentName
|
||||
experimentName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to The operation to update an experiment.
|
||||
*
|
||||
* @summary The operation to update an experiment.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/UpdateExperiment.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/UpdateExperiment.json
|
||||
*/
|
||||
async function updateAnExperimentInAResourceGroup() {
|
||||
const subscriptionId =
|
||||
|
@ -30,16 +30,18 @@ async function updateAnExperimentInAResourceGroup() {
|
|||
identity: {
|
||||
type: "UserAssigned",
|
||||
userAssignedIdentities: {
|
||||
"/subscriptions/6b052e1503d34f17B2e1Be7f07588291/resourceGroups/exampleRG/providers/MicrosoftManagedIdentity/userAssignedIdentity/exampleUMI": {}
|
||||
}
|
||||
}
|
||||
"/subscriptions/6b052e1503d34f17B2e1Be7f07588291/resourceGroups/exampleRG/providers/MicrosoftManagedIdentity/userAssignedIdentity/exampleUMI":
|
||||
{},
|
||||
},
|
||||
},
|
||||
tags: { key1: "value1", key2: "value2" },
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ChaosManagementClient(credential, subscriptionId);
|
||||
const result = await client.experiments.beginUpdateAndWait(
|
||||
resourceGroupName,
|
||||
experimentName,
|
||||
experiment
|
||||
experiment,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get the status of a long running azure asynchronous operation.
|
||||
*
|
||||
* @summary Get the status of a long running azure asynchronous operation.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetOperationStatus.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetOperationStatus.json
|
||||
*/
|
||||
async function getSpecificOperationStatus() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a Target Type resources for given location.
|
||||
*
|
||||
* @summary Get a Target Type resources for given location.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetTargetType.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetTargetType.json
|
||||
*/
|
||||
async function getATargetTypeForWestus2Location() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// Licensed under the MIT License.
|
||||
import {
|
||||
TargetTypesListOptionalParams,
|
||||
ChaosManagementClient
|
||||
ChaosManagementClient,
|
||||
} from "@azure/arm-chaos";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a list of Target Type resources for given location.
|
||||
*
|
||||
* @summary Get a list of Target Type resources for given location.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListTargetTypes.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListTargetTypes.json
|
||||
*/
|
||||
async function listAllTargetTypesForWestus2Location() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Create or update a Target resource that extends a tracked regional resource.
|
||||
*
|
||||
* @summary Create or update a Target resource that extends a tracked regional resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/CreateUpdateTarget.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/CreateUpdateTarget.json
|
||||
*/
|
||||
async function createOrUpdateATargetThatExtendsAVirtualMachineResource() {
|
||||
const subscriptionId =
|
||||
|
@ -32,9 +32,9 @@ async function createOrUpdateATargetThatExtendsAVirtualMachineResource() {
|
|||
const target: Target = {
|
||||
properties: {
|
||||
identities: [
|
||||
{ type: "CertificateSubjectIssuer", subject: "CN=example.subject" }
|
||||
]
|
||||
}
|
||||
{ type: "CertificateSubjectIssuer", subject: "CN=example.subject" },
|
||||
],
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ChaosManagementClient(credential, subscriptionId);
|
||||
|
@ -44,7 +44,7 @@ async function createOrUpdateATargetThatExtendsAVirtualMachineResource() {
|
|||
parentResourceType,
|
||||
parentResourceName,
|
||||
targetName,
|
||||
target
|
||||
target,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Delete a Target resource that extends a tracked regional resource.
|
||||
*
|
||||
* @summary Delete a Target resource that extends a tracked regional resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/DeleteTarget.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/DeleteTarget.json
|
||||
*/
|
||||
async function deleteATargetThatExtendsAVirtualMachineResource() {
|
||||
const subscriptionId =
|
||||
|
@ -36,7 +36,7 @@ async function deleteATargetThatExtendsAVirtualMachineResource() {
|
|||
parentProviderNamespace,
|
||||
parentResourceType,
|
||||
parentResourceName,
|
||||
targetName
|
||||
targetName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a Target resource that extends a tracked regional resource.
|
||||
*
|
||||
* @summary Get a Target resource that extends a tracked regional resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/GetTarget.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/GetTarget.json
|
||||
*/
|
||||
async function getATargetThatExtendsAVirtualMachineResource() {
|
||||
const subscriptionId =
|
||||
|
@ -36,7 +36,7 @@ async function getATargetThatExtendsAVirtualMachineResource() {
|
|||
parentProviderNamespace,
|
||||
parentResourceType,
|
||||
parentResourceName,
|
||||
targetName
|
||||
targetName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// Licensed under the MIT License.
|
||||
import {
|
||||
TargetsListOptionalParams,
|
||||
ChaosManagementClient
|
||||
ChaosManagementClient,
|
||||
} from "@azure/arm-chaos";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a list of Target resources that extend a tracked regional resource.
|
||||
*
|
||||
* @summary Get a list of Target resources that extend a tracked regional resource.
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2023-11-01/examples/ListTargets.json
|
||||
* x-ms-original-file: specification/chaos/resource-manager/Microsoft.Chaos/stable/2024-01-01/examples/ListTargets.json
|
||||
*/
|
||||
async function listAllTargetsThatExtendAVirtualMachineResource() {
|
||||
const subscriptionId =
|
||||
|
@ -41,7 +41,7 @@ async function listAllTargetsThatExtendAVirtualMachineResource() {
|
|||
parentProviderNamespace,
|
||||
parentResourceType,
|
||||
parentResourceName,
|
||||
options
|
||||
options,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ 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 {
|
||||
|
@ -21,7 +21,7 @@ import {
|
|||
OperationStatusesImpl,
|
||||
OperationsImpl,
|
||||
TargetTypesImpl,
|
||||
TargetsImpl
|
||||
TargetsImpl,
|
||||
} from "./operations";
|
||||
import {
|
||||
Capabilities,
|
||||
|
@ -30,7 +30,7 @@ import {
|
|||
OperationStatuses,
|
||||
Operations,
|
||||
TargetTypes,
|
||||
Targets
|
||||
Targets,
|
||||
} from "./operationsInterfaces";
|
||||
import { ChaosManagementClientOptionalParams } from "./models";
|
||||
|
||||
|
@ -48,16 +48,16 @@ export class ChaosManagementClient extends coreClient.ServiceClient {
|
|||
constructor(
|
||||
credentials: coreAuth.TokenCredential,
|
||||
subscriptionId: string,
|
||||
options?: ChaosManagementClientOptionalParams
|
||||
options?: ChaosManagementClientOptionalParams,
|
||||
);
|
||||
constructor(
|
||||
credentials: coreAuth.TokenCredential,
|
||||
options?: ChaosManagementClientOptionalParams
|
||||
options?: ChaosManagementClientOptionalParams,
|
||||
);
|
||||
constructor(
|
||||
credentials: coreAuth.TokenCredential,
|
||||
subscriptionIdOrOptions?: ChaosManagementClientOptionalParams | string,
|
||||
options?: ChaosManagementClientOptionalParams
|
||||
options?: ChaosManagementClientOptionalParams,
|
||||
) {
|
||||
if (credentials === undefined) {
|
||||
throw new Error("'credentials' cannot be null");
|
||||
|
@ -77,10 +77,10 @@ export class ChaosManagementClient extends coreClient.ServiceClient {
|
|||
}
|
||||
const defaults: ChaosManagementClientOptionalParams = {
|
||||
requestContentType: "application/json; charset=utf-8",
|
||||
credential: credentials
|
||||
credential: credentials,
|
||||
};
|
||||
|
||||
const packageDetails = `azsdk-js-arm-chaos/1.0.1`;
|
||||
const packageDetails = `azsdk-js-arm-chaos/1.1.0`;
|
||||
const userAgentPrefix =
|
||||
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
||||
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
||||
|
@ -90,20 +90,21 @@ export class ChaosManagementClient 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 (
|
||||
|
@ -113,7 +114,7 @@ export class ChaosManagementClient extends coreClient.ServiceClient {
|
|||
!bearerTokenAuthenticationPolicyFound
|
||||
) {
|
||||
this.pipeline.removePolicy({
|
||||
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
|
||||
name: coreRestPipeline.bearerTokenAuthenticationPolicyName,
|
||||
});
|
||||
this.pipeline.addPolicy(
|
||||
coreRestPipeline.bearerTokenAuthenticationPolicy({
|
||||
|
@ -123,9 +124,9 @@ export class ChaosManagementClient extends coreClient.ServiceClient {
|
|||
`${optionsWithDefaults.endpoint}/.default`,
|
||||
challengeCallbacks: {
|
||||
authorizeRequestOnChallenge:
|
||||
coreClient.authorizeRequestOnClaimChallenge
|
||||
}
|
||||
})
|
||||
coreClient.authorizeRequestOnClaimChallenge,
|
||||
},
|
||||
}),
|
||||
);
|
||||
}
|
||||
// Parameter assignments
|
||||
|
@ -133,7 +134,7 @@ export class ChaosManagementClient extends coreClient.ServiceClient {
|
|||
|
||||
// Assigning values to Constant parameters
|
||||
this.$host = options.$host || "https://management.azure.com";
|
||||
this.apiVersion = options.apiVersion || "2023-11-01";
|
||||
this.apiVersion = options.apiVersion || "2024-01-01";
|
||||
this.capabilities = new CapabilitiesImpl(this);
|
||||
this.capabilityTypes = new CapabilityTypesImpl(this);
|
||||
this.experiments = new ExperimentsImpl(this);
|
||||
|
@ -153,7 +154,7 @@ export class ChaosManagementClient extends coreClient.ServiceClient {
|
|||
name: "CustomApiVersionPolicy",
|
||||
async sendRequest(
|
||||
request: PipelineRequest,
|
||||
next: SendRequest
|
||||
next: SendRequest,
|
||||
): Promise<PipelineResponse> {
|
||||
const param = request.url.split("?");
|
||||
if (param.length > 1) {
|
||||
|
@ -167,7 +168,7 @@ export class ChaosManagementClient extends coreClient.ServiceClient {
|
|||
request.url = param[0] + "?" + newParams.join("&");
|
||||
}
|
||||
return next(request);
|
||||
}
|
||||
},
|
||||
};
|
||||
this.pipeline.addPolicy(apiVersionPolicy);
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
@ -234,6 +234,8 @@ export interface ChaosTargetFilter {
|
|||
export interface ExperimentUpdate {
|
||||
/** The identity of the experiment resource. */
|
||||
identity?: ResourceIdentity;
|
||||
/** The tags of the experiment resource. */
|
||||
tags?: { [propertyName: string]: string };
|
||||
}
|
||||
|
||||
/** Model that represents a list of Experiment executions and a link for pagination. */
|
||||
|
@ -857,7 +859,7 @@ export enum KnownCreatedByType {
|
|||
/** ManagedIdentity */
|
||||
ManagedIdentity = "ManagedIdentity",
|
||||
/** Key */
|
||||
Key = "Key"
|
||||
Key = "Key",
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -885,7 +887,7 @@ export enum KnownProvisioningState {
|
|||
/** Updating */
|
||||
Updating = "Updating",
|
||||
/** Deleting */
|
||||
Deleting = "Deleting"
|
||||
Deleting = "Deleting",
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -907,7 +909,7 @@ export enum KnownSelectorType {
|
|||
/** List */
|
||||
List = "List",
|
||||
/** Query */
|
||||
Query = "Query"
|
||||
Query = "Query",
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -923,7 +925,7 @@ export type SelectorType = string;
|
|||
/** Known values of {@link FilterType} that the service accepts. */
|
||||
export enum KnownFilterType {
|
||||
/** Simple */
|
||||
Simple = "Simple"
|
||||
Simple = "Simple",
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -942,7 +944,7 @@ export enum KnownOrigin {
|
|||
/** System */
|
||||
System = "system",
|
||||
/** UserSystem */
|
||||
UserSystem = "user,system"
|
||||
UserSystem = "user,system",
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -959,7 +961,7 @@ export type Origin = string;
|
|||
/** Known values of {@link ActionType} that the service accepts. */
|
||||
export enum KnownActionType {
|
||||
/** Internal */
|
||||
Internal = "Internal"
|
||||
Internal = "Internal",
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -974,7 +976,7 @@ export type ActionType = string;
|
|||
/** Known values of {@link TargetReferenceType} that the service accepts. */
|
||||
export enum KnownTargetReferenceType {
|
||||
/** ChaosTarget */
|
||||
ChaosTarget = "ChaosTarget"
|
||||
ChaosTarget = "ChaosTarget",
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1134,7 +1136,8 @@ export interface ExperimentsListAllExecutionsOptionalParams
|
|||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the listAllExecutions operation. */
|
||||
export type ExperimentsListAllExecutionsResponse = ExperimentExecutionListResult;
|
||||
export type ExperimentsListAllExecutionsResponse =
|
||||
ExperimentExecutionListResult;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface ExperimentsGetExecutionOptionalParams
|
||||
|
@ -1169,7 +1172,8 @@ export interface ExperimentsListAllExecutionsNextOptionalParams
|
|||
extends coreClient.OperationOptions {}
|
||||
|
||||
/** Contains response data for the listAllExecutionsNext operation. */
|
||||
export type ExperimentsListAllExecutionsNextResponse = ExperimentExecutionListResult;
|
||||
export type ExperimentsListAllExecutionsNextResponse =
|
||||
ExperimentExecutionListResult;
|
||||
|
||||
/** Optional parameters. */
|
||||
export interface OperationStatusesGetOptionalParams
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -9,13 +9,13 @@
|
|||
import {
|
||||
OperationParameter,
|
||||
OperationURLParameter,
|
||||
OperationQueryParameter
|
||||
OperationQueryParameter,
|
||||
} from "@azure/core-client";
|
||||
import {
|
||||
Capability as CapabilityMapper,
|
||||
Experiment as ExperimentMapper,
|
||||
ExperimentUpdate as ExperimentUpdateMapper,
|
||||
Target as TargetMapper
|
||||
Target as TargetMapper,
|
||||
} from "../models/mappers";
|
||||
|
||||
export const accept: OperationParameter = {
|
||||
|
@ -25,9 +25,9 @@ export const accept: OperationParameter = {
|
|||
isConstant: true,
|
||||
serializedName: "Accept",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
name: "String",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const $host: OperationURLParameter = {
|
||||
|
@ -36,22 +36,22 @@ export const $host: OperationURLParameter = {
|
|||
serializedName: "$host",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
name: "String",
|
||||
},
|
||||
},
|
||||
skipEncoding: true
|
||||
skipEncoding: true,
|
||||
};
|
||||
|
||||
export const apiVersion: OperationQueryParameter = {
|
||||
parameterPath: "apiVersion",
|
||||
mapper: {
|
||||
defaultValue: "2023-11-01",
|
||||
defaultValue: "2024-01-01",
|
||||
isConstant: true,
|
||||
serializedName: "api-version",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
name: "String",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const subscriptionId: OperationURLParameter = {
|
||||
|
@ -59,85 +59,85 @@ export const subscriptionId: OperationURLParameter = {
|
|||
mapper: {
|
||||
constraints: {
|
||||
Pattern: new RegExp(
|
||||
"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
|
||||
)
|
||||
"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$",
|
||||
),
|
||||
},
|
||||
serializedName: "subscriptionId",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
name: "String",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const resourceGroupName: OperationURLParameter = {
|
||||
parameterPath: "resourceGroupName",
|
||||
mapper: {
|
||||
constraints: {
|
||||
Pattern: new RegExp("^[a-zA-Z0-9_\\-\\.\\(\\)]*[a-zA-Z0-9_\\-\\(\\)]$")
|
||||
Pattern: new RegExp("^[a-zA-Z0-9_\\-\\.\\(\\)]*[a-zA-Z0-9_\\-\\(\\)]$"),
|
||||
},
|
||||
serializedName: "resourceGroupName",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
name: "String",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const parentProviderNamespace: OperationURLParameter = {
|
||||
parameterPath: "parentProviderNamespace",
|
||||
mapper: {
|
||||
constraints: {
|
||||
Pattern: new RegExp("^[a-zA-Z0-9]+\\.[a-zA-Z0-9]+$")
|
||||
Pattern: new RegExp("^[a-zA-Z0-9]+\\.[a-zA-Z0-9]+$"),
|
||||
},
|
||||
serializedName: "parentProviderNamespace",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
name: "String",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const parentResourceType: OperationURLParameter = {
|
||||
parameterPath: "parentResourceType",
|
||||
mapper: {
|
||||
constraints: {
|
||||
Pattern: new RegExp("^[a-zA-Z0-9_\\-\\.]+$")
|
||||
Pattern: new RegExp("^[a-zA-Z0-9_\\-\\.]+$"),
|
||||
},
|
||||
serializedName: "parentResourceType",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
name: "String",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const parentResourceName: OperationURLParameter = {
|
||||
parameterPath: "parentResourceName",
|
||||
mapper: {
|
||||
constraints: {
|
||||
Pattern: new RegExp("^[a-zA-Z0-9_\\-\\.]+$")
|
||||
Pattern: new RegExp("^[a-zA-Z0-9_\\-\\.]+$"),
|
||||
},
|
||||
serializedName: "parentResourceName",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
name: "String",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const targetName: OperationURLParameter = {
|
||||
parameterPath: "targetName",
|
||||
mapper: {
|
||||
constraints: {
|
||||
Pattern: new RegExp("^[a-zA-Z0-9_\\-\\.]+$")
|
||||
Pattern: new RegExp("^[a-zA-Z0-9_\\-\\.]+$"),
|
||||
},
|
||||
serializedName: "targetName",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
name: "String",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const continuationToken: OperationQueryParameter = {
|
||||
|
@ -145,23 +145,23 @@ export const continuationToken: OperationQueryParameter = {
|
|||
mapper: {
|
||||
serializedName: "continuationToken",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
name: "String",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const capabilityName: OperationURLParameter = {
|
||||
parameterPath: "capabilityName",
|
||||
mapper: {
|
||||
constraints: {
|
||||
Pattern: new RegExp("^[a-zA-Z0-9\\-\\.]+-\\d\\.\\d$")
|
||||
Pattern: new RegExp("^[a-zA-Z0-9\\-\\.]+-\\d\\.\\d$"),
|
||||
},
|
||||
serializedName: "capabilityName",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
name: "String",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const contentType: OperationParameter = {
|
||||
|
@ -171,14 +171,14 @@ export const contentType: OperationParameter = {
|
|||
isConstant: true,
|
||||
serializedName: "Content-Type",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
name: "String",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const capability: OperationParameter = {
|
||||
parameterPath: "capability",
|
||||
mapper: CapabilityMapper
|
||||
mapper: CapabilityMapper,
|
||||
};
|
||||
|
||||
export const nextLink: OperationURLParameter = {
|
||||
|
@ -187,52 +187,52 @@ export const nextLink: OperationURLParameter = {
|
|||
serializedName: "nextLink",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
name: "String",
|
||||
},
|
||||
},
|
||||
skipEncoding: true
|
||||
skipEncoding: true,
|
||||
};
|
||||
|
||||
export const locationName: OperationURLParameter = {
|
||||
parameterPath: "locationName",
|
||||
mapper: {
|
||||
constraints: {
|
||||
Pattern: new RegExp("^[a-zA-Z0-9_\\-\\.]+$")
|
||||
Pattern: new RegExp("^[a-zA-Z0-9_\\-\\.]+$"),
|
||||
},
|
||||
serializedName: "locationName",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
name: "String",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const targetTypeName: OperationURLParameter = {
|
||||
parameterPath: "targetTypeName",
|
||||
mapper: {
|
||||
constraints: {
|
||||
Pattern: new RegExp("^[a-zA-Z0-9_\\-\\.]+$")
|
||||
Pattern: new RegExp("^[a-zA-Z0-9_\\-\\.]+$"),
|
||||
},
|
||||
serializedName: "targetTypeName",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
name: "String",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const capabilityTypeName: OperationURLParameter = {
|
||||
parameterPath: "capabilityTypeName",
|
||||
mapper: {
|
||||
constraints: {
|
||||
Pattern: new RegExp("^[a-zA-Z0-9\\-\\.]+-\\d\\.\\d$")
|
||||
Pattern: new RegExp("^[a-zA-Z0-9\\-\\.]+-\\d\\.\\d$"),
|
||||
},
|
||||
serializedName: "capabilityTypeName",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
name: "String",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const running: OperationQueryParameter = {
|
||||
|
@ -240,9 +240,9 @@ export const running: OperationQueryParameter = {
|
|||
mapper: {
|
||||
serializedName: "running",
|
||||
type: {
|
||||
name: "Boolean"
|
||||
}
|
||||
}
|
||||
name: "Boolean",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const experimentName: OperationURLParameter = {
|
||||
|
@ -250,24 +250,24 @@ export const experimentName: OperationURLParameter = {
|
|||
mapper: {
|
||||
constraints: {
|
||||
Pattern: new RegExp("^[^<>%&:?#/\\\\]+$"),
|
||||
MinLength: 1
|
||||
MinLength: 1,
|
||||
},
|
||||
serializedName: "experimentName",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
name: "String",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const experiment: OperationParameter = {
|
||||
parameterPath: "experiment",
|
||||
mapper: ExperimentMapper
|
||||
mapper: ExperimentMapper,
|
||||
};
|
||||
|
||||
export const experiment1: OperationParameter = {
|
||||
parameterPath: "experiment",
|
||||
mapper: ExperimentUpdateMapper
|
||||
mapper: ExperimentUpdateMapper,
|
||||
};
|
||||
|
||||
export const executionId: OperationURLParameter = {
|
||||
|
@ -275,26 +275,29 @@ export const executionId: OperationURLParameter = {
|
|||
mapper: {
|
||||
constraints: {
|
||||
Pattern: new RegExp(
|
||||
"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
|
||||
)
|
||||
"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$",
|
||||
),
|
||||
},
|
||||
serializedName: "executionId",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
name: "String",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const location: OperationURLParameter = {
|
||||
parameterPath: "location",
|
||||
mapper: {
|
||||
constraints: {
|
||||
MinLength: 1,
|
||||
},
|
||||
serializedName: "location",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
name: "String",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const asyncOperationId: OperationURLParameter = {
|
||||
|
@ -303,12 +306,12 @@ export const asyncOperationId: OperationURLParameter = {
|
|||
serializedName: "asyncOperationId",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
name: "String",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const target: OperationParameter = {
|
||||
parameterPath: "target",
|
||||
mapper: TargetMapper
|
||||
mapper: TargetMapper,
|
||||
};
|
||||
|
|
|
@ -23,7 +23,7 @@ import {
|
|||
CapabilitiesDeleteOptionalParams,
|
||||
CapabilitiesCreateOrUpdateOptionalParams,
|
||||
CapabilitiesCreateOrUpdateResponse,
|
||||
CapabilitiesListNextResponse
|
||||
CapabilitiesListNextResponse,
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
|
@ -54,7 +54,7 @@ export class CapabilitiesImpl implements Capabilities {
|
|||
parentResourceType: string,
|
||||
parentResourceName: string,
|
||||
targetName: string,
|
||||
options?: CapabilitiesListOptionalParams
|
||||
options?: CapabilitiesListOptionalParams,
|
||||
): PagedAsyncIterableIterator<Capability> {
|
||||
const iter = this.listPagingAll(
|
||||
resourceGroupName,
|
||||
|
@ -62,7 +62,7 @@ export class CapabilitiesImpl implements Capabilities {
|
|||
parentResourceType,
|
||||
parentResourceName,
|
||||
targetName,
|
||||
options
|
||||
options,
|
||||
);
|
||||
return {
|
||||
next() {
|
||||
|
@ -82,9 +82,9 @@ export class CapabilitiesImpl implements Capabilities {
|
|||
parentResourceName,
|
||||
targetName,
|
||||
options,
|
||||
settings
|
||||
settings,
|
||||
);
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -95,7 +95,7 @@ export class CapabilitiesImpl implements Capabilities {
|
|||
parentResourceName: string,
|
||||
targetName: string,
|
||||
options?: CapabilitiesListOptionalParams,
|
||||
settings?: PageSettings
|
||||
settings?: PageSettings,
|
||||
): AsyncIterableIterator<Capability[]> {
|
||||
let result: CapabilitiesListResponse;
|
||||
let continuationToken = settings?.continuationToken;
|
||||
|
@ -106,7 +106,7 @@ export class CapabilitiesImpl implements Capabilities {
|
|||
parentResourceType,
|
||||
parentResourceName,
|
||||
targetName,
|
||||
options
|
||||
options,
|
||||
);
|
||||
let page = result.value || [];
|
||||
continuationToken = result.nextLink;
|
||||
|
@ -121,7 +121,7 @@ export class CapabilitiesImpl implements Capabilities {
|
|||
parentResourceName,
|
||||
targetName,
|
||||
continuationToken,
|
||||
options
|
||||
options,
|
||||
);
|
||||
continuationToken = result.nextLink;
|
||||
let page = result.value || [];
|
||||
|
@ -136,7 +136,7 @@ export class CapabilitiesImpl implements Capabilities {
|
|||
parentResourceType: string,
|
||||
parentResourceName: string,
|
||||
targetName: string,
|
||||
options?: CapabilitiesListOptionalParams
|
||||
options?: CapabilitiesListOptionalParams,
|
||||
): AsyncIterableIterator<Capability> {
|
||||
for await (const page of this.listPagingPage(
|
||||
resourceGroupName,
|
||||
|
@ -144,7 +144,7 @@ export class CapabilitiesImpl implements Capabilities {
|
|||
parentResourceType,
|
||||
parentResourceName,
|
||||
targetName,
|
||||
options
|
||||
options,
|
||||
)) {
|
||||
yield* page;
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ export class CapabilitiesImpl implements Capabilities {
|
|||
parentResourceType: string,
|
||||
parentResourceName: string,
|
||||
targetName: string,
|
||||
options?: CapabilitiesListOptionalParams
|
||||
options?: CapabilitiesListOptionalParams,
|
||||
): Promise<CapabilitiesListResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{
|
||||
|
@ -174,9 +174,9 @@ export class CapabilitiesImpl implements Capabilities {
|
|||
parentResourceType,
|
||||
parentResourceName,
|
||||
targetName,
|
||||
options
|
||||
options,
|
||||
},
|
||||
listOperationSpec
|
||||
listOperationSpec,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -197,7 +197,7 @@ export class CapabilitiesImpl implements Capabilities {
|
|||
parentResourceName: string,
|
||||
targetName: string,
|
||||
capabilityName: string,
|
||||
options?: CapabilitiesGetOptionalParams
|
||||
options?: CapabilitiesGetOptionalParams,
|
||||
): Promise<CapabilitiesGetResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{
|
||||
|
@ -207,9 +207,9 @@ export class CapabilitiesImpl implements Capabilities {
|
|||
parentResourceName,
|
||||
targetName,
|
||||
capabilityName,
|
||||
options
|
||||
options,
|
||||
},
|
||||
getOperationSpec
|
||||
getOperationSpec,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -230,7 +230,7 @@ export class CapabilitiesImpl implements Capabilities {
|
|||
parentResourceName: string,
|
||||
targetName: string,
|
||||
capabilityName: string,
|
||||
options?: CapabilitiesDeleteOptionalParams
|
||||
options?: CapabilitiesDeleteOptionalParams,
|
||||
): Promise<void> {
|
||||
return this.client.sendOperationRequest(
|
||||
{
|
||||
|
@ -240,9 +240,9 @@ export class CapabilitiesImpl implements Capabilities {
|
|||
parentResourceName,
|
||||
targetName,
|
||||
capabilityName,
|
||||
options
|
||||
options,
|
||||
},
|
||||
deleteOperationSpec
|
||||
deleteOperationSpec,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -265,7 +265,7 @@ export class CapabilitiesImpl implements Capabilities {
|
|||
targetName: string,
|
||||
capabilityName: string,
|
||||
capability: Capability,
|
||||
options?: CapabilitiesCreateOrUpdateOptionalParams
|
||||
options?: CapabilitiesCreateOrUpdateOptionalParams,
|
||||
): Promise<CapabilitiesCreateOrUpdateResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{
|
||||
|
@ -276,9 +276,9 @@ export class CapabilitiesImpl implements Capabilities {
|
|||
targetName,
|
||||
capabilityName,
|
||||
capability,
|
||||
options
|
||||
options,
|
||||
},
|
||||
createOrUpdateOperationSpec
|
||||
createOrUpdateOperationSpec,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -299,7 +299,7 @@ export class CapabilitiesImpl implements Capabilities {
|
|||
parentResourceName: string,
|
||||
targetName: string,
|
||||
nextLink: string,
|
||||
options?: CapabilitiesListNextOptionalParams
|
||||
options?: CapabilitiesListNextOptionalParams,
|
||||
): Promise<CapabilitiesListNextResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{
|
||||
|
@ -309,9 +309,9 @@ export class CapabilitiesImpl implements Capabilities {
|
|||
parentResourceName,
|
||||
targetName,
|
||||
nextLink,
|
||||
options
|
||||
options,
|
||||
},
|
||||
listNextOperationSpec
|
||||
listNextOperationSpec,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -319,16 +319,15 @@ export class CapabilitiesImpl implements Capabilities {
|
|||
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
||||
|
||||
const listOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities",
|
||||
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.CapabilityListResult
|
||||
bodyMapper: Mappers.CapabilityListResult,
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
bodyMapper: Mappers.ErrorResponse,
|
||||
},
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion, Parameters.continuationToken],
|
||||
urlParameters: [
|
||||
|
@ -338,22 +337,21 @@ const listOperationSpec: coreClient.OperationSpec = {
|
|||
Parameters.parentProviderNamespace,
|
||||
Parameters.parentResourceType,
|
||||
Parameters.parentResourceName,
|
||||
Parameters.targetName
|
||||
Parameters.targetName,
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
serializer,
|
||||
};
|
||||
const getOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities/{capabilityName}",
|
||||
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities/{capabilityName}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.Capability
|
||||
bodyMapper: Mappers.Capability,
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
bodyMapper: Mappers.ErrorResponse,
|
||||
},
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
|
@ -364,21 +362,20 @@ const getOperationSpec: coreClient.OperationSpec = {
|
|||
Parameters.parentResourceType,
|
||||
Parameters.parentResourceName,
|
||||
Parameters.targetName,
|
||||
Parameters.capabilityName
|
||||
Parameters.capabilityName,
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
serializer,
|
||||
};
|
||||
const deleteOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities/{capabilityName}",
|
||||
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities/{capabilityName}",
|
||||
httpMethod: "DELETE",
|
||||
responses: {
|
||||
200: {},
|
||||
204: {},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
bodyMapper: Mappers.ErrorResponse,
|
||||
},
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
|
@ -389,22 +386,21 @@ const deleteOperationSpec: coreClient.OperationSpec = {
|
|||
Parameters.parentResourceType,
|
||||
Parameters.parentResourceName,
|
||||
Parameters.targetName,
|
||||
Parameters.capabilityName
|
||||
Parameters.capabilityName,
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
serializer,
|
||||
};
|
||||
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities/{capabilityName}",
|
||||
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities/{capabilityName}",
|
||||
httpMethod: "PUT",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.Capability
|
||||
bodyMapper: Mappers.Capability,
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
bodyMapper: Mappers.ErrorResponse,
|
||||
},
|
||||
},
|
||||
requestBody: Parameters.capability,
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
|
@ -416,22 +412,22 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
|||
Parameters.parentResourceType,
|
||||
Parameters.parentResourceName,
|
||||
Parameters.targetName,
|
||||
Parameters.capabilityName
|
||||
Parameters.capabilityName,
|
||||
],
|
||||
headerParameters: [Parameters.accept, Parameters.contentType],
|
||||
mediaType: "json",
|
||||
serializer
|
||||
serializer,
|
||||
};
|
||||
const listNextOperationSpec: coreClient.OperationSpec = {
|
||||
path: "{nextLink}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.CapabilityListResult
|
||||
bodyMapper: Mappers.CapabilityListResult,
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
bodyMapper: Mappers.ErrorResponse,
|
||||
},
|
||||
},
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
|
@ -441,8 +437,8 @@ const listNextOperationSpec: coreClient.OperationSpec = {
|
|||
Parameters.parentResourceType,
|
||||
Parameters.parentResourceName,
|
||||
Parameters.targetName,
|
||||
Parameters.nextLink
|
||||
Parameters.nextLink,
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
serializer,
|
||||
};
|
||||
|
|
|
@ -20,7 +20,7 @@ import {
|
|||
CapabilityTypesListResponse,
|
||||
CapabilityTypesGetOptionalParams,
|
||||
CapabilityTypesGetResponse,
|
||||
CapabilityTypesListNextResponse
|
||||
CapabilityTypesListNextResponse,
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
|
@ -45,7 +45,7 @@ export class CapabilityTypesImpl implements CapabilityTypes {
|
|||
public list(
|
||||
locationName: string,
|
||||
targetTypeName: string,
|
||||
options?: CapabilityTypesListOptionalParams
|
||||
options?: CapabilityTypesListOptionalParams,
|
||||
): PagedAsyncIterableIterator<CapabilityType> {
|
||||
const iter = this.listPagingAll(locationName, targetTypeName, options);
|
||||
return {
|
||||
|
@ -63,9 +63,9 @@ export class CapabilityTypesImpl implements CapabilityTypes {
|
|||
locationName,
|
||||
targetTypeName,
|
||||
options,
|
||||
settings
|
||||
settings,
|
||||
);
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ export class CapabilityTypesImpl implements CapabilityTypes {
|
|||
locationName: string,
|
||||
targetTypeName: string,
|
||||
options?: CapabilityTypesListOptionalParams,
|
||||
settings?: PageSettings
|
||||
settings?: PageSettings,
|
||||
): AsyncIterableIterator<CapabilityType[]> {
|
||||
let result: CapabilityTypesListResponse;
|
||||
let continuationToken = settings?.continuationToken;
|
||||
|
@ -89,7 +89,7 @@ export class CapabilityTypesImpl implements CapabilityTypes {
|
|||
locationName,
|
||||
targetTypeName,
|
||||
continuationToken,
|
||||
options
|
||||
options,
|
||||
);
|
||||
continuationToken = result.nextLink;
|
||||
let page = result.value || [];
|
||||
|
@ -101,12 +101,12 @@ export class CapabilityTypesImpl implements CapabilityTypes {
|
|||
private async *listPagingAll(
|
||||
locationName: string,
|
||||
targetTypeName: string,
|
||||
options?: CapabilityTypesListOptionalParams
|
||||
options?: CapabilityTypesListOptionalParams,
|
||||
): AsyncIterableIterator<CapabilityType> {
|
||||
for await (const page of this.listPagingPage(
|
||||
locationName,
|
||||
targetTypeName,
|
||||
options
|
||||
options,
|
||||
)) {
|
||||
yield* page;
|
||||
}
|
||||
|
@ -121,11 +121,11 @@ export class CapabilityTypesImpl implements CapabilityTypes {
|
|||
private _list(
|
||||
locationName: string,
|
||||
targetTypeName: string,
|
||||
options?: CapabilityTypesListOptionalParams
|
||||
options?: CapabilityTypesListOptionalParams,
|
||||
): Promise<CapabilityTypesListResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ locationName, targetTypeName, options },
|
||||
listOperationSpec
|
||||
listOperationSpec,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -140,11 +140,11 @@ export class CapabilityTypesImpl implements CapabilityTypes {
|
|||
locationName: string,
|
||||
targetTypeName: string,
|
||||
capabilityTypeName: string,
|
||||
options?: CapabilityTypesGetOptionalParams
|
||||
options?: CapabilityTypesGetOptionalParams,
|
||||
): Promise<CapabilityTypesGetResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ locationName, targetTypeName, capabilityTypeName, options },
|
||||
getOperationSpec
|
||||
getOperationSpec,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -159,11 +159,11 @@ export class CapabilityTypesImpl implements CapabilityTypes {
|
|||
locationName: string,
|
||||
targetTypeName: string,
|
||||
nextLink: string,
|
||||
options?: CapabilityTypesListNextOptionalParams
|
||||
options?: CapabilityTypesListNextOptionalParams,
|
||||
): Promise<CapabilityTypesListNextResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ locationName, targetTypeName, nextLink, options },
|
||||
listNextOperationSpec
|
||||
listNextOperationSpec,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -171,38 +171,36 @@ export class CapabilityTypesImpl implements CapabilityTypes {
|
|||
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
||||
|
||||
const listOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{locationName}/targetTypes/{targetTypeName}/capabilityTypes",
|
||||
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{locationName}/targetTypes/{targetTypeName}/capabilityTypes",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.CapabilityTypeListResult
|
||||
bodyMapper: Mappers.CapabilityTypeListResult,
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
bodyMapper: Mappers.ErrorResponse,
|
||||
},
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion, Parameters.continuationToken],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.locationName,
|
||||
Parameters.targetTypeName
|
||||
Parameters.targetTypeName,
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
serializer,
|
||||
};
|
||||
const getOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{locationName}/targetTypes/{targetTypeName}/capabilityTypes/{capabilityTypeName}",
|
||||
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{locationName}/targetTypes/{targetTypeName}/capabilityTypes/{capabilityTypeName}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.CapabilityType
|
||||
bodyMapper: Mappers.CapabilityType,
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
bodyMapper: Mappers.ErrorResponse,
|
||||
},
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
|
@ -210,29 +208,29 @@ const getOperationSpec: coreClient.OperationSpec = {
|
|||
Parameters.subscriptionId,
|
||||
Parameters.locationName,
|
||||
Parameters.targetTypeName,
|
||||
Parameters.capabilityTypeName
|
||||
Parameters.capabilityTypeName,
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
serializer,
|
||||
};
|
||||
const listNextOperationSpec: coreClient.OperationSpec = {
|
||||
path: "{nextLink}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.CapabilityTypeListResult
|
||||
bodyMapper: Mappers.CapabilityTypeListResult,
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
bodyMapper: Mappers.ErrorResponse,
|
||||
},
|
||||
},
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.nextLink,
|
||||
Parameters.locationName,
|
||||
Parameters.targetTypeName
|
||||
Parameters.targetTypeName,
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
serializer,
|
||||
};
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -13,7 +13,7 @@ import * as Parameters from "../models/parameters";
|
|||
import { ChaosManagementClient } from "../chaosManagementClient";
|
||||
import {
|
||||
OperationStatusesGetOptionalParams,
|
||||
OperationStatusesGetResponse
|
||||
OperationStatusesGetResponse,
|
||||
} from "../models";
|
||||
|
||||
/** Class containing OperationStatuses operations. */
|
||||
|
@ -30,18 +30,18 @@ export class OperationStatusesImpl implements OperationStatuses {
|
|||
|
||||
/**
|
||||
* Get the status of a long running azure asynchronous operation.
|
||||
* @param location The region name of operation.
|
||||
* @param location The name of the Azure region.
|
||||
* @param asyncOperationId The operation Id.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
get(
|
||||
location: string,
|
||||
asyncOperationId: string,
|
||||
options?: OperationStatusesGetOptionalParams
|
||||
options?: OperationStatusesGetOptionalParams,
|
||||
): Promise<OperationStatusesGetResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ location, asyncOperationId, options },
|
||||
getOperationSpec
|
||||
getOperationSpec,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -49,24 +49,23 @@ export class OperationStatusesImpl implements OperationStatuses {
|
|||
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
||||
|
||||
const getOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/operationsStatuses/{asyncOperationId}",
|
||||
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/operationStatuses/{asyncOperationId}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.OperationStatus
|
||||
bodyMapper: Mappers.OperationStatus,
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
bodyMapper: Mappers.ErrorResponse,
|
||||
},
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.location,
|
||||
Parameters.asyncOperationId
|
||||
Parameters.asyncOperationId,
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
serializer,
|
||||
};
|
||||
|
|
|
@ -18,7 +18,7 @@ import {
|
|||
OperationsListAllNextOptionalParams,
|
||||
OperationsListAllOptionalParams,
|
||||
OperationsListAllResponse,
|
||||
OperationsListAllNextResponse
|
||||
OperationsListAllNextResponse,
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
|
@ -39,7 +39,7 @@ export class OperationsImpl implements Operations {
|
|||
* @param options The options parameters.
|
||||
*/
|
||||
public listAll(
|
||||
options?: OperationsListAllOptionalParams
|
||||
options?: OperationsListAllOptionalParams,
|
||||
): PagedAsyncIterableIterator<Operation> {
|
||||
const iter = this.listAllPagingAll(options);
|
||||
return {
|
||||
|
@ -54,13 +54,13 @@ export class OperationsImpl implements Operations {
|
|||
throw new Error("maxPageSize is not supported by this operation.");
|
||||
}
|
||||
return this.listAllPagingPage(options, settings);
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
private async *listAllPagingPage(
|
||||
options?: OperationsListAllOptionalParams,
|
||||
settings?: PageSettings
|
||||
settings?: PageSettings,
|
||||
): AsyncIterableIterator<Operation[]> {
|
||||
let result: OperationsListAllResponse;
|
||||
let continuationToken = settings?.continuationToken;
|
||||
|
@ -81,7 +81,7 @@ export class OperationsImpl implements Operations {
|
|||
}
|
||||
|
||||
private async *listAllPagingAll(
|
||||
options?: OperationsListAllOptionalParams
|
||||
options?: OperationsListAllOptionalParams,
|
||||
): AsyncIterableIterator<Operation> {
|
||||
for await (const page of this.listAllPagingPage(options)) {
|
||||
yield* page;
|
||||
|
@ -93,7 +93,7 @@ export class OperationsImpl implements Operations {
|
|||
* @param options The options parameters.
|
||||
*/
|
||||
private _listAll(
|
||||
options?: OperationsListAllOptionalParams
|
||||
options?: OperationsListAllOptionalParams,
|
||||
): Promise<OperationsListAllResponse> {
|
||||
return this.client.sendOperationRequest({ options }, listAllOperationSpec);
|
||||
}
|
||||
|
@ -105,11 +105,11 @@ export class OperationsImpl implements Operations {
|
|||
*/
|
||||
private _listAllNext(
|
||||
nextLink: string,
|
||||
options?: OperationsListAllNextOptionalParams
|
||||
options?: OperationsListAllNextOptionalParams,
|
||||
): Promise<OperationsListAllNextResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ nextLink, options },
|
||||
listAllNextOperationSpec
|
||||
listAllNextOperationSpec,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -121,29 +121,29 @@ const listAllOperationSpec: coreClient.OperationSpec = {
|
|||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.OperationListResult
|
||||
bodyMapper: Mappers.OperationListResult,
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
bodyMapper: Mappers.ErrorResponse,
|
||||
},
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [Parameters.$host],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
serializer,
|
||||
};
|
||||
const listAllNextOperationSpec: coreClient.OperationSpec = {
|
||||
path: "{nextLink}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.OperationListResult
|
||||
bodyMapper: Mappers.OperationListResult,
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
bodyMapper: Mappers.ErrorResponse,
|
||||
},
|
||||
},
|
||||
urlParameters: [Parameters.$host, Parameters.nextLink],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
serializer,
|
||||
};
|
||||
|
|
|
@ -20,7 +20,7 @@ import {
|
|||
TargetTypesListResponse,
|
||||
TargetTypesGetOptionalParams,
|
||||
TargetTypesGetResponse,
|
||||
TargetTypesListNextResponse
|
||||
TargetTypesListNextResponse,
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
|
@ -43,7 +43,7 @@ export class TargetTypesImpl implements TargetTypes {
|
|||
*/
|
||||
public list(
|
||||
locationName: string,
|
||||
options?: TargetTypesListOptionalParams
|
||||
options?: TargetTypesListOptionalParams,
|
||||
): PagedAsyncIterableIterator<TargetType> {
|
||||
const iter = this.listPagingAll(locationName, options);
|
||||
return {
|
||||
|
@ -58,14 +58,14 @@ export class TargetTypesImpl implements TargetTypes {
|
|||
throw new Error("maxPageSize is not supported by this operation.");
|
||||
}
|
||||
return this.listPagingPage(locationName, options, settings);
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
private async *listPagingPage(
|
||||
locationName: string,
|
||||
options?: TargetTypesListOptionalParams,
|
||||
settings?: PageSettings
|
||||
settings?: PageSettings,
|
||||
): AsyncIterableIterator<TargetType[]> {
|
||||
let result: TargetTypesListResponse;
|
||||
let continuationToken = settings?.continuationToken;
|
||||
|
@ -87,7 +87,7 @@ export class TargetTypesImpl implements TargetTypes {
|
|||
|
||||
private async *listPagingAll(
|
||||
locationName: string,
|
||||
options?: TargetTypesListOptionalParams
|
||||
options?: TargetTypesListOptionalParams,
|
||||
): AsyncIterableIterator<TargetType> {
|
||||
for await (const page of this.listPagingPage(locationName, options)) {
|
||||
yield* page;
|
||||
|
@ -101,11 +101,11 @@ export class TargetTypesImpl implements TargetTypes {
|
|||
*/
|
||||
private _list(
|
||||
locationName: string,
|
||||
options?: TargetTypesListOptionalParams
|
||||
options?: TargetTypesListOptionalParams,
|
||||
): Promise<TargetTypesListResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ locationName, options },
|
||||
listOperationSpec
|
||||
listOperationSpec,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -118,11 +118,11 @@ export class TargetTypesImpl implements TargetTypes {
|
|||
get(
|
||||
locationName: string,
|
||||
targetTypeName: string,
|
||||
options?: TargetTypesGetOptionalParams
|
||||
options?: TargetTypesGetOptionalParams,
|
||||
): Promise<TargetTypesGetResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ locationName, targetTypeName, options },
|
||||
getOperationSpec
|
||||
getOperationSpec,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -135,11 +135,11 @@ export class TargetTypesImpl implements TargetTypes {
|
|||
private _listNext(
|
||||
locationName: string,
|
||||
nextLink: string,
|
||||
options?: TargetTypesListNextOptionalParams
|
||||
options?: TargetTypesListNextOptionalParams,
|
||||
): Promise<TargetTypesListNextResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ locationName, nextLink, options },
|
||||
listNextOperationSpec
|
||||
listNextOperationSpec,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -147,65 +147,63 @@ export class TargetTypesImpl implements TargetTypes {
|
|||
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
||||
|
||||
const listOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{locationName}/targetTypes",
|
||||
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{locationName}/targetTypes",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.TargetTypeListResult
|
||||
bodyMapper: Mappers.TargetTypeListResult,
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
bodyMapper: Mappers.ErrorResponse,
|
||||
},
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion, Parameters.continuationToken],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.locationName
|
||||
Parameters.locationName,
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
serializer,
|
||||
};
|
||||
const getOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{locationName}/targetTypes/{targetTypeName}",
|
||||
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{locationName}/targetTypes/{targetTypeName}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.TargetType
|
||||
bodyMapper: Mappers.TargetType,
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
bodyMapper: Mappers.ErrorResponse,
|
||||
},
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.locationName,
|
||||
Parameters.targetTypeName
|
||||
Parameters.targetTypeName,
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
serializer,
|
||||
};
|
||||
const listNextOperationSpec: coreClient.OperationSpec = {
|
||||
path: "{nextLink}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.TargetTypeListResult
|
||||
bodyMapper: Mappers.TargetTypeListResult,
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
bodyMapper: Mappers.ErrorResponse,
|
||||
},
|
||||
},
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.nextLink,
|
||||
Parameters.locationName
|
||||
Parameters.locationName,
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
serializer,
|
||||
};
|
||||
|
|
|
@ -23,7 +23,7 @@ import {
|
|||
TargetsDeleteOptionalParams,
|
||||
TargetsCreateOrUpdateOptionalParams,
|
||||
TargetsCreateOrUpdateResponse,
|
||||
TargetsListNextResponse
|
||||
TargetsListNextResponse,
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
|
@ -52,14 +52,14 @@ export class TargetsImpl implements Targets {
|
|||
parentProviderNamespace: string,
|
||||
parentResourceType: string,
|
||||
parentResourceName: string,
|
||||
options?: TargetsListOptionalParams
|
||||
options?: TargetsListOptionalParams,
|
||||
): PagedAsyncIterableIterator<Target> {
|
||||
const iter = this.listPagingAll(
|
||||
resourceGroupName,
|
||||
parentProviderNamespace,
|
||||
parentResourceType,
|
||||
parentResourceName,
|
||||
options
|
||||
options,
|
||||
);
|
||||
return {
|
||||
next() {
|
||||
|
@ -78,9 +78,9 @@ export class TargetsImpl implements Targets {
|
|||
parentResourceType,
|
||||
parentResourceName,
|
||||
options,
|
||||
settings
|
||||
settings,
|
||||
);
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@ export class TargetsImpl implements Targets {
|
|||
parentResourceType: string,
|
||||
parentResourceName: string,
|
||||
options?: TargetsListOptionalParams,
|
||||
settings?: PageSettings
|
||||
settings?: PageSettings,
|
||||
): AsyncIterableIterator<Target[]> {
|
||||
let result: TargetsListResponse;
|
||||
let continuationToken = settings?.continuationToken;
|
||||
|
@ -100,7 +100,7 @@ export class TargetsImpl implements Targets {
|
|||
parentProviderNamespace,
|
||||
parentResourceType,
|
||||
parentResourceName,
|
||||
options
|
||||
options,
|
||||
);
|
||||
let page = result.value || [];
|
||||
continuationToken = result.nextLink;
|
||||
|
@ -114,7 +114,7 @@ export class TargetsImpl implements Targets {
|
|||
parentResourceType,
|
||||
parentResourceName,
|
||||
continuationToken,
|
||||
options
|
||||
options,
|
||||
);
|
||||
continuationToken = result.nextLink;
|
||||
let page = result.value || [];
|
||||
|
@ -128,14 +128,14 @@ export class TargetsImpl implements Targets {
|
|||
parentProviderNamespace: string,
|
||||
parentResourceType: string,
|
||||
parentResourceName: string,
|
||||
options?: TargetsListOptionalParams
|
||||
options?: TargetsListOptionalParams,
|
||||
): AsyncIterableIterator<Target> {
|
||||
for await (const page of this.listPagingPage(
|
||||
resourceGroupName,
|
||||
parentProviderNamespace,
|
||||
parentResourceType,
|
||||
parentResourceName,
|
||||
options
|
||||
options,
|
||||
)) {
|
||||
yield* page;
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ export class TargetsImpl implements Targets {
|
|||
parentProviderNamespace: string,
|
||||
parentResourceType: string,
|
||||
parentResourceName: string,
|
||||
options?: TargetsListOptionalParams
|
||||
options?: TargetsListOptionalParams,
|
||||
): Promise<TargetsListResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{
|
||||
|
@ -162,9 +162,9 @@ export class TargetsImpl implements Targets {
|
|||
parentProviderNamespace,
|
||||
parentResourceType,
|
||||
parentResourceName,
|
||||
options
|
||||
options,
|
||||
},
|
||||
listOperationSpec
|
||||
listOperationSpec,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -183,7 +183,7 @@ export class TargetsImpl implements Targets {
|
|||
parentResourceType: string,
|
||||
parentResourceName: string,
|
||||
targetName: string,
|
||||
options?: TargetsGetOptionalParams
|
||||
options?: TargetsGetOptionalParams,
|
||||
): Promise<TargetsGetResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{
|
||||
|
@ -192,9 +192,9 @@ export class TargetsImpl implements Targets {
|
|||
parentResourceType,
|
||||
parentResourceName,
|
||||
targetName,
|
||||
options
|
||||
options,
|
||||
},
|
||||
getOperationSpec
|
||||
getOperationSpec,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -213,7 +213,7 @@ export class TargetsImpl implements Targets {
|
|||
parentResourceType: string,
|
||||
parentResourceName: string,
|
||||
targetName: string,
|
||||
options?: TargetsDeleteOptionalParams
|
||||
options?: TargetsDeleteOptionalParams,
|
||||
): Promise<void> {
|
||||
return this.client.sendOperationRequest(
|
||||
{
|
||||
|
@ -222,9 +222,9 @@ export class TargetsImpl implements Targets {
|
|||
parentResourceType,
|
||||
parentResourceName,
|
||||
targetName,
|
||||
options
|
||||
options,
|
||||
},
|
||||
deleteOperationSpec
|
||||
deleteOperationSpec,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -245,7 +245,7 @@ export class TargetsImpl implements Targets {
|
|||
parentResourceName: string,
|
||||
targetName: string,
|
||||
target: Target,
|
||||
options?: TargetsCreateOrUpdateOptionalParams
|
||||
options?: TargetsCreateOrUpdateOptionalParams,
|
||||
): Promise<TargetsCreateOrUpdateResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{
|
||||
|
@ -255,9 +255,9 @@ export class TargetsImpl implements Targets {
|
|||
parentResourceName,
|
||||
targetName,
|
||||
target,
|
||||
options
|
||||
options,
|
||||
},
|
||||
createOrUpdateOperationSpec
|
||||
createOrUpdateOperationSpec,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -276,7 +276,7 @@ export class TargetsImpl implements Targets {
|
|||
parentResourceType: string,
|
||||
parentResourceName: string,
|
||||
nextLink: string,
|
||||
options?: TargetsListNextOptionalParams
|
||||
options?: TargetsListNextOptionalParams,
|
||||
): Promise<TargetsListNextResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{
|
||||
|
@ -285,9 +285,9 @@ export class TargetsImpl implements Targets {
|
|||
parentResourceType,
|
||||
parentResourceName,
|
||||
nextLink,
|
||||
options
|
||||
options,
|
||||
},
|
||||
listNextOperationSpec
|
||||
listNextOperationSpec,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -295,16 +295,15 @@ export class TargetsImpl implements Targets {
|
|||
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
||||
|
||||
const listOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets",
|
||||
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.TargetListResult
|
||||
bodyMapper: Mappers.TargetListResult,
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
bodyMapper: Mappers.ErrorResponse,
|
||||
},
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion, Parameters.continuationToken],
|
||||
urlParameters: [
|
||||
|
@ -313,22 +312,21 @@ const listOperationSpec: coreClient.OperationSpec = {
|
|||
Parameters.resourceGroupName,
|
||||
Parameters.parentProviderNamespace,
|
||||
Parameters.parentResourceType,
|
||||
Parameters.parentResourceName
|
||||
Parameters.parentResourceName,
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
serializer,
|
||||
};
|
||||
const getOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}",
|
||||
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.Target
|
||||
bodyMapper: Mappers.Target,
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
bodyMapper: Mappers.ErrorResponse,
|
||||
},
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
|
@ -338,21 +336,20 @@ const getOperationSpec: coreClient.OperationSpec = {
|
|||
Parameters.parentProviderNamespace,
|
||||
Parameters.parentResourceType,
|
||||
Parameters.parentResourceName,
|
||||
Parameters.targetName
|
||||
Parameters.targetName,
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
serializer,
|
||||
};
|
||||
const deleteOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}",
|
||||
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}",
|
||||
httpMethod: "DELETE",
|
||||
responses: {
|
||||
200: {},
|
||||
204: {},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
bodyMapper: Mappers.ErrorResponse,
|
||||
},
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
|
@ -362,22 +359,21 @@ const deleteOperationSpec: coreClient.OperationSpec = {
|
|||
Parameters.parentProviderNamespace,
|
||||
Parameters.parentResourceType,
|
||||
Parameters.parentResourceName,
|
||||
Parameters.targetName
|
||||
Parameters.targetName,
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
serializer,
|
||||
};
|
||||
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}",
|
||||
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}",
|
||||
httpMethod: "PUT",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.Target
|
||||
bodyMapper: Mappers.Target,
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
bodyMapper: Mappers.ErrorResponse,
|
||||
},
|
||||
},
|
||||
requestBody: Parameters.target,
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
|
@ -388,22 +384,22 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
|||
Parameters.parentProviderNamespace,
|
||||
Parameters.parentResourceType,
|
||||
Parameters.parentResourceName,
|
||||
Parameters.targetName
|
||||
Parameters.targetName,
|
||||
],
|
||||
headerParameters: [Parameters.accept, Parameters.contentType],
|
||||
mediaType: "json",
|
||||
serializer
|
||||
serializer,
|
||||
};
|
||||
const listNextOperationSpec: coreClient.OperationSpec = {
|
||||
path: "{nextLink}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.TargetListResult
|
||||
bodyMapper: Mappers.TargetListResult,
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.ErrorResponse
|
||||
}
|
||||
bodyMapper: Mappers.ErrorResponse,
|
||||
},
|
||||
},
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
|
@ -412,8 +408,8 @@ const listNextOperationSpec: coreClient.OperationSpec = {
|
|||
Parameters.parentProviderNamespace,
|
||||
Parameters.parentResourceType,
|
||||
Parameters.parentResourceName,
|
||||
Parameters.nextLink
|
||||
Parameters.nextLink,
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
serializer,
|
||||
};
|
||||
|
|
|
@ -14,7 +14,7 @@ import {
|
|||
CapabilitiesGetResponse,
|
||||
CapabilitiesDeleteOptionalParams,
|
||||
CapabilitiesCreateOrUpdateOptionalParams,
|
||||
CapabilitiesCreateOrUpdateResponse
|
||||
CapabilitiesCreateOrUpdateResponse,
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
|
@ -35,7 +35,7 @@ export interface Capabilities {
|
|||
parentResourceType: string,
|
||||
parentResourceName: string,
|
||||
targetName: string,
|
||||
options?: CapabilitiesListOptionalParams
|
||||
options?: CapabilitiesListOptionalParams,
|
||||
): PagedAsyncIterableIterator<Capability>;
|
||||
/**
|
||||
* Get a Capability resource that extends a Target resource.
|
||||
|
@ -54,7 +54,7 @@ export interface Capabilities {
|
|||
parentResourceName: string,
|
||||
targetName: string,
|
||||
capabilityName: string,
|
||||
options?: CapabilitiesGetOptionalParams
|
||||
options?: CapabilitiesGetOptionalParams,
|
||||
): Promise<CapabilitiesGetResponse>;
|
||||
/**
|
||||
* Delete a Capability that extends a Target resource.
|
||||
|
@ -73,7 +73,7 @@ export interface Capabilities {
|
|||
parentResourceName: string,
|
||||
targetName: string,
|
||||
capabilityName: string,
|
||||
options?: CapabilitiesDeleteOptionalParams
|
||||
options?: CapabilitiesDeleteOptionalParams,
|
||||
): Promise<void>;
|
||||
/**
|
||||
* Create or update a Capability resource that extends a Target resource.
|
||||
|
@ -94,6 +94,6 @@ export interface Capabilities {
|
|||
targetName: string,
|
||||
capabilityName: string,
|
||||
capability: Capability,
|
||||
options?: CapabilitiesCreateOrUpdateOptionalParams
|
||||
options?: CapabilitiesCreateOrUpdateOptionalParams,
|
||||
): Promise<CapabilitiesCreateOrUpdateResponse>;
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ import {
|
|||
CapabilityType,
|
||||
CapabilityTypesListOptionalParams,
|
||||
CapabilityTypesGetOptionalParams,
|
||||
CapabilityTypesGetResponse
|
||||
CapabilityTypesGetResponse,
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
|
@ -26,7 +26,7 @@ export interface CapabilityTypes {
|
|||
list(
|
||||
locationName: string,
|
||||
targetTypeName: string,
|
||||
options?: CapabilityTypesListOptionalParams
|
||||
options?: CapabilityTypesListOptionalParams,
|
||||
): PagedAsyncIterableIterator<CapabilityType>;
|
||||
/**
|
||||
* Get a Capability Type resource for given Target Type and location.
|
||||
|
@ -39,6 +39,6 @@ export interface CapabilityTypes {
|
|||
locationName: string,
|
||||
targetTypeName: string,
|
||||
capabilityTypeName: string,
|
||||
options?: CapabilityTypesGetOptionalParams
|
||||
options?: CapabilityTypesGetOptionalParams,
|
||||
): Promise<CapabilityTypesGetResponse>;
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ import {
|
|||
ExperimentsGetExecutionOptionalParams,
|
||||
ExperimentsGetExecutionResponse,
|
||||
ExperimentsExecutionDetailsOptionalParams,
|
||||
ExperimentsExecutionDetailsResponse
|
||||
ExperimentsExecutionDetailsResponse,
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
|
@ -38,7 +38,7 @@ export interface Experiments {
|
|||
* @param options The options parameters.
|
||||
*/
|
||||
listAll(
|
||||
options?: ExperimentsListAllOptionalParams
|
||||
options?: ExperimentsListAllOptionalParams,
|
||||
): PagedAsyncIterableIterator<Experiment>;
|
||||
/**
|
||||
* Get a list of Experiment resources in a resource group.
|
||||
|
@ -47,7 +47,7 @@ export interface Experiments {
|
|||
*/
|
||||
list(
|
||||
resourceGroupName: string,
|
||||
options?: ExperimentsListOptionalParams
|
||||
options?: ExperimentsListOptionalParams,
|
||||
): PagedAsyncIterableIterator<Experiment>;
|
||||
/**
|
||||
* Get a list of executions of an Experiment resource.
|
||||
|
@ -58,7 +58,7 @@ export interface Experiments {
|
|||
listAllExecutions(
|
||||
resourceGroupName: string,
|
||||
experimentName: string,
|
||||
options?: ExperimentsListAllExecutionsOptionalParams
|
||||
options?: ExperimentsListAllExecutionsOptionalParams,
|
||||
): PagedAsyncIterableIterator<ExperimentExecution>;
|
||||
/**
|
||||
* Delete a Experiment resource.
|
||||
|
@ -69,7 +69,7 @@ export interface Experiments {
|
|||
beginDelete(
|
||||
resourceGroupName: string,
|
||||
experimentName: string,
|
||||
options?: ExperimentsDeleteOptionalParams
|
||||
options?: ExperimentsDeleteOptionalParams,
|
||||
): Promise<SimplePollerLike<OperationState<void>, void>>;
|
||||
/**
|
||||
* Delete a Experiment resource.
|
||||
|
@ -80,7 +80,7 @@ export interface Experiments {
|
|||
beginDeleteAndWait(
|
||||
resourceGroupName: string,
|
||||
experimentName: string,
|
||||
options?: ExperimentsDeleteOptionalParams
|
||||
options?: ExperimentsDeleteOptionalParams,
|
||||
): Promise<void>;
|
||||
/**
|
||||
* Get a Experiment resource.
|
||||
|
@ -91,7 +91,7 @@ export interface Experiments {
|
|||
get(
|
||||
resourceGroupName: string,
|
||||
experimentName: string,
|
||||
options?: ExperimentsGetOptionalParams
|
||||
options?: ExperimentsGetOptionalParams,
|
||||
): Promise<ExperimentsGetResponse>;
|
||||
/**
|
||||
* Create or update a Experiment resource.
|
||||
|
@ -104,7 +104,7 @@ export interface Experiments {
|
|||
resourceGroupName: string,
|
||||
experimentName: string,
|
||||
experiment: Experiment,
|
||||
options?: ExperimentsCreateOrUpdateOptionalParams
|
||||
options?: ExperimentsCreateOrUpdateOptionalParams,
|
||||
): Promise<
|
||||
SimplePollerLike<
|
||||
OperationState<ExperimentsCreateOrUpdateResponse>,
|
||||
|
@ -122,7 +122,7 @@ export interface Experiments {
|
|||
resourceGroupName: string,
|
||||
experimentName: string,
|
||||
experiment: Experiment,
|
||||
options?: ExperimentsCreateOrUpdateOptionalParams
|
||||
options?: ExperimentsCreateOrUpdateOptionalParams,
|
||||
): Promise<ExperimentsCreateOrUpdateResponse>;
|
||||
/**
|
||||
* The operation to update an experiment.
|
||||
|
@ -135,7 +135,7 @@ export interface Experiments {
|
|||
resourceGroupName: string,
|
||||
experimentName: string,
|
||||
experiment: ExperimentUpdate,
|
||||
options?: ExperimentsUpdateOptionalParams
|
||||
options?: ExperimentsUpdateOptionalParams,
|
||||
): Promise<
|
||||
SimplePollerLike<
|
||||
OperationState<ExperimentsUpdateResponse>,
|
||||
|
@ -153,7 +153,7 @@ export interface Experiments {
|
|||
resourceGroupName: string,
|
||||
experimentName: string,
|
||||
experiment: ExperimentUpdate,
|
||||
options?: ExperimentsUpdateOptionalParams
|
||||
options?: ExperimentsUpdateOptionalParams,
|
||||
): Promise<ExperimentsUpdateResponse>;
|
||||
/**
|
||||
* Cancel a running Experiment resource.
|
||||
|
@ -164,7 +164,7 @@ export interface Experiments {
|
|||
beginCancel(
|
||||
resourceGroupName: string,
|
||||
experimentName: string,
|
||||
options?: ExperimentsCancelOptionalParams
|
||||
options?: ExperimentsCancelOptionalParams,
|
||||
): Promise<SimplePollerLike<OperationState<void>, void>>;
|
||||
/**
|
||||
* Cancel a running Experiment resource.
|
||||
|
@ -175,7 +175,7 @@ export interface Experiments {
|
|||
beginCancelAndWait(
|
||||
resourceGroupName: string,
|
||||
experimentName: string,
|
||||
options?: ExperimentsCancelOptionalParams
|
||||
options?: ExperimentsCancelOptionalParams,
|
||||
): Promise<void>;
|
||||
/**
|
||||
* Start a Experiment resource.
|
||||
|
@ -186,7 +186,7 @@ export interface Experiments {
|
|||
beginStart(
|
||||
resourceGroupName: string,
|
||||
experimentName: string,
|
||||
options?: ExperimentsStartOptionalParams
|
||||
options?: ExperimentsStartOptionalParams,
|
||||
): Promise<SimplePollerLike<OperationState<void>, void>>;
|
||||
/**
|
||||
* Start a Experiment resource.
|
||||
|
@ -197,7 +197,7 @@ export interface Experiments {
|
|||
beginStartAndWait(
|
||||
resourceGroupName: string,
|
||||
experimentName: string,
|
||||
options?: ExperimentsStartOptionalParams
|
||||
options?: ExperimentsStartOptionalParams,
|
||||
): Promise<void>;
|
||||
/**
|
||||
* Get an execution of an Experiment resource.
|
||||
|
@ -210,7 +210,7 @@ export interface Experiments {
|
|||
resourceGroupName: string,
|
||||
experimentName: string,
|
||||
executionId: string,
|
||||
options?: ExperimentsGetExecutionOptionalParams
|
||||
options?: ExperimentsGetExecutionOptionalParams,
|
||||
): Promise<ExperimentsGetExecutionResponse>;
|
||||
/**
|
||||
* Execution details of an experiment resource.
|
||||
|
@ -223,6 +223,6 @@ export interface Experiments {
|
|||
resourceGroupName: string,
|
||||
experimentName: string,
|
||||
executionId: string,
|
||||
options?: ExperimentsExecutionDetailsOptionalParams
|
||||
options?: ExperimentsExecutionDetailsOptionalParams,
|
||||
): Promise<ExperimentsExecutionDetailsResponse>;
|
||||
}
|
||||
|
|
|
@ -8,20 +8,20 @@
|
|||
|
||||
import {
|
||||
OperationStatusesGetOptionalParams,
|
||||
OperationStatusesGetResponse
|
||||
OperationStatusesGetResponse,
|
||||
} from "../models";
|
||||
|
||||
/** Interface representing a OperationStatuses. */
|
||||
export interface OperationStatuses {
|
||||
/**
|
||||
* Get the status of a long running azure asynchronous operation.
|
||||
* @param location The region name of operation.
|
||||
* @param location The name of the Azure region.
|
||||
* @param asyncOperationId The operation Id.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
get(
|
||||
location: string,
|
||||
asyncOperationId: string,
|
||||
options?: OperationStatusesGetOptionalParams
|
||||
options?: OperationStatusesGetOptionalParams,
|
||||
): Promise<OperationStatusesGetResponse>;
|
||||
}
|
||||
|
|
|
@ -17,6 +17,6 @@ export interface Operations {
|
|||
* @param options The options parameters.
|
||||
*/
|
||||
listAll(
|
||||
options?: OperationsListAllOptionalParams
|
||||
options?: OperationsListAllOptionalParams,
|
||||
): PagedAsyncIterableIterator<Operation>;
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ import {
|
|||
TargetType,
|
||||
TargetTypesListOptionalParams,
|
||||
TargetTypesGetOptionalParams,
|
||||
TargetTypesGetResponse
|
||||
TargetTypesGetResponse,
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
|
@ -24,7 +24,7 @@ export interface TargetTypes {
|
|||
*/
|
||||
list(
|
||||
locationName: string,
|
||||
options?: TargetTypesListOptionalParams
|
||||
options?: TargetTypesListOptionalParams,
|
||||
): PagedAsyncIterableIterator<TargetType>;
|
||||
/**
|
||||
* Get a Target Type resources for given location.
|
||||
|
@ -35,6 +35,6 @@ export interface TargetTypes {
|
|||
get(
|
||||
locationName: string,
|
||||
targetTypeName: string,
|
||||
options?: TargetTypesGetOptionalParams
|
||||
options?: TargetTypesGetOptionalParams,
|
||||
): Promise<TargetTypesGetResponse>;
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ import {
|
|||
TargetsGetResponse,
|
||||
TargetsDeleteOptionalParams,
|
||||
TargetsCreateOrUpdateOptionalParams,
|
||||
TargetsCreateOrUpdateResponse
|
||||
TargetsCreateOrUpdateResponse,
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
|
@ -33,7 +33,7 @@ export interface Targets {
|
|||
parentProviderNamespace: string,
|
||||
parentResourceType: string,
|
||||
parentResourceName: string,
|
||||
options?: TargetsListOptionalParams
|
||||
options?: TargetsListOptionalParams,
|
||||
): PagedAsyncIterableIterator<Target>;
|
||||
/**
|
||||
* Get a Target resource that extends a tracked regional resource.
|
||||
|
@ -50,7 +50,7 @@ export interface Targets {
|
|||
parentResourceType: string,
|
||||
parentResourceName: string,
|
||||
targetName: string,
|
||||
options?: TargetsGetOptionalParams
|
||||
options?: TargetsGetOptionalParams,
|
||||
): Promise<TargetsGetResponse>;
|
||||
/**
|
||||
* Delete a Target resource that extends a tracked regional resource.
|
||||
|
@ -67,7 +67,7 @@ export interface Targets {
|
|||
parentResourceType: string,
|
||||
parentResourceName: string,
|
||||
targetName: string,
|
||||
options?: TargetsDeleteOptionalParams
|
||||
options?: TargetsDeleteOptionalParams,
|
||||
): Promise<void>;
|
||||
/**
|
||||
* Create or update a Target resource that extends a tracked regional resource.
|
||||
|
@ -86,6 +86,6 @@ export interface Targets {
|
|||
parentResourceName: string,
|
||||
targetName: string,
|
||||
target: Target,
|
||||
options?: TargetsCreateOrUpdateOptionalParams
|
||||
options?: TargetsCreateOrUpdateOptionalParams,
|
||||
): Promise<TargetsCreateOrUpdateResponse>;
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ export function getContinuationToken(page: unknown): string | undefined {
|
|||
|
||||
export function setContinuationToken(
|
||||
page: unknown,
|
||||
continuationToken: string | undefined
|
||||
continuationToken: string | undefined,
|
||||
): void {
|
||||
if (typeof page !== "object" || page === null || !continuationToken) {
|
||||
return;
|
||||
|
|
Загрузка…
Ссылка в новой задаче