Skip to content

Commit f47f7b4

Browse files
authored
[App Service] Fix #29512: az webapp config backup update: Fix str object has no attribute name (#30986)
1 parent de25f96 commit f47f7b4

4 files changed

Lines changed: 1177 additions & 3 deletions

File tree

src/azure-cli/azure/cli/command_modules/appservice/_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ def load_arguments(self, _):
631631
with self.argument_context('webapp config backup') as c:
632632
c.argument('storage_account_url', help='URL with SAS token to the blob storage container',
633633
options_list=['--container-url'])
634-
c.argument('webapp_name', help='The name of the web app',
634+
c.argument('webapp_name', help='The name of the web app', options_list=['--webapp-name', '-n'],
635635
local_context_attribute=LocalContextAttribute(name='web_name', actions=[LocalContextAction.GET]))
636636
c.argument('db_name', help='Name of the database in the backup', arg_group='Database')
637637
c.argument('db_connection_string', help='Connection string for the database in the backup',

src/azure-cli/azure/cli/command_modules/appservice/custom.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3311,10 +3311,10 @@ def update_backup_schedule(cmd, resource_group_name, webapp_name, storage_accoun
33113311

33123312
db_setting = _create_db_setting(cmd, db_name, db_type=db_type, db_connection_string=db_connection_string)
33133313

3314-
backup_schedule = BackupSchedule(frequency_interval=frequency_num, frequency_unit=frequency_unit.name,
3314+
backup_schedule = BackupSchedule(frequency_interval=frequency_num, frequency_unit=frequency_unit,
33153315
keep_at_least_one_backup=keep_at_least_one_backup,
33163316
retention_period_in_days=retention_period_in_days)
3317-
backup_request = BackupRequest(backup_request_name=backup_name, backup_schedule=backup_schedule,
3317+
backup_request = BackupRequest(backup_name=backup_name, backup_schedule=backup_schedule,
33183318
enabled=True, storage_account_url=storage_account_url,
33193319
databases=db_setting)
33203320
return _generic_site_operation(cmd.cli_ctx, resource_group_name, webapp_name, 'update_backup_configuration',

0 commit comments

Comments
 (0)