diff --git a/src/azure-cli/azure/cli/command_modules/appconfig/_format.py b/src/azure-cli/azure/cli/command_modules/appconfig/_format.py index 730fabe9478..d91ff2c090c 100644 --- a/src/azure-cli/azure/cli/command_modules/appconfig/_format.py +++ b/src/azure-cli/azure/cli/command_modules/appconfig/_format.py @@ -152,7 +152,6 @@ def _snapshot_output_format_group(item): ('RETENTION PERIOD', _get_value_by_names(item, ['retentionPeriod', 'retention_period'])), ('SIZE', _get_value(item, 'size')), ('STATUS', _get_value(item, 'status')), - ('STATUS CODE', _get_value_by_names(item, ['statusCode', 'status_code'])), ('ITEMS COUNT', _get_value_by_names(item, ['itemsCount', 'items_count'])), ('TAGS', _get_value(item, 'tags')), ]) diff --git a/src/azure-cli/azure/cli/command_modules/appconfig/_params.py b/src/azure-cli/azure/cli/command_modules/appconfig/_params.py index 33dcb1ee9ae..85dd897d07d 100644 --- a/src/azure-cli/azure/cli/command_modules/appconfig/_params.py +++ b/src/azure-cli/azure/cli/command_modules/appconfig/_params.py @@ -47,7 +47,7 @@ def load_arguments(self, _): nargs='+', help='Customize output fields for Snapshots', validator=validate_snapshot_query_fields, - arg_type=get_enum_type(['name', 'etag', 'status_code', 'retention_period', 'filters', 'status', 'created', 'expires', 'size', 'items_count', 'composition_type', 'tags']) + arg_type=get_enum_type(['name', 'etag', 'retention_period', 'filters', 'status', 'created', 'expires', 'size', 'items_count', 'composition_type', 'tags']) ) filter_parameters_arg_type = CLIArgumentType( validator=validate_filter_parameters, diff --git a/src/azure-cli/azure/cli/command_modules/appconfig/_snapshotmodels.py b/src/azure-cli/azure/cli/command_modules/appconfig/_snapshotmodels.py index 679be34a838..cea24d0ef2f 100644 --- a/src/azure-cli/azure/cli/command_modules/appconfig/_snapshotmodels.py +++ b/src/azure-cli/azure/cli/command_modules/appconfig/_snapshotmodels.py @@ -21,10 +21,9 @@ class SnapshotQueryFields(Enum): SIZE = 0x0040 ITEMS_COUNT = 0x0080 TAGS = 0x0100 - STATUS_CODE = 0x0200 + ETAG = 0x0200 RETENTION_PERIOD = 0x0400 - ETAG = 0x0800 - ALL = NAME | STATUS | FILTERS | COMPOSITION_TYPE | CREATED | EXPIRES | SIZE | ITEMS_COUNT | TAGS | RETENTION_PERIOD | ETAG | STATUS_CODE + ALL = NAME | STATUS | FILTERS | COMPOSITION_TYPE | CREATED | EXPIRES | SIZE | ITEMS_COUNT | TAGS | ETAG | RETENTION_PERIOD class Snapshot: @@ -53,8 +52,6 @@ class Snapshot: Dictionary of tags of the snapshot. :ivar int retention_period: Number of seconds for which an archived snapshot will be kept before being deleted. - :ivar int status_code: - The status code returned during the snapshot creation process. ''' def __init__(self, @@ -62,7 +59,6 @@ def __init__(self, status, filters, etag=None, - status_code=None, composition_type=None, created=None, expires=None, @@ -75,7 +71,6 @@ def __init__(self, self.name = name self.status = status self.filters = filters - self.status_code = status_code self.etag = etag self.composition_type = composition_type self.created = created.isoformat() if isinstance(created, datetime) else str(created) @@ -96,8 +91,7 @@ def __str__(self): "\nSize: " + str(self.size) + \ "\nItem count: " + str(self.items_count) + \ "\nTags: " + (str(self.tags) if self.tags else '{}') + \ - "\nRetention Period: " + str(self.retention_period) + \ - "\nStatus Code: " + str(self.status_code) + "\nRetention Period: " + str(self.retention_period) @classmethod def from_json(cls, data_dict): @@ -112,8 +106,7 @@ def from_json(cls, data_dict): size=data_dict.get("size", None), items_count=data_dict.get("items_count", None), tags=data_dict.get("tags", None), - retention_period=data_dict.get("retention_period", None), - status_code=data_dict.get("status_code", None) + retention_period=data_dict.get("retention_period", None) )