All Products
Search
Document Center

Hybrid Backup Recovery:GenerateRamPolicy

Last Updated:Nov 14, 2022

Generates a RAM policy.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RequireBasePolicybooleanNo

Specifies whether to generate the policy based on an existing instance-specific rule. Valid values:

  • true
  • false
true
ActionTypestringYes

The type of the policy that you want to generate. Valid values:

  • custom: custom policy
  • system: system policy
system
VaultIdstringYes

The ID of the backup vault.

v-0007al3m******7ao
ResourceGroupIdstringNo

The ID of the resource group.

rg-*********************

Response parameters

ParameterTypeDescriptionExample
object
Codestring

The HTTP status code. The status code 200 indicates that the call is successful.

200
Messagestring

The message that is returned. If the call is successful, "successful" is returned. If the call fails, an error message is returned.

successful
RequestIdstring

The ID of the request.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E
PolicyDocumentstring

The content of the policy.

{ "Version": "1", "Statement": [ { "Effect": "Deny", "Action": [ "hbr:CreateRestore", "hbr:CreateRestoreJob", "hbr:CreateHanaRestore", "hbr:CreateUniRestorePlan", "hbr:CreateSqlServerRestore" ], "Resource": [ "acs:hbr:*:1178******531:vault/v-000******blx06", "acs:hbr:*:1178******531:vault/v-000******blx06/client/*" ] } ] }
Successboolean

Indicates whether the call is successful.

  • true: The call is successful.
  • false: The call fails.
true

Example

Request example

http(s)://[Endpoint]/?Action=GenerateRamPolicy
&RequireBasePolicy=true
&ActionType=system
&VaultId=v-0007al3m******7ao
&ResourceGroupId=rg-*********************
&Common request parameters

Normal return example

JSONFormat

{
  "Code": "200",
  "Message": "successful",
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "PolicyDocument": "{     \"Version\": \"1\",     \"Statement\": [         {             \"Effect\": \"Deny\",             \"Action\": [                 \"hbr:CreateRestore\",                 \"hbr:CreateRestoreJob\",                 \"hbr:CreateHanaRestore\",                 \"hbr:CreateUniRestorePlan\",                 \"hbr:CreateSqlServerRestore\"             ],             \"Resource\": [                 \"acs:hbr:*:1178******531:vault/v-000******blx06\",                 \"acs:hbr:*:1178******531:vault/v-000******blx06/client/*\"             ]         }     ] }",
  "Success": true
}

Error codes

For a list of error codes, visit the API error center.