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
11 changes: 11 additions & 0 deletions src/azure-cli/azure/cli/command_modules/storage/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -1703,6 +1703,17 @@ def load_arguments(self, _): # pylint: disable=too-many-locals, too-many-statem
c.ignore('enable_nfs_v3_root_squash')
c.ignore('enable_nfs_v3_all_squash')

with self.argument_context('storage container-rm update', resource_type=ResourceType.MGMT_STORAGE) as c:
c.argument('default_encryption_scope', options_list=['--default-encryption-scope', '-d'],
arg_group='Encryption Policy', min_api='2019-06-01',
help='Default the container to use specified encryption scope for all writes.',
deprecate_info=c.deprecate(hide=True, target='--default-encryption-scope', expiration="2.54"))
c.argument('deny_encryption_scope_override',
options_list=['--deny-encryption-scope-override', '--deny-override'],
arg_type=get_three_state_flag(), arg_group='Encryption Policy', min_api='2019-06-01',
help='Block override of encryption scope from the container default.',
deprecate_info=c.deprecate(hide=True, target='--deny-encryption-scope-override', expiration="2.54"))

with self.argument_context('storage container-rm list', resource_type=ResourceType.MGMT_STORAGE) as c:
c.argument('account_name', storage_account_type, id_part=None)
c.argument('include_deleted', action='store_true',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,16 @@ def update_container_rm(cmd, instance, metadata=None, public_access=None,
default_encryption_scope=None, deny_encryption_scope_override=None,
enable_nfs_v3_root_squash=None, enable_nfs_v3_all_squash=None):
BlobContainer = cmd.get_models('BlobContainer', resource_type=ResourceType.MGMT_STORAGE)

# # TODO will remove warning as well as the parameters in November 2023
if default_encryption_scope is not None:
logger.warning('--default-encryption-scope cannot be updated after container is created. '
'When it is provided, it will be ignored by the server. '
'This parameter will be removed for the update command in November 2023.')
if deny_encryption_scope_override is not None:
logger.warning('--deny-encryption-scope-override cannot be updated after container is created. '
'When it is provided, it will be ignored by the server. '
'This parameter will be removed for the update command in November 2023.')
blob_container = BlobContainer(
metadata=metadata if metadata is not None else instance.metadata,
public_access=public_access if public_access is not None else instance.public_access,
Expand Down