Storage Tasks - Create
Belirtilen parametrelerle zaman uyumsuz olarak yeni bir depolama görevi kaynağı oluşturur. Bir depolama görevi zaten oluşturulduysa ve sonraki bir oluşturma isteği farklı özelliklerle verildiyse, depolama görevi özellikleri güncelleştirilir. Bir depolama görevi zaten oluşturulduysa ve tam olarak aynı özellik kümesiyle sonraki bir oluşturma veya güncelleştirme isteği verildiyse, istek başarılı olur.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageActions/storageTasks/{storageTaskName}?api-version=2023-01-01
URI Parametreleri
| Name | İçinde | Gerekli | Tür | Description |
|---|---|---|---|---|
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
Kaynak grubunun adı. Ad büyük/küçük harfe duyarsız. |
|
storage
|
path | True |
string minLength: 3maxLength: 18 pattern: ^[a-z0-9]{3,18}$ |
Belirtilen kaynak grubu içindeki depolama görevinin adı. Depolama görevi adları 3 ila 18 karakter uzunluğunda olmalı ve yalnızca sayıları ve küçük harfleri kullanmalıdır. |
|
subscription
|
path | True |
string (uuid) |
Hedef aboneliğin kimliği. Değer bir UUID olmalıdır. |
|
api-version
|
query | True |
string minLength: 1 |
Bu işlem için kullanılacak API sürümü. |
İstek Gövdesi
| Name | Gerekli | Tür | Description |
|---|---|---|---|
| identity | True |
Kaynağın yönetilen hizmet kimliği. |
|
| location | True |
string |
Kaynağın bulunduğu coğrafi konum |
| properties.action | True |
Yürütülen depolama görevi eylemi |
|
| properties.description | True |
string |
Depolama görevinin amacını açıklayan metin |
| properties.enabled | True |
boolean |
Depolama Görevi true olarak ayarlandığında etkinleştirilir ve false olarak ayarlandığında devre dışı bırakılır |
| tags |
object |
Kaynak etiketleri. |
Yanıtlar
| Name | Tür | Description |
|---|---|---|
| 200 OK |
Kaynak 'StorageTask' güncelleştirme işlemi başarılı oldu |
|
| 201 Created |
Kaynak 'StorageTask' oluşturma işlemi başarılı oldu Üst Bilgiler
|
|
| 202 Accepted |
Kaynak işlemi kabul edildi. Üst Bilgiler
|
|
| Other Status Codes |
Beklenmeyen bir hata yanıtı. |
Güvenlik
azure_auth
Azure Active Directory OAuth2 Akışı.
Tür:
oauth2
Akış:
implicit
Yetkilendirme URL’si:
https://login.microsoftonline.com/common/oauth2/authorize
Kapsamlar
| Name | Description |
|---|---|
| user_impersonation | kullanıcı hesabınızın kimliğine bürünme |
Örnekler
PutStorageTask
Örnek isteği
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
}
}
Örnek yanıt
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
Tanımlar
| Name | Description |
|---|---|
|
created |
Kaynağı oluşturan kimliğin türü. |
|
Else |
Depolama görevi işleminin else bloğu |
|
Error |
Kaynak yönetimi hatası ek bilgileri. |
|
Error |
Hata ayrıntısı. |
|
Error |
Hata yanıtı |
|
If |
Depolama görev işleminin if bloğu |
|
Managed |
Yönetilen hizmet kimliği (sistem tarafından atanan ve/veya kullanıcı tarafından atanan kimlikler) |
|
Managed |
Yönetilen hizmet kimliği türü (hem SystemAssigned hem de UserAssigned türlerine izin verilir). |
|
On |
bir nesne için işlem başarısız olduğunda gerçekleştirilecek eylem. |
|
On |
İşlem bir nesne için başarılı olduğunda gerçekleştirilecek eylem. |
|
Provisioning |
Depolama görevinin sağlama durumunu temsil eder. |
|
Storage |
Depolama Görevini temsil eder. |
|
Storage |
Depolama görevi eylemi, hedef nesneler üzerinde gerçekleştirilecek koşullu deyimleri ve işlemleri temsil eder. |
|
Storage |
Nesne üzerinde gerçekleştirilecek işlemi temsil eder |
|
Storage |
Nesne üzerinde gerçekleştirilecek işlem. |
|
system |
Kaynağın oluşturulması ve son değiştirilmesiyle ilgili meta veriler. |
|
User |
Kullanıcı tarafından atanan kimlik özellikleri |
createdByType
Kaynağı oluşturan kimliğin türü.
| Değer | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
ElseCondition
Depolama görevi işleminin else bloğu
| Name | Tür | Description |
|---|---|---|
| operations |
Else bloğunda yürütülecek işlemlerin listesi |
ErrorAdditionalInfo
Kaynak yönetimi hatası ek bilgileri.
| Name | Tür | Description |
|---|---|---|
| info |
object |
Ek bilgiler. |
| type |
string |
Ek bilgi türü. |
ErrorDetail
Hata ayrıntısı.
| Name | Tür | Description |
|---|---|---|
| additionalInfo |
Hata ek bilgileri. |
|
| code |
string |
Hata kodu. |
| details |
Hata ayrıntıları. |
|
| message |
string |
Hata iletisi. |
| target |
string |
Hata hedefi. |
ErrorResponse
Hata yanıtı
| Name | Tür | Description |
|---|---|---|
| error |
Hata nesnesi. |
IfCondition
Depolama görev işleminin if bloğu
| Name | Tür | Description |
|---|---|---|
| condition |
string |
Her nesneyi değerlendirmek için koşul koşulu. Geçerli özellikler ve işleçler için bkz. https://aka.ms/storagetaskconditions. |
| operations |
Koşul koşulu karşılandığında yürütülecek işlemlerin listesi. |
ManagedServiceIdentity
Yönetilen hizmet kimliği (sistem tarafından atanan ve/veya kullanıcı tarafından atanan kimlikler)
| Name | Tür | Description |
|---|---|---|
| principalId |
string (uuid) |
Sistem tarafından atanan kimliğin hizmet sorumlusu kimliği. Bu özellik yalnızca sistem tarafından atanan kimlik için sağlanacaktır. |
| tenantId |
string (uuid) |
Sistem tarafından atanan kimliğin kiracı kimliği. Bu özellik yalnızca sistem tarafından atanan kimlik için sağlanacaktır. |
| type |
Yönetilen hizmet kimliği türü (hem SystemAssigned hem de UserAssigned türlerine izin verilir). |
|
| userAssignedIdentities |
<string,
User |
kimlikleri User-Assigned |
ManagedServiceIdentityType
Yönetilen hizmet kimliği türü (hem SystemAssigned hem de UserAssigned türlerine izin verilir).
| Değer | Description |
|---|---|
| None | |
| SystemAssigned | |
| UserAssigned | |
| SystemAssigned,UserAssigned |
OnFailure
bir nesne için işlem başarısız olduğunda gerçekleştirilecek eylem.
| Değer | Description |
|---|---|
| break |
OnSuccess
İşlem bir nesne için başarılı olduğunda gerçekleştirilecek eylem.
| Değer | Description |
|---|---|
| continue |
ProvisioningState
Depolama görevinin sağlama durumunu temsil eder.
| Değer | Description |
|---|---|
| ValidateSubscriptionQuotaBegin | |
| ValidateSubscriptionQuotaEnd | |
| Accepted | |
| Creating | |
| Succeeded | |
| Deleting | |
| Canceled | |
| Failed |
StorageTask
Depolama Görevini temsil eder.
| Name | Tür | Description |
|---|---|---|
| id |
string (arm-id) |
Kaynağın tam kaynak kimliği. Örneğin, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
| identity |
Kaynağın yönetilen hizmet kimliği. |
|
| location |
string |
Kaynağın bulunduğu coğrafi konum |
| name |
string |
Kaynağın adı |
| properties.action |
Yürütülen depolama görevi eylemi |
|
| properties.creationTimeInUtc |
string (date-time) |
UTC olarak depolama görevinin oluşturma tarihi ve saati. |
| properties.description |
string |
Depolama görevinin amacını açıklayan metin |
| properties.enabled |
boolean |
Depolama Görevi true olarak ayarlandığında etkinleştirilir ve false olarak ayarlandığında devre dışı bırakılır |
| properties.provisioningState |
Depolama görevinin sağlama durumunu temsil eder. |
|
| properties.taskVersion |
integer (int64) minimum: 1maximum: 1 |
Depolama görevi sürümü. |
| systemData |
createdBy ve modifiedBy bilgilerini içeren Azure Resource Manager meta verileri. |
|
| tags |
object |
Kaynak etiketleri. |
| type |
string |
Kaynağın türü. Örneğin, "Microsoft.Compute/virtualMachines" veya "Microsoft.Storage/storageAccounts" |
StorageTaskAction
Depolama görevi eylemi, hedef nesneler üzerinde gerçekleştirilecek koşullu deyimleri ve işlemleri temsil eder.
| Name | Tür | Description |
|---|---|---|
| else |
Depolama görevi işleminin else bloğu |
|
| if |
Depolama görev işleminin if bloğu |
StorageTaskOperation
Nesne üzerinde gerçekleştirilecek işlemi temsil eder
| Name | Tür | Description |
|---|---|---|
| name |
Nesne üzerinde gerçekleştirilecek işlem. |
|
| onFailure |
bir nesne için işlem başarısız olduğunda gerçekleştirilecek eylem. |
|
| onSuccess |
İşlem bir nesne için başarılı olduğunda gerçekleştirilecek eylem. |
|
| parameters |
object |
İşlem için anahtar-değer parametreleri. |
StorageTaskOperationName
Nesne üzerinde gerçekleştirilecek işlem.
| Değer | Description |
|---|---|
| SetBlobTier | |
| SetBlobTags | |
| SetBlobImmutabilityPolicy | |
| SetBlobLegalHold | |
| SetBlobExpiry | |
| DeleteBlob | |
| UndeleteBlob |
systemData
Kaynağın oluşturulması ve son değiştirilmesiyle ilgili meta veriler.
| Name | Tür | Description |
|---|---|---|
| createdAt |
string (date-time) |
Kaynak oluşturma (UTC) zaman damgası. |
| createdBy |
string |
Kaynağı oluşturan kimlik. |
| createdByType |
Kaynağı oluşturan kimliğin türü. |
|
| lastModifiedAt |
string (date-time) |
Kaynağın son değişikliğinin zaman damgası (UTC) |
| lastModifiedBy |
string |
Kaynağı en son değiştiren kimlik. |
| lastModifiedByType |
Kaynağı en son değiştiren kimlik türü. |
UserAssignedIdentity
Kullanıcı tarafından atanan kimlik özellikleri
| Name | Tür | Description |
|---|---|---|
| clientId |
string (uuid) |
Atanan kimliğin istemci kimliği. |
| principalId |
string (uuid) |
Atanan kimliğin asıl kimliği. |