다음을 통해 공유


Storage Tasks - Create

지정된 매개 변수를 사용하여 새 스토리지 작업 리소스를 비동기적으로 만듭니다. 스토리지 작업이 이미 만들어지고 후속 만들기 요청이 다른 속성으로 발급되면 스토리지 작업 속성이 업데이트됩니다. 스토리지 작업이 이미 만들어지고 동일한 속성 집합으로 후속 만들기 또는 업데이트 요청이 실행되면 요청이 성공합니다.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageActions/storageTasks/{storageTaskName}?api-version=2023-01-01

URI 매개 변수

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

string

minLength: 1
maxLength: 90

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

storageTaskName
path True

string

minLength: 3
maxLength: 18
pattern: ^[a-z0-9]{3,18}$

지정된 리소스 그룹 내의 스토리지 작업의 이름입니다. 스토리지 작업 이름은 길이가 3자에서 18자 사이여야 하며 숫자와 소문자만 사용해야 합니다.

subscriptionId
path True

string (uuid)

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

api-version
query True

string

minLength: 1

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

요청 본문

Name 필수 형식 Description
identity True

ManagedServiceIdentity

리소스의 관리 서비스 ID입니다.

location True

string

리소스가 있는 지리적 위치

properties.action True

StorageTaskAction

실행되는 스토리지 작업 작업

properties.description True

string

스토리지 작업의 목적을 설명하는 텍스트

properties.enabled True

boolean

true로 설정하면 스토리지 작업이 활성화되고 false로 설정되면 사용하지 않도록 설정됩니다.

tags

object

리소스 태그.

응답

Name 형식 Description
200 OK

StorageTask

리소스 'StorageTask' 업데이트 작업이 성공했습니다.

201 Created

StorageTask

리소스 'StorageTask' 생성 작업이 성공했습니다.

헤더

  • Location: string
  • Retry-After: integer
202 Accepted

리소스 작업이 수락되었습니다.

헤더

  • Location: 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 사용자 계정 가장

예제

PutStorageTask

샘플 요청

PUT https://management.azure.com/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask1?api-version=2023-01-01

{
  "identity": {
    "type": "SystemAssigned"
  },
  "location": "westus",
  "properties": {
    "description": "My Storage task",
    "action": {
      "else": {
        "operations": [
          {
            "name": "DeleteBlob",
            "onFailure": "break",
            "onSuccess": "continue"
          }
        ]
      },
      "if": {
        "condition": "[[equals(AccessTier, 'Cool')]]",
        "operations": [
          {
            "name": "SetBlobTier",
            "onFailure": "break",
            "onSuccess": "continue",
            "parameters": {
              "tier": "Hot"
            }
          }
        ]
      }
    },
    "enabled": true
  }
}

샘플 응답

location: https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.StorageActions/locations/eastus/operationResults/00000000-0000-0000-0000-000000000000?api-version=2023-01-01
{
  "name": "mytask1",
  "type": "Microsoft.StorageActions/storageTasks",
  "id": "/subscriptions/c86a9c18-8373-41fa-92d4-1d7bdc16977b/resourceGroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask1",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "2fd475e8-8923-4597-842f-7ce1adfc6c4a",
    "tenantId": "b4a2005c-32c1-434c-bbf0-ff486912fc75"
  },
  "location": "westus",
  "properties": {
    "description": "Storage task",
    "action": {
      "else": {
        "operations": [
          {
            "name": "DeleteBlob",
            "onFailure": "break",
            "onSuccess": "continue"
          }
        ]
      },
      "if": {
        "condition": "[[equals(AccessTier, 'Cool')]]",
        "operations": [
          {
            "name": "SetBlobTier",
            "onFailure": "break",
            "onSuccess": "continue",
            "parameters": {
              "tier": "Hot"
            }
          }
        ]
      }
    },
    "creationTimeInUtc": "2023-07-06T00:24:59.1441663Z",
    "enabled": true,
    "provisioningState": "Succeeded",
    "taskVersion": 1
  }
}
location: https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.StorageActions/locations/eastus/operationResults/00000000-0000-0000-0000-000000000000?api-version=2023-01-01
{
  "name": "mytask1",
  "type": "Microsoft.StorageActions/storageTasks",
  "id": "/subscriptions/c86a9c18-8373-41fa-92d4-1d7bdc16977b/resourceGroups/res4228/providers/Microsoft.StorageActions/storageTasks/mytask1",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "2fd475e8-8923-4597-842f-7ce1adfc6c4a",
    "tenantId": "b4a2005c-32c1-434c-bbf0-ff486912fc75"
  },
  "location": "westus",
  "properties": {
    "description": "Storage task",
    "action": {
      "else": {
        "operations": [
          {
            "name": "DeleteBlob",
            "onFailure": "break",
            "onSuccess": "continue"
          }
        ]
      },
      "if": {
        "condition": "[[equals(AccessTier, 'Cool')]]",
        "operations": [
          {
            "name": "SetBlobTier",
            "onFailure": "break",
            "onSuccess": "continue",
            "parameters": {
              "tier": "Hot"
            }
          }
        ]
      }
    },
    "creationTimeInUtc": "2023-07-06T00:24:59.1441663Z",
    "enabled": true,
    "provisioningState": "Succeeded",
    "taskVersion": 1
  }
}
location: https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.StorageActions/locations/eastus/operationResults/00000000-0000-0000-0000-000000000000?api-version=2023-01-01

정의

Name Description
createdByType

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

ElseCondition

스토리지 작업 작업의 다른 블록

ErrorAdditionalInfo

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

ErrorDetail

오류 세부 정보입니다.

ErrorResponse

오류 응답

IfCondition

if 스토리지 작업 블록

ManagedServiceIdentity

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

ManagedServiceIdentityType

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

OnFailure

개체에 대한 작업이 실패할 때 수행할 작업입니다.

OnSuccess

개체에 대해 작업이 성공하면 수행할 작업입니다.

ProvisioningState

스토리지 작업의 프로비전 상태를 나타냅니다.

StorageTask

스토리지 작업을 나타냅니다.

StorageTaskAction

스토리지 작업 작업은 대상 개체에서 수행할 조건문 및 작업을 나타냅니다.

StorageTaskOperation

개체에서 수행할 작업을 나타냅니다.

StorageTaskOperationName

개체에서 수행할 작업입니다.

systemData

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

UserAssignedIdentity

사용자 할당 ID 속성

createdByType

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

Description
User
Application
ManagedIdentity
Key

ElseCondition

스토리지 작업 작업의 다른 블록

Name 형식 Description
operations

StorageTaskOperation[]

다른 블록에서 실행할 작업 목록

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

오류 개체입니다.

IfCondition

if 스토리지 작업 블록

Name 형식 Description
condition

string

각 개체를 평가하기 위한 조건자입니다. 유효한 속성 및 연산자는 https://aka.ms/storagetaskconditions 참조하세요.

operations

StorageTaskOperation[]

조건자가 충족되는 경우 실행할 작업 목록입니다.

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

OnFailure

개체에 대한 작업이 실패할 때 수행할 작업입니다.

Description
break

OnSuccess

개체에 대해 작업이 성공하면 수행할 작업입니다.

Description
continue

ProvisioningState

스토리지 작업의 프로비전 상태를 나타냅니다.

Description
ValidateSubscriptionQuotaBegin
ValidateSubscriptionQuotaEnd
Accepted
Creating
Succeeded
Deleting
Canceled
Failed

StorageTask

스토리지 작업을 나타냅니다.

Name 형식 Description
id

string (arm-id)

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

identity

ManagedServiceIdentity

리소스의 관리 서비스 ID입니다.

location

string

리소스가 있는 지리적 위치

name

string

리소스의 이름

properties.action

StorageTaskAction

실행되는 스토리지 작업 작업

properties.creationTimeInUtc

string (date-time)

스토리지 작업의 생성 날짜 및 시간(UTC)입니다.

properties.description

string

스토리지 작업의 목적을 설명하는 텍스트

properties.enabled

boolean

true로 설정하면 스토리지 작업이 활성화되고 false로 설정되면 사용하지 않도록 설정됩니다.

properties.provisioningState

ProvisioningState

스토리지 작업의 프로비전 상태를 나타냅니다.

properties.taskVersion

integer (int64)

minimum: 1
maximum: 1

스토리지 작업 버전입니다.

systemData

systemData

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

tags

object

리소스 태그.

type

string

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

StorageTaskAction

스토리지 작업 작업은 대상 개체에서 수행할 조건문 및 작업을 나타냅니다.

Name 형식 Description
else

ElseCondition

스토리지 작업 작업의 다른 블록

if

IfCondition

if 스토리지 작업 블록

StorageTaskOperation

개체에서 수행할 작업을 나타냅니다.

Name 형식 Description
name

StorageTaskOperationName

개체에서 수행할 작업입니다.

onFailure

OnFailure

개체에 대한 작업이 실패할 때 수행할 작업입니다.

onSuccess

OnSuccess

개체에 대해 작업이 성공하면 수행할 작업입니다.

parameters

object

작업에 대한 키-값 매개 변수입니다.

StorageTaskOperationName

개체에서 수행할 작업입니다.

Description
SetBlobTier
SetBlobTags
SetBlobImmutabilityPolicy
SetBlobLegalHold
SetBlobExpiry
DeleteBlob
UndeleteBlob

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의 형식입니다.

UserAssignedIdentity

사용자 할당 ID 속성

Name 형식 Description
clientId

string (uuid)

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

principalId

string (uuid)

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