Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/storage-preview/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Release History
===============

1.0.0b6
+++++++
* `az storage account task-assignment`: Task-Assignment GA for Storage Action

1.0.0b5
+++++++
* `az storage blob access/directory/move`: Remove deprecated command groups since `az storage fs` command group has been GA since 2021
Expand Down
2 changes: 1 addition & 1 deletion src/storage-preview/azext_storage_preview/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def __init__(self, cli_ctx=None):
from azure.cli.core.commands import CliCommandType

register_resource_type('latest', CUSTOM_DATA_STORAGE, '2018-03-28')
register_resource_type('latest', CUSTOM_MGMT_STORAGE, '2023-05-01')
register_resource_type('latest', CUSTOM_MGMT_STORAGE, '2024-01-01')
register_resource_type('latest', CUSTOM_DATA_STORAGE_FILESHARE, '2022-11-02')
register_resource_type('latest', CUSTOM_DATA_STORAGE_BLOB, '2022-11-02')
register_resource_type('latest', CUSTOM_DATA_STORAGE_FILEDATALAKE, '2020-06-12')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

@register_command_group(
"storage account task-assignment",
is_preview=True,
)
class __CMDGroup(AAZCommandGroup):
"""Manage storage account task assignment.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@

@register_command(
"storage account task-assignment create",
is_preview=True,
)
class Create(AAZCommand):
"""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.
"""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.

:example: Create Storage TaskAssignment
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]}}'
"""

_aaz_info = {
"version": "2023-05-01",
"version": "2024-01-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/storagetaskassignments/{}", "2023-05-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/storagetaskassignments/{}", "2024-01-01"],
]
}

Expand Down Expand Up @@ -204,7 +206,7 @@ def __call__(self, *args, **kwargs):
session,
self.on_200_201,
self.on_error,
lro_options={"final-state-via": "location"},
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200, 201]:
Expand All @@ -213,7 +215,7 @@ def __call__(self, *args, **kwargs):
session,
self.on_200_201,
self.on_error,
lro_options={"final-state-via": "location"},
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)

Expand Down Expand Up @@ -260,7 +262,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-05-01",
"api-version", "2024-01-01",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,19 @@

@register_command(
"storage account task-assignment delete",
is_preview=True,
confirmation="Are you sure you want to perform this operation?",
)
class Delete(AAZCommand):
"""Delete the storage task assignment sub-resource

:example: Delete Storage TaskAssignment
az storage account task-assignment delete --resource-group res4228 --account-name sto4445 --storage-task-assignment-name myassignment1
"""

_aaz_info = {
"version": "2023-05-01",
"version": "2024-01-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/storagetaskassignments/{}", "2023-05-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/storagetaskassignments/{}", "2024-01-01"],
]
}

Expand Down Expand Up @@ -96,7 +98,7 @@ def __call__(self, *args, **kwargs):
session,
self.on_200_201,
self.on_error,
lro_options={"final-state-via": "location"},
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [204]:
Expand All @@ -105,7 +107,7 @@ def __call__(self, *args, **kwargs):
session,
self.on_204,
self.on_error,
lro_options={"final-state-via": "location"},
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200, 201]:
Expand All @@ -114,7 +116,7 @@ def __call__(self, *args, **kwargs):
session,
self.on_200_201,
self.on_error,
lro_options={"final-state-via": "location"},
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)

Expand Down Expand Up @@ -161,7 +163,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-05-01",
"api-version", "2024-01-01",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@

@register_command(
"storage account task-assignment list",
is_preview=True,
)
class List(AAZCommand):
"""List all the storage task assignments in an account

:example: List Storage TaskAssignments
az storage account task-assignment list --resource-group res4228 --account-name sto4445
"""

_aaz_info = {
"version": "2023-05-01",
"version": "2024-01-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/storagetaskassignments", "2023-05-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/storagetaskassignments", "2024-01-01"],
]
}

Expand Down Expand Up @@ -131,7 +133,7 @@ def query_parameters(self):
"$maxpagesize", self.ctx.args.maxpagesize,
),
**self.serialize_query_param(
"api-version", "2023-05-01",
"api-version", "2024-01-01",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@

@register_command(
"storage account task-assignment list-report",
is_preview=True,
)
class ListReport(AAZCommand):
"""List the report summary of a single storage task assignment's instances

:example: List Storage TaskAssignment InstancesReportSummary
az storage account task-assignment list-report --resource-group res4228 --account-name sto4445 --storage-task-assignment-name myassignment1
"""

_aaz_info = {
"version": "2023-05-01",
"version": "2024-01-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/storagetaskassignments/{}/reports", "2023-05-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/storagetaskassignments/{}/reports", "2024-01-01"],
]
}

Expand Down Expand Up @@ -152,7 +154,7 @@ def query_parameters(self):
"$maxpagesize", self.ctx.args.maxpagesize,
),
**self.serialize_query_param(
"api-version", "2023-05-01",
"api-version", "2024-01-01",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@

@register_command(
"storage account task-assignment show",
is_preview=True,
)
class Show(AAZCommand):
"""Get the storage task assignment properties

:example: Get Storage TaskAssignment
az storage account task-assignment show -g rg_name -n task_assignment_name --account-name storage_account_name
"""

_aaz_info = {
"version": "2023-05-01",
"version": "2024-01-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/storagetaskassignments/{}", "2023-05-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/storagetaskassignments/{}", "2024-01-01"],
]
}

Expand Down Expand Up @@ -138,7 +140,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-05-01",
"api-version", "2024-01-01",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@

@register_command(
"storage account task-assignment update",
is_preview=True,
)
class Update(AAZCommand):
"""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.
"""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.

:example: Update Storage TaskAssignment
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]}}'
"""

_aaz_info = {
"version": "2023-05-01",
"version": "2024-01-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/storagetaskassignments/{}", "2023-05-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/storagetaskassignments/{}", "2024-01-01"],
]
}

Expand Down Expand Up @@ -264,7 +266,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-05-01",
"api-version", "2024-01-01",
required=True,
),
}
Expand Down Expand Up @@ -311,7 +313,7 @@ def __call__(self, *args, **kwargs):
session,
self.on_200_201,
self.on_error,
lro_options={"final-state-via": "location"},
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200, 201]:
Expand All @@ -320,7 +322,7 @@ def __call__(self, *args, **kwargs):
session,
self.on_200_201,
self.on_error,
lro_options={"final-state-via": "location"},
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)

Expand Down Expand Up @@ -367,7 +369,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-05-01",
"api-version", "2024-01-01",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Wait(AAZWaitCommand):

_aaz_info = {
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/storagetaskassignments/{}", "2023-05-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storage/storageaccounts/{}/storagetaskassignments/{}", "2024-01-01"],
]
}

Expand Down Expand Up @@ -136,7 +136,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-05-01",
"api-version", "2024-01-01",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"azext.isPreview": true,
"azext.minCliCoreVersion": "2.61.0"
"azext.minCliCoreVersion": "2.70.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
from azure.cli.core.profiles import register_resource_type
from ...profiles import CUSTOM_MGMT_STORAGE, CUSTOM_DATA_STORAGE_FILEDATALAKE

register_resource_type('latest', CUSTOM_MGMT_STORAGE, '2023-05-01')
register_resource_type('latest', CUSTOM_MGMT_STORAGE, '2024-01-01')
register_resource_type('latest', CUSTOM_DATA_STORAGE_FILEDATALAKE, '2020-06-12')
Loading
Loading