# chaos > see https://aka.ms/autorest This is the AutoRest configuration file for chaos. ## Getting Started To build the SDKs for My API, simply install AutoRest via `npm` (`npm install -g autorest`) and then run: > `autorest readme.md` To see additional help and options, run: > `autorest --help` For other options on installation see [Installing AutoRest](https://aka.ms/autorest/install) on the AutoRest github page. --- ## Configuration ### Basic Information These are the global settings for the chaos. ```yaml title: ChaosManagementClient description: Chaos Management Client openapi-type: arm tag: package-2025-01 ``` ### Tag: package-2026-05-01-preview These settings apply only when `--tag=package-2026-05-01-preview` is specified on the command line. ```yaml $(tag) == 'package-2026-05-01-preview' input-file: - preview/2026-05-01-preview/openapi.json suppressions: - code: XMSSecretInResponse from: openapi.json where: $.definitions.PrivateAccessProperties.properties.publicNetworkAccess reason: False positive - publicNetworkAccess is not a secret. It is a simple Enabled/Disabled configuration setting for public network access control. The property name contains 'access' which may trigger the rule, but the values are not sensitive. - code: TrackedExtensionResourcesAreNotAllowed from: openapi.json where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}"].get reason: Not actually a tracked resource, but location property is required to avoid breaking changes - code: RequestSchemaForTrackedResourcesMustHaveTags from: openapi.json where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}"].put reason: Not actually a tracked resource, but location property is required to avoid breaking changes - code: TrackedExtensionResourcesAreNotAllowed from: openapi.json where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}"].put reason: Not actually a tracked resource, but location property is required to avoid breaking changes - code: TrackedResourcePatchOperation from: openapi.json where: $.definitions.Target reason: Not actually a tracked resource, but location property is required to avoid breaking changes - code: AvoidAdditionalProperties from: openapi.json where: $.definitions.Target.properties.properties reason: Existing GA-exposed resource which relies on additionalProperties currently. Our RP will release a V2 in the future. - code: PostResponseCodes from: openapi.json where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations/{scenarioConfigurationName}/fixResourcePermissions"].post reason: LRO POST returns 202 with Location header containing a polling URL. The final result is obtained by polling the Location URL, not from the initial POST response. - code: GuidUsage from: openapi.json where: $.definitions["Azure.Core.uuid"].format reason: Approved by ARM API reviewer. GUID usage is required for resource identifiers in the Chaos service. - code: AllTrackedResourcesMustHaveDelete from: openapi.json where: $.definitions.Workspace reason: False positive - Workspace has a DELETE operation (Workspaces_Delete) at /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}. The linter fails to correlate the definition with its delete operation. - code: TrackedResourcePatchOperation from: openapi.json where: $.definitions.Workspace reason: False positive - Workspace has a PATCH operation (Workspaces_Update) at the same resource path with tags support via WorkspaceUpdate model. The linter fails to correlate the definition with its patch operation. - code: PostResponseCodes from: openapi.json where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations/{scenarioConfigurationName}/execute"].post reason: LRO POST returns 202 with Location header containing a polling URL. The final result is obtained by polling the Location URL, not from the initial POST response. - code: PostResponseCodes from: openapi.json where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/configurations/{scenarioConfigurationName}/validate"].post reason: LRO POST returns 202 with Location header containing a polling URL. The final result is obtained by polling the Location URL, not from the initial POST response. - code: PostResponseCodes from: openapi.json where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/scenarios/{scenarioName}/runs/{runId}/cancel"].post reason: LRO POST returns 202 with Location header containing a polling URL. The final result is obtained by polling the Location URL, not from the initial POST response. - code: PostResponseCodes from: openapi.json where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/workspaces/{workspaceName}/refreshRecommendations"].post reason: LRO POST returns 202 with Location header containing a polling URL. The final result is obtained by polling the Location URL, not from the initial POST response. - code: PostOperationIdContainsUrlVerb from: openapi.json where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/executions/{executionId}/getExecutionDetails"].post reason: The operationId Experiments_ExecutionDetails is established in previous API versions (2024-11-01-preview, 2025-01-01). Renaming would be a breaking change for existing SDKs. ``` ### Tag: package-2025-01 These settings apply only when `--tag=package-2025-01` is specified on the command line. ```yaml $(tag) == 'package-2025-01' input-file: - stable/2025-01-01/openapi.json suppressions: - code: TrackedExtensionResourcesAreNotAllowed from: openapi.json where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}"].get reason: Not actually a tracked resource, but location property is required to avoid breaking changes - code: RequestSchemaForTrackedResourcesMustHaveTags from: openapi.json where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}"].put reason: Not actually a tracked resource, but location property is required to avoid breaking changes - code: TrackedExtensionResourcesAreNotAllowed from: openapi.json where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}"].put reason: Not actually a tracked resource, but location property is required to avoid breaking changes - code: TrackedResourcePatchOperation from: openapi.json where: $.definitions.Target reason: Not actually a tracked resource, but location property is required to avoid breaking changes - code: AvoidAdditionalProperties from: openapi.json where: $.definitions.Target.properties.properties reason: Existing GA-exposed resource which relies on additionalProperties currently. Our RP will release a V2 in the future. - code: PatchBodyParametersSchema from: openapi.json reason: already used in GA api version, fixing it will cause breaking change - code: PostOperationIdContainsUrlVerb from: openapi.json where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/executions/{executionId}/getExecutionDetails"].post reason: The operationId Experiments_ExecutionDetails is established in previous API versions. Renaming would be a breaking change for existing SDKs. ``` ### Tag: package-preview-2024-11 These settings apply only when `--tag=package-preview-2024-11` is specified on the command line. ```yaml $(tag) == 'package-preview-2024-11' input-file: - preview/2024-11-01-preview/openapi.json suppressions: - code: TrackedExtensionResourcesAreNotAllowed from: openapi.json where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}"].get reason: Not actually a tracked resource, but location property is required to avoid breaking changes - code: RequestSchemaForTrackedResourcesMustHaveTags from: openapi.json where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}"].put reason: Not actually a tracked resource, but location property is required to avoid breaking changes - code: TrackedExtensionResourcesAreNotAllowed from: openapi.json where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}"].put reason: Not actually a tracked resource, but location property is required to avoid breaking changes - code: TrackedResourcePatchOperation from: openapi.json where: $.definitions.Target reason: Not actually a tracked resource, but location property is required to avoid breaking changes - code: AvoidAdditionalProperties from: openapi.json where: $.definitions.Target.properties.properties reason: Existing GA-exposed resource which relies on additionalProperties currently. Our RP will release a V2 in the future. - code: PatchBodyParametersSchema from: openapi.json reason: already used in GA api version, fixing it will cause breaking change - code: PostOperationIdContainsUrlVerb from: openapi.json where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/executions/{executionId}/getExecutionDetails"].post reason: The operationId Experiments_ExecutionDetails is established in previous API versions. Renaming would be a breaking change for existing SDKs. ``` ### Tag: package-preview-2024-03 These settings apply only when `--tag=package-preview-2024-03` is specified on the command line. ```yaml $(tag) == 'package-preview-2024-03' input-file: - preview/2024-03-22-preview/capabilities.json - preview/2024-03-22-preview/capabilityTypes.json - preview/2024-03-22-preview/experiments.json - preview/2024-03-22-preview/operationStatuses.json - preview/2024-03-22-preview/operations.json - preview/2024-03-22-preview/privateAccesses.json - preview/2024-03-22-preview/targetTypes.json - preview/2024-03-22-preview/targets.json directive: - from: swagger-document where: "$.definitions.action" transform: > $["x-ms-client-name"] = "ChaosExperimentAction"; - from: swagger-document where: "$.definitions.branch" transform: > $["x-ms-client-name"] = "ChaosExperimentBranch"; - from: swagger-document where: "$.definitions.step" transform: > $["x-ms-client-name"] = "ChaosExperimentStep"; - from: swagger-document where: "$.definitions.filter" transform: > $["x-ms-client-name"] = "ChaosTargetFilter"; - from: swagger-document where: "$.definitions.simpleFilter" transform: > $["x-ms-client-name"] = "ChaosTargetSimpleFilter"; - from: swagger-document where: "$.definitions.simpleFilterParameters" transform: > $["x-ms-client-name"] = "ChaosTargetSimpleFilterParameters"; - from: swagger-document where: "$.definitions.selector" transform: > $["x-ms-client-name"] = "ChaosTargetSelector"; - from: swagger-document where: "$.definitions.listSelector" transform: > $["x-ms-client-name"] = "ChaosTargetListSelector"; - from: swagger-document where: "$.definitions.querySelector" transform: > $["x-ms-client-name"] = "ChaosTargetQuerySelector"; ``` ### Tag: package-2024-01 These settings apply only when `--tag=package-2024-01` is specified on the command line. ```yaml $(tag) == 'package-2024-01' input-file: - stable/2024-01-01/capabilities.json - stable/2024-01-01/capabilityTypes.json - stable/2024-01-01/experiments.json - stable/2024-01-01/operationStatuses.json - stable/2024-01-01/operations.json - stable/2024-01-01/targetTypes.json - stable/2024-01-01/targets.json directive: - from: swagger-document where: "$.definitions.action" transform: > $["x-ms-client-name"] = "ChaosExperimentAction"; - from: swagger-document where: "$.definitions.branch" transform: > $["x-ms-client-name"] = "ChaosExperimentBranch"; - from: swagger-document where: "$.definitions.step" transform: > $["x-ms-client-name"] = "ChaosExperimentStep"; - from: swagger-document where: "$.definitions.filter" transform: > $["x-ms-client-name"] = "ChaosTargetFilter"; - from: swagger-document where: "$.definitions.simpleFilter" transform: > $["x-ms-client-name"] = "ChaosTargetSimpleFilter"; - from: swagger-document where: "$.definitions.simpleFilterParameters" transform: > $["x-ms-client-name"] = "ChaosTargetSimpleFilterParameters"; - from: swagger-document where: "$.definitions.selector" transform: > $["x-ms-client-name"] = "ChaosTargetSelector"; - from: swagger-document where: "$.definitions.listSelector" transform: > $["x-ms-client-name"] = "ChaosTargetListSelector"; - from: swagger-document where: "$.definitions.querySelector" transform: > $["x-ms-client-name"] = "ChaosTargetQuerySelector"; ``` ### Tag: package-2023-11 These settings apply only when `--tag=package-2023-11` is specified on the command line. ```yaml $(tag) == 'package-2023-11' input-file: - stable/2023-11-01/capabilities.json - stable/2023-11-01/capabilityTypes.json - stable/2023-11-01/experiments.json - stable/2023-11-01/operationStatuses.json - stable/2023-11-01/operations.json - stable/2023-11-01/targetTypes.json - stable/2023-11-01/targets.json directive: - from: swagger-document where: "$.definitions.action" transform: > $["x-ms-client-name"] = "ChaosExperimentAction"; - from: swagger-document where: "$.definitions.branch" transform: > $["x-ms-client-name"] = "ChaosExperimentBranch"; - from: swagger-document where: "$.definitions.step" transform: > $["x-ms-client-name"] = "ChaosExperimentStep"; - from: swagger-document where: "$.definitions.filter" transform: > $["x-ms-client-name"] = "ChaosTargetFilter"; - from: swagger-document where: "$.definitions.simpleFilter" transform: > $["x-ms-client-name"] = "ChaosTargetSimpleFilter"; - from: swagger-document where: "$.definitions.simpleFilterParameters" transform: > $["x-ms-client-name"] = "ChaosTargetSimpleFilterParameters"; - from: swagger-document where: "$.definitions.selector" transform: > $["x-ms-client-name"] = "ChaosTargetSelector"; - from: swagger-document where: "$.definitions.listSelector" transform: > $["x-ms-client-name"] = "ChaosTargetListSelector"; - from: swagger-document where: "$.definitions.querySelector" transform: > $["x-ms-client-name"] = "ChaosTargetQuerySelector"; ``` ### Tag: package-preview-2023-10 These settings apply only when `--tag=package-preview-2023-10` is specified on the command line. ```yaml $(tag) == 'package-preview-2023-10' input-file: - preview/2023-10-27-preview/capabilities.json - preview/2023-10-27-preview/capabilityTypes.json - preview/2023-10-27-preview/experiments.json - preview/2023-10-27-preview/operationStatuses.json - preview/2023-10-27-preview/operations.json - preview/2023-10-27-preview/privateAccesses.json - preview/2023-10-27-preview/targetTypes.json - preview/2023-10-27-preview/targets.json directive: - from: swagger-document where: "$.definitions.action" transform: > $["x-ms-client-name"] = "ChaosExperimentAction"; - from: swagger-document where: "$.definitions.branch" transform: > $["x-ms-client-name"] = "ChaosExperimentBranch"; - from: swagger-document where: "$.definitions.step" transform: > $["x-ms-client-name"] = "ChaosExperimentStep"; - from: swagger-document where: "$.definitions.filter" transform: > $["x-ms-client-name"] = "ChaosTargetFilter"; - from: swagger-document where: "$.definitions.simpleFilter" transform: > $["x-ms-client-name"] = "ChaosTargetSimpleFilter"; - from: swagger-document where: "$.definitions.simpleFilterParameters" transform: > $["x-ms-client-name"] = "ChaosTargetSimpleFilterParameters"; - from: swagger-document where: "$.definitions.selector" transform: > $["x-ms-client-name"] = "ChaosTargetSelector"; - from: swagger-document where: "$.definitions.listSelector" transform: > $["x-ms-client-name"] = "ChaosTargetListSelector"; - from: swagger-document where: "$.definitions.querySelector" transform: > $["x-ms-client-name"] = "ChaosTargetQuerySelector"; ``` ### Tag: package-preview-2023-09 These settings apply only when `--tag=package-preview-2023-09` is specified on the command line. ```yaml $(tag) == 'package-preview-2023-09' input-file: - preview/2023-09-01-preview/capabilities.json - preview/2023-09-01-preview/capabilityTypes.json - preview/2023-09-01-preview/experiments.json - preview/2023-09-01-preview/operations.json - preview/2023-09-01-preview/targetTypes.json - preview/2023-09-01-preview/targets.json - preview/2023-09-01-preview/operationStatuses.json directive: - from: swagger-document where: "$.definitions.action" transform: > $["x-ms-client-name"] = "ChaosExperimentAction"; - from: swagger-document where: "$.definitions.branch" transform: > $["x-ms-client-name"] = "ChaosExperimentBranch"; - from: swagger-document where: "$.definitions.step" transform: > $["x-ms-client-name"] = "ChaosExperimentStep"; - from: swagger-document where: "$.definitions.filter" transform: > $["x-ms-client-name"] = "ChaosTargetFilter"; - from: swagger-document where: "$.definitions.simpleFilter" transform: > $["x-ms-client-name"] = "ChaosTargetSimpleFilter"; - from: swagger-document where: "$.definitions.simpleFilterParameters" transform: > $["x-ms-client-name"] = "ChaosTargetSimpleFilterParameters"; - from: swagger-document where: "$.definitions.selector" transform: > $["x-ms-client-name"] = "ChaosTargetSelector"; - from: swagger-document where: "$.definitions.listSelector" transform: > $["x-ms-client-name"] = "ChaosTargetListSelector"; - from: swagger-document where: "$.definitions.querySelector" transform: > $["x-ms-client-name"] = "ChaosTargetQuerySelector"; ``` ### Tag: package-2023-04-15-preview These settings apply only when `--tag=package-2023-04-15-preview` is specified on the command line. ```yaml $(tag) == 'package-2023-04-15-preview' input-file: - preview/2023-04-15-preview/capabilities.json - preview/2023-04-15-preview/capabilityTypes.json - preview/2023-04-15-preview/experiments.json - preview/2023-04-15-preview/operations.json - preview/2023-04-15-preview/targetTypes.json - preview/2023-04-15-preview/targets.json ``` ### Tag: package-2023-04-01-preview These settings apply only when `--tag=package-2023-04-01-preview` is specified on the command line. ```yaml $(tag) == 'package-2023-04-01-preview' input-file: - preview/2023-04-01-preview/capabilities.json - preview/2023-04-01-preview/capabilityTypes.json - preview/2023-04-01-preview/experiments.json - preview/2023-04-01-preview/operations.json - preview/2023-04-01-preview/targetTypes.json - preview/2023-04-01-preview/targets.json ``` ### Tag: package-2022-10-01-preview These settings apply only when `--tag=package-2022-10-01-preview` is specified on the command line. ```yaml $(tag) == 'package-2022-10-01-preview' directive: - suppress: R3026 reason: Patch is not implemented in this version. where: - $.definitions.experiment input-file: - preview/2022-10-01-preview/capabilities.json - preview/2022-10-01-preview/capabilityTypes.json - preview/2022-10-01-preview/experiments.json - preview/2022-10-01-preview/operations.json - preview/2022-10-01-preview/targetTypes.json - preview/2022-10-01-preview/targets.json ``` ### Tag: package-2022-07-01-preview These settings apply only when `--tag=package-2022-07-01-preview` is specified on the command line. ```yaml $(tag) == 'package-2022-07-01-preview' directive: - suppress: R3026 reason: Patch is not implemented in this version. where: - $.definitions.experiment input-file: - preview/2022-07-01-preview/capabilities.json - preview/2022-07-01-preview/experiments.json - preview/2022-07-01-preview/operations.json - preview/2022-07-01-preview/targets.json - preview/2022-07-01-preview/targetTypes.json - preview/2022-07-01-preview/capabilityTypes.json ``` ### Tag: package-2021-09-15-preview These settings apply only when `--tag=package-2021-09-15-preview` is specified on the command line. ```yaml $(tag) == 'package-2021-09-15-preview' directive: - suppress: R3026 reason: Patch is not implemented in this version. where: - $.definitions.experiment input-file: - preview/2021-09-15-preview/capabilities.json - preview/2021-09-15-preview/experiments.json - preview/2021-09-15-preview/operations.json - preview/2021-09-15-preview/targets.json - preview/2021-09-15-preview/targetTypes.json - preview/2021-09-15-preview/capabilityTypes.json ``` --- # Code Generation ## Swagger to SDK This section describes what SDK should be generated by the automatic system. This is not used by Autorest itself. ```yaml $(swagger-to-sdk) swagger-to-sdk: - repo: azure-sdk-for-python - repo: azure-sdk-for-java - repo: azure-sdk-for-go - repo: azure-resource-manager-schemas - repo: azure-cli-extensions - repo: azure-powershell ``` ## Az See configuration in [readme.az.md](./readme.az.md) ## Go See configuration in [readme.go.md](./readme.go.md) ## Python See configuration in [readme.python.md](./readme.python.md) ## CSharp See configuration in [readme.csharp.md](./readme.csharp.md) ## Suppression ```yaml directive: - suppress: TopLevelResourcesListBySubscription where: $.definitions.target from: targets.json reason: |- We have the top level resource list by subscription operation here: https://github.com/mariohdez/azure-rest-api-specs/blob/5a870f3163ae6e9cc5ed33d40cfff61764050213/specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/targets.json#L37 this is a false positive I believe. - suppress: TopLevelResourcesListBySubscription where: $.definitions.target from: targets.json reason: |- we defined the the top level resource list here: https://github.com/mariohdez/azure-rest-api-specs/blob/5a870f3163ae6e9cc5ed33d40cfff61764050213/specification/chaos/resource-manager/Microsoft.Chaos/preview/2021-09-15-preview/targets.json#L37 - suppress: EnumInsteadOfBoolean where: $.definitions.Operation.properties.isDataAction from: types.json reason: We are consuming the type model declaration from "common". I don't think our service is responsible for updating this error... Plz push back otherwise. ```