Skip to content

Commit 8e19b75

Browse files
authored
[Storage-Preview] az storage account task-assignment: Storage Task-Assignment GA for Storage-Actions (#8909)
* update to 2024-01-01 GA from 2023-05-01 * task assignment tested, service issue requires `az cloud update -n AzureCloud --endpoint-resource-manager https://eastus2.management.azure.com/` * update mgmt-storage to 2024-01-01 for integration tests, remove pkg_resource references * rerun with management.azure instead of eastus2.management.azure * task-assignment requires storage-actions to be installed.
1 parent 1d56e50 commit 8e19b75

File tree

107 files changed

+6947
-16071
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+6947
-16071
lines changed

src/storage-preview/HISTORY.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
Release History
44
===============
55

6+
1.0.0b6
7+
+++++++
8+
* `az storage account task-assignment`: Task-Assignment GA for Storage Action
9+
610
1.0.0b5
711
+++++++
812
* `az storage blob access/directory/move`: Remove deprecated command groups since `az storage fs` command group has been GA since 2021

src/storage-preview/azext_storage_preview/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def __init__(self, cli_ctx=None):
1717
from azure.cli.core.commands import CliCommandType
1818

1919
register_resource_type('latest', CUSTOM_DATA_STORAGE, '2018-03-28')
20-
register_resource_type('latest', CUSTOM_MGMT_STORAGE, '2023-05-01')
20+
register_resource_type('latest', CUSTOM_MGMT_STORAGE, '2024-01-01')
2121
register_resource_type('latest', CUSTOM_DATA_STORAGE_FILESHARE, '2022-11-02')
2222
register_resource_type('latest', CUSTOM_DATA_STORAGE_BLOB, '2022-11-02')
2323
register_resource_type('latest', CUSTOM_DATA_STORAGE_FILEDATALAKE, '2020-06-12')

src/storage-preview/azext_storage_preview/aaz/latest/storage/account/task_assignment/__cmd_group.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
@register_command_group(
1515
"storage account task-assignment",
16-
is_preview=True,
1716
)
1817
class __CMDGroup(AAZCommandGroup):
1918
"""Manage storage account task assignment.

src/storage-preview/azext_storage_preview/aaz/latest/storage/account/task_assignment/_create.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,18 @@
1313

1414
@register_command(
1515
"storage account task-assignment create",
16-
is_preview=True,
1716
)
1817
class Create(AAZCommand):
19-
"""Create creates a new storage task assignment sub-resource with the specified parameters. If a storage task assignment is already created and a subsequent create request is issued with different properties, the storage task assignment properties will be updated. If a storage task assignment is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
18+
"""Create a new storage task assignment sub-resource with the specified parameters. If a storage task assignment is already created and a subsequent create request is issued with different properties, the storage task assignment properties will be updated. If a storage task assignment is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
19+
20+
:example: Create Storage TaskAssignment
21+
az storage account task-assignment create -g rg_name -n task_assignment_name --account-name storage_account_name --description 'My Storage task assignment' --enabled false --task-id 'task_id' --report '{prefix:container1}' --execution-context '{trigger:{type:OnSchedule,parameters:{start-from:'2024-08-14T21:52:47Z',end-by:'2024-09-04T21:52:47.203074Z',interval:10,interval-unit:Days}},target:{prefix:[prefix1,prefix2],exclude-prefix:[prefix3]}}'
2022
"""
2123

2224
_aaz_info = {
23-
"version": "2023-05-01",
25+
"version": "2024-01-01",
2426
"resources": [
25-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/storagetaskassignments/{}", "2023-05-01"],
27+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/storagetaskassignments/{}", "2024-01-01"],
2628
]
2729
}
2830

@@ -204,7 +206,7 @@ def __call__(self, *args, **kwargs):
204206
session,
205207
self.on_200_201,
206208
self.on_error,
207-
lro_options={"final-state-via": "location"},
209+
lro_options={"final-state-via": "azure-async-operation"},
208210
path_format_arguments=self.url_parameters,
209211
)
210212
if session.http_response.status_code in [200, 201]:
@@ -213,7 +215,7 @@ def __call__(self, *args, **kwargs):
213215
session,
214216
self.on_200_201,
215217
self.on_error,
216-
lro_options={"final-state-via": "location"},
218+
lro_options={"final-state-via": "azure-async-operation"},
217219
path_format_arguments=self.url_parameters,
218220
)
219221

@@ -260,7 +262,7 @@ def url_parameters(self):
260262
def query_parameters(self):
261263
parameters = {
262264
**self.serialize_query_param(
263-
"api-version", "2023-05-01",
265+
"api-version", "2024-01-01",
264266
required=True,
265267
),
266268
}

src/storage-preview/azext_storage_preview/aaz/latest/storage/account/task_assignment/_delete.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,19 @@
1313

1414
@register_command(
1515
"storage account task-assignment delete",
16-
is_preview=True,
1716
confirmation="Are you sure you want to perform this operation?",
1817
)
1918
class Delete(AAZCommand):
2019
"""Delete the storage task assignment sub-resource
20+
21+
:example: Delete Storage TaskAssignment
22+
az storage account task-assignment delete --resource-group res4228 --account-name sto4445 --storage-task-assignment-name myassignment1
2123
"""
2224

2325
_aaz_info = {
24-
"version": "2023-05-01",
26+
"version": "2024-01-01",
2527
"resources": [
26-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/storagetaskassignments/{}", "2023-05-01"],
28+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/storagetaskassignments/{}", "2024-01-01"],
2729
]
2830
}
2931

@@ -96,7 +98,7 @@ def __call__(self, *args, **kwargs):
9698
session,
9799
self.on_200_201,
98100
self.on_error,
99-
lro_options={"final-state-via": "location"},
101+
lro_options={"final-state-via": "azure-async-operation"},
100102
path_format_arguments=self.url_parameters,
101103
)
102104
if session.http_response.status_code in [204]:
@@ -105,7 +107,7 @@ def __call__(self, *args, **kwargs):
105107
session,
106108
self.on_204,
107109
self.on_error,
108-
lro_options={"final-state-via": "location"},
110+
lro_options={"final-state-via": "azure-async-operation"},
109111
path_format_arguments=self.url_parameters,
110112
)
111113
if session.http_response.status_code in [200, 201]:
@@ -114,7 +116,7 @@ def __call__(self, *args, **kwargs):
114116
session,
115117
self.on_200_201,
116118
self.on_error,
117-
lro_options={"final-state-via": "location"},
119+
lro_options={"final-state-via": "azure-async-operation"},
118120
path_format_arguments=self.url_parameters,
119121
)
120122

@@ -161,7 +163,7 @@ def url_parameters(self):
161163
def query_parameters(self):
162164
parameters = {
163165
**self.serialize_query_param(
164-
"api-version", "2023-05-01",
166+
"api-version", "2024-01-01",
165167
required=True,
166168
),
167169
}

src/storage-preview/azext_storage_preview/aaz/latest/storage/account/task_assignment/_list.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,18 @@
1313

1414
@register_command(
1515
"storage account task-assignment list",
16-
is_preview=True,
1716
)
1817
class List(AAZCommand):
1918
"""List all the storage task assignments in an account
19+
20+
:example: List Storage TaskAssignments
21+
az storage account task-assignment list --resource-group res4228 --account-name sto4445
2022
"""
2123

2224
_aaz_info = {
23-
"version": "2023-05-01",
25+
"version": "2024-01-01",
2426
"resources": [
25-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/storagetaskassignments", "2023-05-01"],
27+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/storagetaskassignments", "2024-01-01"],
2628
]
2729
}
2830

@@ -131,7 +133,7 @@ def query_parameters(self):
131133
"$maxpagesize", self.ctx.args.maxpagesize,
132134
),
133135
**self.serialize_query_param(
134-
"api-version", "2023-05-01",
136+
"api-version", "2024-01-01",
135137
required=True,
136138
),
137139
}

src/storage-preview/azext_storage_preview/aaz/latest/storage/account/task_assignment/_list_report.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,18 @@
1313

1414
@register_command(
1515
"storage account task-assignment list-report",
16-
is_preview=True,
1716
)
1817
class ListReport(AAZCommand):
1918
"""List the report summary of a single storage task assignment's instances
19+
20+
:example: List Storage TaskAssignment InstancesReportSummary
21+
az storage account task-assignment list-report --resource-group res4228 --account-name sto4445 --storage-task-assignment-name myassignment1
2022
"""
2123

2224
_aaz_info = {
23-
"version": "2023-05-01",
25+
"version": "2024-01-01",
2426
"resources": [
25-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/storagetaskassignments/{}/reports", "2023-05-01"],
27+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/storagetaskassignments/{}/reports", "2024-01-01"],
2628
]
2729
}
2830

@@ -152,7 +154,7 @@ def query_parameters(self):
152154
"$maxpagesize", self.ctx.args.maxpagesize,
153155
),
154156
**self.serialize_query_param(
155-
"api-version", "2023-05-01",
157+
"api-version", "2024-01-01",
156158
required=True,
157159
),
158160
}

src/storage-preview/azext_storage_preview/aaz/latest/storage/account/task_assignment/_show.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,18 @@
1313

1414
@register_command(
1515
"storage account task-assignment show",
16-
is_preview=True,
1716
)
1817
class Show(AAZCommand):
1918
"""Get the storage task assignment properties
19+
20+
:example: Get Storage TaskAssignment
21+
az storage account task-assignment show -g rg_name -n task_assignment_name --account-name storage_account_name
2022
"""
2123

2224
_aaz_info = {
23-
"version": "2023-05-01",
25+
"version": "2024-01-01",
2426
"resources": [
25-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/storagetaskassignments/{}", "2023-05-01"],
27+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/storagetaskassignments/{}", "2024-01-01"],
2628
]
2729
}
2830

@@ -138,7 +140,7 @@ def url_parameters(self):
138140
def query_parameters(self):
139141
parameters = {
140142
**self.serialize_query_param(
141-
"api-version", "2023-05-01",
143+
"api-version", "2024-01-01",
142144
required=True,
143145
),
144146
}

src/storage-preview/azext_storage_preview/aaz/latest/storage/account/task_assignment/_update.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,18 @@
1313

1414
@register_command(
1515
"storage account task-assignment update",
16-
is_preview=True,
1716
)
1817
class Update(AAZCommand):
19-
"""Update creates a new storage task assignment sub-resource with the specified parameters. If a storage task assignment is already created and a subsequent create request is issued with different properties, the storage task assignment properties will be updated. If a storage task assignment is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
18+
"""Update a new storage task assignment sub-resource with the specified parameters. If a storage task assignment is already created and a subsequent create request is issued with different properties, the storage task assignment properties will be updated. If a storage task assignment is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
19+
20+
:example: Update Storage TaskAssignment
21+
az storage account task-assignment update -g rg_name -n task_assignment_name --account-name storage_account_name --description 'My Storage task assignment' --enabled true --task-id 'task_id' --report '{prefix:container1}' --execution-context '{trigger:{type:OnSchedule,parameters:{start-from:'2024-08-15T21:52:47Z',end-by:'2024-09-05T21:52:47.203074Z',interval:10,interval-unit:Days}},target:{prefix:[prefix1,prefix2],exclude-prefix:[prefix3]}}'
2022
"""
2123

2224
_aaz_info = {
23-
"version": "2023-05-01",
25+
"version": "2024-01-01",
2426
"resources": [
25-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/storagetaskassignments/{}", "2023-05-01"],
27+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/storagetaskassignments/{}", "2024-01-01"],
2628
]
2729
}
2830

@@ -264,7 +266,7 @@ def url_parameters(self):
264266
def query_parameters(self):
265267
parameters = {
266268
**self.serialize_query_param(
267-
"api-version", "2023-05-01",
269+
"api-version", "2024-01-01",
268270
required=True,
269271
),
270272
}
@@ -311,7 +313,7 @@ def __call__(self, *args, **kwargs):
311313
session,
312314
self.on_200_201,
313315
self.on_error,
314-
lro_options={"final-state-via": "location"},
316+
lro_options={"final-state-via": "azure-async-operation"},
315317
path_format_arguments=self.url_parameters,
316318
)
317319
if session.http_response.status_code in [200, 201]:
@@ -320,7 +322,7 @@ def __call__(self, *args, **kwargs):
320322
session,
321323
self.on_200_201,
322324
self.on_error,
323-
lro_options={"final-state-via": "location"},
325+
lro_options={"final-state-via": "azure-async-operation"},
324326
path_format_arguments=self.url_parameters,
325327
)
326328

@@ -367,7 +369,7 @@ def url_parameters(self):
367369
def query_parameters(self):
368370
parameters = {
369371
**self.serialize_query_param(
370-
"api-version", "2023-05-01",
372+
"api-version", "2024-01-01",
371373
required=True,
372374
),
373375
}

src/storage-preview/azext_storage_preview/aaz/latest/storage/account/task_assignment/_wait.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Wait(AAZWaitCommand):
2020

2121
_aaz_info = {
2222
"resources": [
23-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/storagetaskassignments/{}", "2023-05-01"],
23+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/storagetaskassignments/{}", "2024-01-01"],
2424
]
2525
}
2626

@@ -136,7 +136,7 @@ def url_parameters(self):
136136
def query_parameters(self):
137137
parameters = {
138138
**self.serialize_query_param(
139-
"api-version", "2023-05-01",
139+
"api-version", "2024-01-01",
140140
required=True,
141141
),
142142
}

0 commit comments

Comments
 (0)