Skip to content
Open
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
6 changes: 5 additions & 1 deletion src/storage-preview/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
Release History
===============

1.0.0b8
+++++++
* `az storage account task-assignment`: Add `MockRun` as a triggerType

1.0.0b7
++++++
+++++++
* Remove DATA_COSMOS_TABLE and DATA_STORAGE references
* `az storage account migration start/show`: Remove since it has been GA in main repo

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Create(AAZCommand):
"""

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

Expand Down Expand Up @@ -63,7 +63,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
help="The name of the storage task assignment within the specified resource group. Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.",
required=True,
fmt=AAZStrArgFormat(
pattern="^[a-z0-9]{3,24}$",
pattern="^[a-z][a-z0-9]{2,23}$",
max_length=24,
min_length=3,
),
Expand All @@ -76,31 +76,26 @@ def _build_arguments_schema(cls, *args, **kwargs):
options=["--description"],
arg_group="Properties",
help="Text that describes the purpose of the storage task assignment",
required=True,
)
_args_schema.enabled = AAZBoolArg(
options=["--enabled"],
arg_group="Properties",
help="Whether the storage task assignment is enabled or not",
required=True,
)
_args_schema.execution_context = AAZObjectArg(
options=["--execution-context"],
arg_group="Properties",
help="The storage task assignment execution context",
required=True,
)
_args_schema.report = AAZObjectArg(
options=["--report"],
arg_group="Properties",
help="The storage task assignment report",
required=True,
)
_args_schema.task_id = AAZResourceIdArg(
options=["--task-id"],
arg_group="Properties",
help="Id of the corresponding storage task",
required=True,
)

execution_context = cls._args_schema.execution_context
Expand Down Expand Up @@ -140,13 +135,16 @@ def _build_arguments_schema(cls, *args, **kwargs):
options=["type"],
help="The trigger type of the storage task assignment execution",
required=True,
enum={"OnSchedule": "OnSchedule", "RunOnce": "RunOnce"},
enum={"MockRun": "MockRun", "OnSchedule": "OnSchedule", "RunOnce": "RunOnce"},
)

parameters = cls._args_schema.execution_context.trigger.parameters
parameters.end_by = AAZDateTimeArg(
options=["end-by"],
help="When to end task execution. This is a required field when ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is 'RunOnce'",
fmt=AAZDateTimeFormat(
protocol="iso",
),
)
parameters.interval = AAZIntArg(
options=["interval"],
Expand All @@ -163,10 +161,16 @@ def _build_arguments_schema(cls, *args, **kwargs):
parameters.start_from = AAZDateTimeArg(
options=["start-from"],
help="When to start task execution. This is a required field when ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is 'RunOnce'",
fmt=AAZDateTimeFormat(
protocol="iso",
),
)
parameters.start_on = AAZDateTimeArg(
options=["start-on"],
help="When to start task execution. This is an optional field when ExecutionTrigger.properties.type is 'RunOnce'; this property should not be present when ExecutionTrigger.properties.type is 'OnSchedule'",
fmt=AAZDateTimeFormat(
protocol="iso",
),
)

report = cls._args_schema.report
Expand Down Expand Up @@ -234,7 +238,7 @@ def method(self):

@property
def error_format(self):
return "MgmtErrorFormat"
return "ODataV4Format"

@property
def url_parameters(self):
Expand Down Expand Up @@ -262,7 +266,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-01-01",
"api-version", "2025-08-01",
required=True,
),
}
Expand All @@ -287,7 +291,7 @@ def content(self):
typ=AAZObjectType,
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True}})
_builder.set_prop("properties", AAZObjectType)

properties = _builder.get(".properties")
if properties is not None:
Expand Down Expand Up @@ -358,8 +362,10 @@ def _build_schema_on_200_201(cls):
_schema_on_200_201.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.properties = AAZObjectType(
flags={"required": True},
_schema_on_200_201.properties = AAZObjectType()
_schema_on_200_201.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200_201.type = AAZStrType(
flags={"read_only": True},
Expand Down Expand Up @@ -495,6 +501,26 @@ def _build_schema_on_200_201(cls):
flags={"read_only": True},
)

system_data = cls._schema_on_200_201.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)

return cls._schema_on_200_201


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ class Delete(AAZCommand):
"""

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

Expand Down Expand Up @@ -66,7 +66,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
required=True,
id_part="child_name_1",
fmt=AAZStrArgFormat(
pattern="^[a-z0-9]{3,24}$",
pattern="^[a-z][a-z0-9]{2,23}$",
max_length=24,
min_length=3,
),
Expand Down Expand Up @@ -98,7 +98,7 @@ def __call__(self, *args, **kwargs):
session,
self.on_200_201,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [204]:
Expand All @@ -107,7 +107,7 @@ def __call__(self, *args, **kwargs):
session,
self.on_204,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200, 201]:
Expand All @@ -116,7 +116,7 @@ def __call__(self, *args, **kwargs):
session,
self.on_200_201,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)

Expand All @@ -135,7 +135,7 @@ def method(self):

@property
def error_format(self):
return "MgmtErrorFormat"
return "ODataV4Format"

@property
def url_parameters(self):
Expand Down Expand Up @@ -163,7 +163,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-01-01",
"api-version", "2025-08-01",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class List(AAZCommand):
"""

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

Expand Down Expand Up @@ -106,7 +106,7 @@ def method(self):

@property
def error_format(self):
return "MgmtErrorFormat"
return "ODataV4Format"

@property
def url_parameters(self):
Expand All @@ -130,10 +130,10 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"$maxpagesize", self.ctx.args.maxpagesize,
"$top", self.ctx.args.maxpagesize,
),
**self.serialize_query_param(
"api-version", "2024-01-01",
"api-version", "2025-08-01",
required=True,
),
}
Expand Down Expand Up @@ -168,7 +168,6 @@ def _build_schema_on_200(cls):
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
flags={"read_only": True},
)
_schema_on_200.value = AAZListType(
flags={"read_only": True},
Expand All @@ -184,8 +183,10 @@ def _build_schema_on_200(cls):
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"required": True},
_element.properties = AAZObjectType()
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.type = AAZStrType(
flags={"read_only": True},
Expand Down Expand Up @@ -321,6 +322,26 @@ def _build_schema_on_200(cls):
flags={"read_only": True},
)

system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)

return cls._schema_on_200


Expand Down
Loading
Loading