다음을 통해 공유


Experiments - Create Or Update

실험 리소스를 만들거나 업데이트합니다.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}?api-version=2025-01-01

URI 매개 변수

Name In(다음 안에) 필수 형식 Description
experimentName
path True

string

minLength: 1
pattern: ^[^<>%&:?#/\\]+$

실험 리소스 이름을 나타내는 문자열입니다.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

리소스 그룹의 이름입니다. 이름은 대/소문자를 구분하지 않습니다.

subscriptionId
path True

string (uuid)

대상 구독의 ID입니다. 값은 UUID여야 합니다.

api-version
query True

string

minLength: 1

이 작업에 사용할 API 버전입니다.

요청 본문

Name 필수 형식 Description
location True

string

리소스가 있는 지리적 위치

properties.selectors True ChaosTargetSelector[]:

선택기 목록입니다.

properties.steps True

ChaosExperimentStep[]

단계 목록입니다.

identity

ManagedServiceIdentity

이 리소스에 할당된 관리 서비스 ID입니다.

tags

object

리소스 태그.

응답

Name 형식 Description
200 OK

Experiment

리소스 '실험' 업데이트 작업 성공

201 Created

Experiment

리소스 '실험' 만들기 작업 성공

헤더

  • Azure-AsyncOperation: string
  • Retry-After: integer
Other Status Codes

ErrorResponse

예기치 않은 오류 응답입니다.

보안

azure_auth

Azure Active Directory OAuth2 흐름.

형식: oauth2
Flow: implicit
권한 부여 URL: https://login.microsoftonline.com/common/oauth2/authorize

범위

Name Description
user_impersonation 사용자 계정 가장

예제

Create/update a Experiment in a resource group.

샘플 요청

PUT https://management.azure.com/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Chaos/experiments/exampleExperiment?api-version=2025-01-01

{
  "identity": {
    "type": "SystemAssigned"
  },
  "tags": {
    "key7131": "ryohwcoiccwsnewjigfmijz",
    "key2138": "fjaeecgnvqd"
  },
  "location": "eastus2euap",
  "properties": {
    "selectors": [
      {
        "type": "List",
        "id": "selector1",
        "targets": [
          {
            "type": "ChaosTarget",
            "id": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine"
          }
        ]
      }
    ],
    "steps": [
      {
        "name": "step1",
        "branches": [
          {
            "name": "branch1",
            "actions": [
              {
                "name": "urn:csci:microsoft:virtualMachine:shutdown/1.0",
                "type": "continuous",
                "duration": "PT10M",
                "parameters": [
                  {
                    "key": "abruptShutdown",
                    "value": "false"
                  }
                ],
                "selectorId": "selector1"
              }
            ]
          }
        ]
      }
    ]
  }
}

샘플 응답

Azure-AsyncOperation: https://management.azure.com/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/myResourceGroup/providers/Microsoft.Chaos/locations/eastus/operationStatus/00000000-0000-0000-0000-000000000000?api-version=2024-11-01-preview
Location: https://management.azure.com/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/myResourceGroup/providers/Microsoft.Chaos/experiments/00000000-0000-0000-0000-000000000000?api-version=2024-11-01-preview
{
  "name": "exampleExperiment",
  "type": "Microsoft.Chaos/experiments",
  "id": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Chaos/experiments/exampleExperiment",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "d04ab567-2c07-43ef-a7f4-4527626b7f56",
    "tenantId": "8c3e2fb2-fe7a-4bf1-b779-d73990782fe6"
  },
  "tags": {
    "key7131": "ryohwcoiccwsnewjigfmijz",
    "key2138": "fjaeecgnvqd"
  },
  "location": "eastus2euap",
  "properties": {
    "provisioningState": "Updating",
    "selectors": [
      {
        "type": "List",
        "id": "selector1",
        "targets": [
          {
            "type": "ChaosTarget",
            "id": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine"
          }
        ]
      }
    ],
    "steps": [
      {
        "name": "step1",
        "branches": [
          {
            "name": "branch1",
            "actions": [
              {
                "name": "urn:csci:microsoft:virtualMachine:shutdown/1.0",
                "type": "continuous",
                "duration": "PT10M",
                "parameters": [
                  {
                    "key": "abruptShutdown",
                    "value": "false"
                  }
                ],
                "selectorId": "selector1"
              }
            ]
          }
        ]
      }
    ]
  },
  "systemData": {
    "createdAt": "2021-07-01T00:00:00.0Z",
    "createdBy": "User",
    "createdByType": "b3a41dba-4415-4d36-9ee8-e5eaa86db976",
    "lastModifiedAt": "2021-07-01T00:00:00.0Z",
    "lastModifiedBy": "User",
    "lastModifiedByType": "b3a41dba-4415-4d36-9ee8-e5eaa86db976"
  }
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/myResourceGroup/providers/Microsoft.Chaos/locations/eastus/operationStatus/00000000-0000-0000-0000-000000000000?api-version=2024-11-01-preview
Location: https://management.azure.com/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/myResourceGroup/providers/Microsoft.Chaos/experiments/00000000-0000-0000-0000-000000000000?api-version=2024-11-01-preview
{
  "name": "exampleExperiment",
  "type": "Microsoft.Chaos/experiments",
  "id": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Chaos/experiments/exampleExperiment",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "d04ab567-2c07-43ef-a7f4-4527626b7f56",
    "tenantId": "8c3e2fb2-fe7a-4bf1-b779-d73990782fe6"
  },
  "tags": {
    "key7131": "ryohwcoiccwsnewjigfmijz",
    "key2138": "fjaeecgnvqd"
  },
  "location": "eastus2euap",
  "properties": {
    "provisioningState": "Creating",
    "selectors": [
      {
        "type": "List",
        "id": "selector1",
        "targets": [
          {
            "type": "ChaosTarget",
            "id": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine"
          }
        ]
      }
    ],
    "steps": [
      {
        "name": "step1",
        "branches": [
          {
            "name": "branch1",
            "actions": [
              {
                "name": "urn:csci:microsoft:virtualMachine:shutdown/1.0",
                "type": "continuous",
                "duration": "PT10M",
                "parameters": [
                  {
                    "key": "abruptShutdown",
                    "value": "false"
                  }
                ],
                "selectorId": "selector1"
              }
            ]
          }
        ]
      }
    ]
  },
  "systemData": {
    "createdAt": "2021-07-01T00:00:00.0Z",
    "createdBy": "User",
    "createdByType": "b3a41dba-4415-4d36-9ee8-e5eaa86db976",
    "lastModifiedAt": "2021-07-01T00:00:00.0Z",
    "lastModifiedBy": "User",
    "lastModifiedByType": "b3a41dba-4415-4d36-9ee8-e5eaa86db976"
  }
}

정의

Name Description
ChaosExperimentBranch

단계의 분기를 나타내는 모델입니다. 실험당 총 9개.

ChaosExperimentStep

실험 리소스의 단계를 나타내는 모델입니다.

ChaosTargetListSelector

목록 선택기를 나타내는 모델입니다.

ChaosTargetQuerySelector

쿼리 선택기를 나타내는 모델입니다.

ChaosTargetSimpleFilter

단순 대상 필터를 나타내는 모델입니다.

ChaosTargetSimpleFilterParameters

단순 필터 매개 변수를 나타내는 모델입니다.

ContinuousAction

연속 작업을 나타내는 모델입니다.

createdByType

리소스를 만든 ID의 형식입니다.

DelayAction

지연 작업을 나타내는 모델입니다.

DiscreteAction

불연속 동작을 나타내는 모델입니다.

ErrorAdditionalInfo

리소스 관리 오류 추가 정보입니다.

ErrorDetail

오류 세부 정보입니다.

ErrorResponse

오류 응답

Experiment

실험 리소스를 나타내는 모델입니다.

ExperimentActionType

Chaos 실험 작업 형식의 열거형 통합입니다.

FilterType

필터 형식을 구분하는 열거형입니다. 현재는 Simple 형식만 지원됩니다.

KeyValuePair

작업의 설정을 설명하는 맵입니다.

ManagedServiceIdentity

관리 서비스 ID(시스템 할당 및/또는 사용자 할당 ID)

ManagedServiceIdentityType

관리 서비스 ID의 유형입니다(SystemAssigned 및 UserAssigned 형식이 모두 허용되는 경우).

ProvisioningState

지정된 Azure Chaos 리소스에 대한 현재 프로비저닝 상태입니다.

SelectorType

선택기 형식의 열거형입니다.

systemData

리소스의 생성 및 마지막 수정과 관련된 메타데이터입니다.

TargetReference

선택기에서 대상에 대한 참조를 나타내는 모델입니다.

TargetReferenceType

대상 참조 형식의 열거형입니다.

UserAssignedIdentity

사용자 할당 ID 속성

ChaosExperimentBranch

단계의 분기를 나타내는 모델입니다. 실험당 총 9개.

Name 형식 Description
actions ChaosExperimentAction[]:

작업 목록입니다.

name

string

minLength: 1

분기 이름의 문자열입니다.

ChaosExperimentStep

실험 리소스의 단계를 나타내는 모델입니다.

Name 형식 Description
branches

ChaosExperimentBranch[]

분기 목록입니다.

name

string

minLength: 1

단계 이름의 문자열입니다.

ChaosTargetListSelector

목록 선택기를 나타내는 모델입니다.

Name 형식 Description
filter ChaosTargetFilter:

ChaosTargetSimpleFilter

대상 목록에 적용할 수 있는 사용 가능한 필터 형식을 나타내는 모델입니다.

id

string

minLength: 1

선택기 ID의 문자열입니다.

targets

TargetReference[]

대상 참조 목록입니다.

type string:

List

Chaos 대상 선택기 판별자 유형

ChaosTargetQuerySelector

쿼리 선택기를 나타내는 모델입니다.

Name 형식 Description
filter ChaosTargetFilter:

ChaosTargetSimpleFilter

대상 목록에 적용할 수 있는 사용 가능한 필터 형식을 나타내는 모델입니다.

id

string

minLength: 1

선택기 ID의 문자열입니다.

queryString

string

대상 리소스에 대한 ARG(Azure Resource Graph) 쿼리 언어 쿼리입니다.

subscriptionIds

string[]

리소스 쿼리 범위를 지정하는 구독 ID 목록입니다.

type string:

Query

Chaos 대상 선택기 판별자 유형

ChaosTargetSimpleFilter

단순 대상 필터를 나타내는 모델입니다.

Name 형식 Description
parameters

ChaosTargetSimpleFilterParameters

단순 필터 매개 변수를 나타내는 모델입니다.

type string:

Simple

비정상 상황 대상 필터 판별자 유형

ChaosTargetSimpleFilterParameters

단순 필터 매개 변수를 나타내는 모델입니다.

Name 형식 Description
zones

string[]

대상을 필터링할 Azure 가용성 영역 목록입니다.

ContinuousAction

연속 작업을 나타내는 모델입니다.

Name 형식 Description
duration

string (duration)

기간을 나타내는 형식이 지정된 문자열을 ISO8601.

name

string

maxLength: 2048

기능 URN을 나타내는 문자열입니다.

parameters

KeyValuePair[]

키 값 쌍의 목록입니다.

selectorId

string

minLength: 1

선택기를 나타내는 문자열입니다.

type string:

continuous

비정상 상황 실험 작업 판별자 유형

createdByType

리소스를 만든 ID의 형식입니다.

Description
User
Application
ManagedIdentity
Key

DelayAction

지연 작업을 나타내는 모델입니다.

Name 형식 Description
duration

string (duration)

기간을 나타내는 형식이 지정된 문자열을 ISO8601.

name

string

maxLength: 2048

기능 URN을 나타내는 문자열입니다.

type string:

delay

비정상 상황 실험 작업 판별자 유형

DiscreteAction

불연속 동작을 나타내는 모델입니다.

Name 형식 Description
name

string

maxLength: 2048

기능 URN을 나타내는 문자열입니다.

parameters

KeyValuePair[]

키 값 쌍의 목록입니다.

selectorId

string

minLength: 1

선택기를 나타내는 문자열입니다.

type string:

discrete

비정상 상황 실험 작업 판별자 유형

ErrorAdditionalInfo

리소스 관리 오류 추가 정보입니다.

Name 형식 Description
info

object

추가 정보입니다.

type

string

추가 정보 유형입니다.

ErrorDetail

오류 세부 정보입니다.

Name 형식 Description
additionalInfo

ErrorAdditionalInfo[]

오류 추가 정보입니다.

code

string

오류 코드입니다.

details

ErrorDetail[]

오류 세부 정보입니다.

message

string

오류 메시지입니다.

target

string

오류 대상입니다.

ErrorResponse

오류 응답

Name 형식 Description
error

ErrorDetail

오류 개체입니다.

Experiment

실험 리소스를 나타내는 모델입니다.

Name 형식 Description
id

string (arm-id)

리소스에 대한 정규화된 리소스 ID입니다. 예: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

identity

ManagedServiceIdentity

이 리소스에 할당된 관리 서비스 ID입니다.

location

string

리소스가 있는 지리적 위치

name

string

리소스의 이름

properties.provisioningState

ProvisioningState

지정된 실험 리소스에 대한 가장 최근의 프로비저닝 상태입니다.

properties.selectors ChaosTargetSelector[]:

선택기 목록입니다.

properties.steps

ChaosExperimentStep[]

단계 목록입니다.

systemData

systemData

createdBy 및 modifiedBy 정보가 포함된 Azure Resource Manager 메타데이터입니다.

tags

object

리소스 태그.

type

string

리소스의 형식입니다. 예: "Microsoft.Compute/virtualMachines" 또는 "Microsoft.Storage/storageAccounts"

ExperimentActionType

Chaos 실험 작업 형식의 열거형 통합입니다.

Description
delay
discrete
continuous

FilterType

필터 형식을 구분하는 열거형입니다. 현재는 Simple 형식만 지원됩니다.

Description
Simple

단순 필터 형식입니다.

KeyValuePair

작업의 설정을 설명하는 맵입니다.

Name 형식 Description
key

string

minLength: 1

작업에 대한 설정의 이름입니다.

value

string

minLength: 1

작업에 대한 설정의 값입니다.

ManagedServiceIdentity

관리 서비스 ID(시스템 할당 및/또는 사용자 할당 ID)

Name 형식 Description
principalId

string (uuid)

시스템 할당 ID의 서비스 주체 ID입니다. 이 속성은 시스템 할당 ID에 대해서만 제공됩니다.

tenantId

string (uuid)

시스템 할당 ID의 테넌트 ID입니다. 이 속성은 시스템 할당 ID에 대해서만 제공됩니다.

type

ManagedServiceIdentityType

관리 서비스 ID의 유형입니다(SystemAssigned 및 UserAssigned 형식이 모두 허용되는 경우).

userAssignedIdentities

<string,  UserAssignedIdentity>

User-Assigned ID
리소스와 연결된 사용자 할당 ID 집합입니다. userAssignedIdentities 사전 키는 '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName} 형식의 ARM 리소스 ID입니다. 사전 값은 요청에서 빈 개체({})일 수 있습니다.

ManagedServiceIdentityType

관리 서비스 ID의 유형입니다(SystemAssigned 및 UserAssigned 형식이 모두 허용되는 경우).

Description
None
SystemAssigned
UserAssigned
SystemAssigned,UserAssigned

ProvisioningState

지정된 Azure Chaos 리소스에 대한 현재 프로비저닝 상태입니다.

Description
Succeeded

리소스가 만들어졌습니다.

Failed

리소스를 만들지 못했습니다.

Canceled

리소스 만들기가 취소되었습니다.

Creating

초기 만들기가 진행 중입니다.

Updating

업데이트가 진행 중입니다.

Deleting

삭제가 진행 중입니다.

SelectorType

선택기 형식의 열거형입니다.

Description
List

목록 선택기 유형입니다.

Query

쿼리 선택기 유형입니다.

systemData

리소스의 생성 및 마지막 수정과 관련된 메타데이터입니다.

Name 형식 Description
createdAt

string (date-time)

리소스 만들기의 타임스탬프(UTC)입니다.

createdBy

string

리소스를 만든 ID입니다.

createdByType

createdByType

리소스를 만든 ID의 형식입니다.

lastModifiedAt

string (date-time)

리소스 마지막 수정의 타임스탬프(UTC)

lastModifiedBy

string

리소스를 마지막으로 수정한 ID입니다.

lastModifiedByType

createdByType

리소스를 마지막으로 수정한 ID의 형식입니다.

TargetReference

선택기에서 대상에 대한 참조를 나타내는 모델입니다.

Name 형식 Description
id

string (arm-id)

대상 리소스의 리소스 ID 문자열입니다.

type

TargetReferenceType

대상 참조 형식의 열거형입니다.

TargetReferenceType

대상 참조 형식의 열거형입니다.

Description
ChaosTarget

비정상 상황 대상 참조 형식입니다.

UserAssignedIdentity

사용자 할당 ID 속성

Name 형식 Description
clientId

string (uuid)

할당된 ID의 클라이언트 ID입니다.

principalId

string (uuid)

할당된 ID의 보안 주체 ID입니다.