diff --git a/schemas/2023-11-01/Microsoft.Chaos.json b/schemas/2023-11-01/Microsoft.Chaos.json new file mode 100644 index 0000000000..c5fadb635e --- /dev/null +++ b/schemas/2023-11-01/Microsoft.Chaos.json @@ -0,0 +1,732 @@ +{ + "id": "https://schema.management.azure.com/schemas/2023-11-01/Microsoft.Chaos.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.Chaos", + "description": "Microsoft Chaos Resource Types", + "resourceDefinitions": { + "experiments": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2023-11-01" + ] + }, + "identity": { + "oneOf": [ + { + "$ref": "#/definitions/ResourceIdentity" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The identity of a resource." + }, + "location": { + "type": "string", + "description": "The geo-location where the resource lives" + }, + "name": { + "oneOf": [ + { + "type": "string", + "pattern": "^[^<>%&:?#/\\\\]+$", + "minLength": 1 + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "String that represents a Experiment resource name." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/ExperimentProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Model that represents the Experiment properties model." + }, + "tags": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Resource tags." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Chaos/experiments" + ] + } + }, + "required": [ + "apiVersion", + "location", + "name", + "properties", + "type" + ], + "description": "Microsoft.Chaos/experiments" + } + }, + "extension_resourceDefinitions": { + "targets": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2023-11-01" + ] + }, + "location": { + "type": "string", + "description": "Location of the target resource." + }, + "name": { + "oneOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9_\\-\\.]+$" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "String that represents a Target resource name." + }, + "properties": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": {} + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Model that represents the base Target properties model." + }, + "resources": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/targets_capabilities_childResource" + } + ] + } + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Chaos/targets" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Chaos/targets" + }, + "targets_capabilities": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2023-11-01" + ] + }, + "name": { + "oneOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\-\\.]+-\\d\\.\\d$" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "String that represents a Capability resource name." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Chaos/targets/capabilities" + ] + } + }, + "required": [ + "apiVersion", + "name", + "type" + ], + "description": "Microsoft.Chaos/targets/capabilities" + } + }, + "definitions": { + "Action": { + "type": "object", + "oneOf": [ + { + "$ref": "#/definitions/DelayAction" + }, + { + "$ref": "#/definitions/DiscreteAction" + }, + { + "$ref": "#/definitions/ContinuousAction" + } + ], + "properties": { + "name": { + "type": "string", + "maxLength": 2048, + "description": "String that represents a URN." + } + }, + "required": [ + "name" + ], + "description": "Model that represents the base action model. 9 total per experiment." + }, + "Branch": { + "type": "object", + "properties": { + "actions": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/Action" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "List of actions." + }, + "name": { + "type": "string", + "minLength": 1, + "description": "String of the branch name." + } + }, + "required": [ + "actions", + "name" + ], + "description": "Model that represents a branch in the step. 9 total per experiment." + }, + "ContinuousAction": { + "type": "object", + "properties": { + "duration": { + "oneOf": [ + { + "type": "string", + "pattern": "^P(\\d+Y)?(\\d+M)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+(\\.\\d+)?S)?)?$" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "ISO8601 formatted string that represents a duration." + }, + "parameters": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/KeyValuePair" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "List of key value pairs." + }, + "selectorId": { + "type": "string", + "minLength": 1, + "description": "String that represents a selector." + }, + "type": { + "type": "string", + "enum": [ + "continuous" + ] + } + }, + "required": [ + "duration", + "parameters", + "selectorId", + "type" + ], + "description": "Model that represents a continuous action." + }, + "DelayAction": { + "type": "object", + "properties": { + "duration": { + "oneOf": [ + { + "type": "string", + "pattern": "^P(\\d+Y)?(\\d+M)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+(\\.\\d+)?S)?)?$" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "ISO8601 formatted string that represents a duration." + }, + "type": { + "type": "string", + "enum": [ + "delay" + ] + } + }, + "required": [ + "duration", + "type" + ], + "description": "Model that represents a delay action." + }, + "DiscreteAction": { + "type": "object", + "properties": { + "parameters": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/KeyValuePair" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "List of key value pairs." + }, + "selectorId": { + "type": "string", + "minLength": 1, + "description": "String that represents a selector." + }, + "type": { + "type": "string", + "enum": [ + "discrete" + ] + } + }, + "required": [ + "parameters", + "selectorId", + "type" + ], + "description": "Model that represents a discrete action." + }, + "ExperimentProperties": { + "type": "object", + "properties": { + "selectors": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/Selector" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "List of selectors." + }, + "steps": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/Step" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "List of steps." + } + }, + "required": [ + "selectors", + "steps" + ], + "description": "Model that represents the Experiment properties model." + }, + "Filter": { + "type": "object", + "oneOf": [ + { + "$ref": "#/definitions/SimpleFilter" + } + ], + "properties": {}, + "description": "Model that represents available filter types that can be applied to a targets list." + }, + "KeyValuePair": { + "type": "object", + "properties": { + "key": { + "type": "string", + "minLength": 1, + "description": "The name of the setting for the action." + }, + "value": { + "type": "string", + "minLength": 1, + "description": "The value of the setting for the action." + } + }, + "required": [ + "key", + "value" + ], + "description": "A map to describe the settings of an action." + }, + "ListSelector": { + "type": "object", + "properties": { + "targets": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/TargetReference" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "List of Target references." + }, + "type": { + "type": "string", + "enum": [ + "List" + ] + } + }, + "required": [ + "targets", + "type" + ], + "description": "Model that represents a list selector." + }, + "QuerySelector": { + "type": "object", + "properties": { + "queryString": { + "type": "string", + "description": "Azure Resource Graph (ARG) Query Language query for target resources." + }, + "subscriptionIds": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Subscription id list to scope resource query." + }, + "type": { + "type": "string", + "enum": [ + "Query" + ] + } + }, + "required": [ + "queryString", + "subscriptionIds", + "type" + ], + "description": "Model that represents a query selector." + }, + "ResourceIdentity": { + "type": "object", + "properties": { + "type": { + "oneOf": [ + { + "type": "string", + "enum": [ + "None", + "SystemAssigned", + "UserAssigned" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "String of the resource identity type." + }, + "userAssignedIdentities": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/UserAssignedIdentity" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests." + } + }, + "required": [ + "type" + ], + "description": "The identity of a resource." + }, + "Selector": { + "type": "object", + "oneOf": [ + { + "$ref": "#/definitions/ListSelector" + }, + { + "$ref": "#/definitions/QuerySelector" + } + ], + "properties": { + "additionalProperties": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": {} + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Unmatched properties from the message are deserialized this collection" + }, + "filter": { + "oneOf": [ + { + "$ref": "#/definitions/Filter" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Model that represents available filter types that can be applied to a targets list." + }, + "id": { + "type": "string", + "minLength": 1, + "description": "String of the selector ID." + } + }, + "required": [ + "id" + ], + "description": "Model that represents a selector in the Experiment resource." + }, + "SimpleFilter": { + "type": "object", + "properties": { + "parameters": { + "oneOf": [ + { + "$ref": "#/definitions/SimpleFilterParameters" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Model that represents the Simple filter parameters." + }, + "type": { + "type": "string", + "enum": [ + "Simple" + ] + } + }, + "required": [ + "type" + ], + "description": "Model that represents a simple target filter." + }, + "SimpleFilterParameters": { + "type": "object", + "properties": { + "zones": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "List of Azure availability zones to filter targets by." + } + }, + "description": "Model that represents the Simple filter parameters." + }, + "Step": { + "type": "object", + "properties": { + "branches": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/Branch" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "List of branches." + }, + "name": { + "type": "string", + "minLength": 1, + "description": "String of the step name." + } + }, + "required": [ + "branches", + "name" + ], + "description": "Model that represents a step in the Experiment resource." + }, + "TargetReference": { + "type": "object", + "properties": { + "id": { + "oneOf": [ + { + "type": "string", + "pattern": "^\\/[Ss][Uu][Bb][Ss][Cc][Rr][Ii][Pp][Tt][Ii][Oo][Nn][Ss]\\/[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}\\/[Rr][Ee][Ss][Oo][Uu][Rr][Cc][Ee][Gg][Rr][Oo][Uu][Pp][Ss]\\/[a-zA-Z0-9_\\-\\.\\(\\)]*[a-zA-Z0-9_\\-\\(\\)]\\/[Pp][Rr][Oo][Vv][Ii][Dd][Ee][Rr][Ss]\\/[a-zA-Z0-9]+\\.[a-zA-Z0-9]+\\/[a-zA-Z0-9_\\-\\.]+\\/[a-zA-Z0-9_\\-\\.]+\\/[Pp][Rr][Oo][Vv][Ii][Dd][Ee][Rr][Ss]\\/[Mm][Ii][Cc][Rr][Oo][Ss][Oo][Ff][Tt]\\.[Cc][Hh][Aa][Oo][Ss]\\/[Tt][Aa][Rr][Gg][Ee][Tt][Ss]\\/[a-zA-Z0-9_\\-\\.]+$" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "String of the resource ID of a Target resource." + }, + "type": { + "oneOf": [ + { + "type": "string", + "enum": [ + "ChaosTarget" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Enum of the Target reference type." + } + }, + "required": [ + "id", + "type" + ], + "description": "Model that represents a reference to a Target in the selector." + }, + "targets_capabilities_childResource": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2023-11-01" + ] + }, + "name": { + "oneOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\-\\.]+-\\d\\.\\d$" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "String that represents a Capability resource name." + }, + "type": { + "type": "string", + "enum": [ + "capabilities" + ] + } + }, + "required": [ + "apiVersion", + "name", + "type" + ], + "description": "Microsoft.Chaos/targets/capabilities" + }, + "UserAssignedIdentity": { + "type": "object", + "properties": {}, + "description": "User assigned identity properties" + } + } +} \ No newline at end of file diff --git a/schemas/common/autogeneratedResources.json b/schemas/common/autogeneratedResources.json index d1d1403628..20e89b28cf 100644 --- a/schemas/common/autogeneratedResources.json +++ b/schemas/common/autogeneratedResources.json @@ -6190,6 +6190,9 @@ { "$ref": "https://schema.management.azure.com/schemas/2023-09-01-preview/Microsoft.Chaos.json#/resourceDefinitions/experiments" }, + { + "$ref": "https://schema.management.azure.com/schemas/2023-11-01/Microsoft.Chaos.json#/resourceDefinitions/experiments" + }, { "$ref": "https://schema.management.azure.com/schemas/2016-02-01-preview/Microsoft.CognitiveServices.json#/resourceDefinitions/accounts" },