azureblog.co.uk
← cd ~/roles
// roles/azure · databases

PostgreSQL Flexible Server Long Term Retention Backup RoleAzure built-in role

Role to allow backup vault to access PostgreSQL Flexible Server Resource APIs for Long Term Retention Backup.

Role IDc088a766-074b-43ba-90d4-1fb21feae531
CategoryDatabases
Actions14
Data actions0

What it can do

PermissionWhat it allows
Microsoft.DBforPostgreSQL/flexibleServers/ltrBackup/actionStart LTR backup operation for a server
Microsoft.DBforPostgreSQL/flexibleServers/ltrBackupAccess/actionStart LTR backup access operation for a server
Microsoft.DBforPostgreSQL/flexibleServers/ltrBackupOperations/readReturns the PostgreSQL server long term backup operation tracking by backup name.
Microsoft.DBforPostgreSQL/flexibleServers/ltrBackupPreCheck/actionStart LTR backup pre-check operation for a server
Microsoft.DBforPostgreSQL/flexibleServers/ltrPreBackup/actionChecks if a server is ready for a long term backup
Microsoft.DBforPostgreSQL/flexibleServers/ltrRestoreFinalize/actionStart LTR restore finalize operation for a server
Microsoft.DBforPostgreSQL/flexibleServers/ltrRestoreInitialize/actionStart LTR restore initialize operation for a server
Microsoft.DBforPostgreSQL/flexibleServers/ltrRestorePreCheck/actionStart LTR restore pre-check operation for a server
Microsoft.DBforPostgreSQL/flexibleServers/readReturn the list of servers or gets the properties for the specified server.
Microsoft.DBforPostgreSQL/flexibleServers/startLtrBackup/actionStart long term backup for a server
Microsoft.DBforPostgreSQL/locations/azureAsyncOperation/readReturn PostgreSQL Server Operation Results
Microsoft.DBforPostgreSQL/locations/operationResults/readReturn ResourceGroup based PostgreSQL Server Operation Results
Microsoft.Resources/subscriptions/readGets the list of subscriptions.
Microsoft.Resources/subscriptions/resourceGroups/readGets or lists resource groups.

Assign it

Scope it as tightly as you can: a resource or resource group rather than the whole subscription.

azure cli
az role assignment create \
  --assignee "jane.doe@contoso.com" \
  --role "PostgreSQL Flexible Server Long Term Retention Backup Role" \
  --scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
powershell3 lines
New-AzRoleAssignment -SignInName "jane.doe@contoso.com" `
  -RoleDefinitionName "PostgreSQL Flexible Server Long Term Retention Backup Role" `
  -Scope "/subscriptions/<subscription id>/resourceGroups/<resource group>"
bicep7 lines
resource assignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
  name: guid(resourceGroup().id, principalId, 'c088a766-074b-43ba-90d4-1fb21feae531')
  properties: {
    roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'c088a766-074b-43ba-90d4-1fb21feae531')
    principalId: principalId
  }
}

Who already has it?

kql · azure resource graph
authorizationresources
| where type == "microsoft.authorization/roleassignments"
| where tostring(properties.roleDefinitionId) endswith "c088a766-074b-43ba-90d4-1fb21feae531"
| project principalId = tostring(properties.principalId), principalType = tostring(properties.principalType), scope = tostring(properties.scope)

Other databases roles

Find the smallest role for a task →