Ensure you have a contributor access over resource guard before doing unlock.
Fetch and pass the cross tenant authorization token in case the resource guard is present in a different tenant.
The first command fetches the resource guard mapping between backup vault and the resource guard.
The second command fetches the operation requests corresponding to all critical operations protected by resource guard.
The third command fetch the operation request corresponding to the operation we want to unlock.
The fourth command fetches the access token corresponding to resource guard tenant.
The fifth command fetches the backup instance we want to stop protection.
The sixth command unlocks the delete backup operation which is protected by the resource guard.
Ensure to have contributor access over resource guard before unlock.
Finally, we remove the backup instance for which we want to disable protection.
Example 2: Unlock delete backup instance operation with short hand
This example is faster way (short hand) for Example 1.
In this example we show that by just passing the DeleteBackupInstance to ResourceGuardOperationRequest we can perform unlock.
we pass the instance ARM Id as the resource to be deleted.
Pass access token in case of cross tenant resource guard.
Example 3: Unlock disable MUA operation with short hand
This example is faster way (short hand) for Example 1.
In this example we show that by just passing the DisableMUA to ResourceGuardOperationRequest we can perform unlock.
we pass the resource guard mapping ARM Id as the resource to be deleted, this will disable MUA on the backup vault.
Pass access token in case of cross tenant resource guard.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter to authorize operations protected by cross tenant resource guard.
Use command (Get-AzAccessToken -TenantId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -AsSecureString").Token to fetch authorization token for different tenant.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.