alicloud.hbr.Policy
Explore with Pulumi AI
Provides a HBR Policy resource.
For information about HBR Policy and how to use it, see What is Policy.
NOTE: Available since v1.221.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as random from "@pulumi/random";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = new random.index.Integer("default", {
max: 99999,
min: 10000,
});
const defaultyk84Hc = new alicloud.hbr.Vault("defaultyk84Hc", {
vaultType: "STANDARD",
vaultName: `example-value-${_default.result}`,
});
const defaultoqWvHQ = new alicloud.hbr.Policy("defaultoqWvHQ", {
policyName: `example-value-${_default.result}`,
rules: [{
ruleType: "BACKUP",
backupType: "COMPLETE",
schedule: "I|1631685600|P1D",
retention: 7,
archiveDays: 0,
vaultId: defaultyk84Hc.id,
}],
policyDescription: "policy example",
});
import pulumi
import pulumi_alicloud as alicloud
import pulumi_random as random
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = random.index.Integer("default",
max=99999,
min=10000)
defaultyk84_hc = alicloud.hbr.Vault("defaultyk84Hc",
vault_type="STANDARD",
vault_name=f"example-value-{default['result']}")
defaultoq_wv_hq = alicloud.hbr.Policy("defaultoqWvHQ",
policy_name=f"example-value-{default['result']}",
rules=[alicloud.hbr.PolicyRuleArgs(
rule_type="BACKUP",
backup_type="COMPLETE",
schedule="I|1631685600|P1D",
retention=7,
archive_days=0,
vault_id=defaultyk84_hc.id,
)],
policy_description="policy example")
package main
import (
"fmt"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/hbr"
"github.com/pulumi/pulumi-random/sdk/v4/go/random"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
Max: 99999,
Min: 10000,
})
if err != nil {
return err
}
defaultyk84Hc, err := hbr.NewVault(ctx, "defaultyk84Hc", &hbr.VaultArgs{
VaultType: pulumi.String("STANDARD"),
VaultName: pulumi.String(fmt.Sprintf("example-value-%v", _default.Result)),
})
if err != nil {
return err
}
_, err = hbr.NewPolicy(ctx, "defaultoqWvHQ", &hbr.PolicyArgs{
PolicyName: pulumi.String(fmt.Sprintf("example-value-%v", _default.Result)),
Rules: hbr.PolicyRuleArray{
&hbr.PolicyRuleArgs{
RuleType: pulumi.String("BACKUP"),
BackupType: pulumi.String("COMPLETE"),
Schedule: pulumi.String("I|1631685600|P1D"),
Retention: pulumi.Int(7),
ArchiveDays: pulumi.Int(0),
VaultId: defaultyk84Hc.ID(),
},
},
PolicyDescription: pulumi.String("policy example"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Random = Pulumi.Random;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = new Random.Index.Integer("default", new()
{
Max = 99999,
Min = 10000,
});
var defaultyk84Hc = new AliCloud.Hbr.Vault("defaultyk84Hc", new()
{
VaultType = "STANDARD",
VaultName = $"example-value-{@default.Result}",
});
var defaultoqWvHQ = new AliCloud.Hbr.Policy("defaultoqWvHQ", new()
{
PolicyName = $"example-value-{@default.Result}",
Rules = new[]
{
new AliCloud.Hbr.Inputs.PolicyRuleArgs
{
RuleType = "BACKUP",
BackupType = "COMPLETE",
Schedule = "I|1631685600|P1D",
Retention = 7,
ArchiveDays = 0,
VaultId = defaultyk84Hc.Id,
},
},
PolicyDescription = "policy example",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.random.integer;
import com.pulumi.random.IntegerArgs;
import com.pulumi.alicloud.hbr.Vault;
import com.pulumi.alicloud.hbr.VaultArgs;
import com.pulumi.alicloud.hbr.Policy;
import com.pulumi.alicloud.hbr.PolicyArgs;
import com.pulumi.alicloud.hbr.inputs.PolicyRuleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
var default_ = new Integer("default", IntegerArgs.builder()
.max(99999)
.min(10000)
.build());
var defaultyk84Hc = new Vault("defaultyk84Hc", VaultArgs.builder()
.vaultType("STANDARD")
.vaultName(String.format("example-value-%s", default_.result()))
.build());
var defaultoqWvHQ = new Policy("defaultoqWvHQ", PolicyArgs.builder()
.policyName(String.format("example-value-%s", default_.result()))
.rules(PolicyRuleArgs.builder()
.ruleType("BACKUP")
.backupType("COMPLETE")
.schedule("I|1631685600|P1D")
.retention("7")
.archiveDays("0")
.vaultId(defaultyk84Hc.id())
.build())
.policyDescription("policy example")
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
default:
type: random:integer
properties:
max: 99999
min: 10000
defaultyk84Hc:
type: alicloud:hbr:Vault
properties:
vaultType: STANDARD
vaultName: example-value-${default.result}
defaultoqWvHQ:
type: alicloud:hbr:Policy
properties:
policyName: example-value-${default.result}
rules:
- ruleType: BACKUP
backupType: COMPLETE
schedule: I|1631685600|P1D
retention: '7'
archiveDays: '0'
vaultId: ${defaultyk84Hc.id}
policyDescription: policy example
Create Policy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Policy(name: string, args?: PolicyArgs, opts?: CustomResourceOptions);
@overload
def Policy(resource_name: str,
args: Optional[PolicyArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Policy(resource_name: str,
opts: Optional[ResourceOptions] = None,
policy_description: Optional[str] = None,
policy_name: Optional[str] = None,
rules: Optional[Sequence[PolicyRuleArgs]] = None)
func NewPolicy(ctx *Context, name string, args *PolicyArgs, opts ...ResourceOption) (*Policy, error)
public Policy(string name, PolicyArgs? args = null, CustomResourceOptions? opts = null)
public Policy(String name, PolicyArgs args)
public Policy(String name, PolicyArgs args, CustomResourceOptions options)
type: alicloud:hbr:Policy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args PolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args PolicyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args PolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PolicyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var policyResource = new AliCloud.Hbr.Policy("policyResource", new()
{
PolicyDescription = "string",
PolicyName = "string",
Rules = new[]
{
new AliCloud.Hbr.Inputs.PolicyRuleArgs
{
RuleType = "string",
ArchiveDays = 0,
BackupType = "string",
KeepLatestSnapshots = 0,
ReplicationRegionId = "string",
Retention = 0,
RetentionRules = new[]
{
new AliCloud.Hbr.Inputs.PolicyRuleRetentionRuleArgs
{
AdvancedRetentionType = "string",
Retention = 0,
},
},
RuleId = "string",
Schedule = "string",
VaultId = "string",
},
},
});
example, err := hbr.NewPolicy(ctx, "policyResource", &hbr.PolicyArgs{
PolicyDescription: pulumi.String("string"),
PolicyName: pulumi.String("string"),
Rules: hbr.PolicyRuleArray{
&hbr.PolicyRuleArgs{
RuleType: pulumi.String("string"),
ArchiveDays: pulumi.Int(0),
BackupType: pulumi.String("string"),
KeepLatestSnapshots: pulumi.Int(0),
ReplicationRegionId: pulumi.String("string"),
Retention: pulumi.Int(0),
RetentionRules: hbr.PolicyRuleRetentionRuleArray{
&hbr.PolicyRuleRetentionRuleArgs{
AdvancedRetentionType: pulumi.String("string"),
Retention: pulumi.Int(0),
},
},
RuleId: pulumi.String("string"),
Schedule: pulumi.String("string"),
VaultId: pulumi.String("string"),
},
},
})
var policyResource = new Policy("policyResource", PolicyArgs.builder()
.policyDescription("string")
.policyName("string")
.rules(PolicyRuleArgs.builder()
.ruleType("string")
.archiveDays(0)
.backupType("string")
.keepLatestSnapshots(0)
.replicationRegionId("string")
.retention(0)
.retentionRules(PolicyRuleRetentionRuleArgs.builder()
.advancedRetentionType("string")
.retention(0)
.build())
.ruleId("string")
.schedule("string")
.vaultId("string")
.build())
.build());
policy_resource = alicloud.hbr.Policy("policyResource",
policy_description="string",
policy_name="string",
rules=[alicloud.hbr.PolicyRuleArgs(
rule_type="string",
archive_days=0,
backup_type="string",
keep_latest_snapshots=0,
replication_region_id="string",
retention=0,
retention_rules=[alicloud.hbr.PolicyRuleRetentionRuleArgs(
advanced_retention_type="string",
retention=0,
)],
rule_id="string",
schedule="string",
vault_id="string",
)])
const policyResource = new alicloud.hbr.Policy("policyResource", {
policyDescription: "string",
policyName: "string",
rules: [{
ruleType: "string",
archiveDays: 0,
backupType: "string",
keepLatestSnapshots: 0,
replicationRegionId: "string",
retention: 0,
retentionRules: [{
advancedRetentionType: "string",
retention: 0,
}],
ruleId: "string",
schedule: "string",
vaultId: "string",
}],
});
type: alicloud:hbr:Policy
properties:
policyDescription: string
policyName: string
rules:
- archiveDays: 0
backupType: string
keepLatestSnapshots: 0
replicationRegionId: string
retention: 0
retentionRules:
- advancedRetentionType: string
retention: 0
ruleId: string
ruleType: string
schedule: string
vaultId: string
Policy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Policy resource accepts the following input properties:
- Policy
Description string - The policy description.
- Policy
Name string - Policy Name.
- Rules
List<Pulumi.
Ali Cloud. Hbr. Inputs. Policy Rule> - A list of policy rules. See
rules
below.
- Policy
Description string - The policy description.
- Policy
Name string - Policy Name.
- Rules
[]Policy
Rule Args - A list of policy rules. See
rules
below.
- policy
Description String - The policy description.
- policy
Name String - Policy Name.
- rules
List<Policy
Rule> - A list of policy rules. See
rules
below.
- policy
Description string - The policy description.
- policy
Name string - Policy Name.
- rules
Policy
Rule[] - A list of policy rules. See
rules
below.
- policy_
description str - The policy description.
- policy_
name str - Policy Name.
- rules
Sequence[Policy
Rule Args] - A list of policy rules. See
rules
below.
- policy
Description String - The policy description.
- policy
Name String - Policy Name.
- rules List<Property Map>
- A list of policy rules. See
rules
below.
Outputs
All input properties are implicitly available as output properties. Additionally, the Policy resource produces the following output properties:
- Create
Time string - Policy creation time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Create
Time string - Policy creation time.
- Id string
- The provider-assigned unique ID for this managed resource.
- create
Time String - Policy creation time.
- id String
- The provider-assigned unique ID for this managed resource.
- create
Time string - Policy creation time.
- id string
- The provider-assigned unique ID for this managed resource.
- create_
time str - Policy creation time.
- id str
- The provider-assigned unique ID for this managed resource.
- create
Time String - Policy creation time.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Policy Resource
Get an existing Policy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: PolicyState, opts?: CustomResourceOptions): Policy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
create_time: Optional[str] = None,
policy_description: Optional[str] = None,
policy_name: Optional[str] = None,
rules: Optional[Sequence[PolicyRuleArgs]] = None) -> Policy
func GetPolicy(ctx *Context, name string, id IDInput, state *PolicyState, opts ...ResourceOption) (*Policy, error)
public static Policy Get(string name, Input<string> id, PolicyState? state, CustomResourceOptions? opts = null)
public static Policy get(String name, Output<String> id, PolicyState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Create
Time string - Policy creation time.
- Policy
Description string - The policy description.
- Policy
Name string - Policy Name.
- Rules
List<Pulumi.
Ali Cloud. Hbr. Inputs. Policy Rule> - A list of policy rules. See
rules
below.
- Create
Time string - Policy creation time.
- Policy
Description string - The policy description.
- Policy
Name string - Policy Name.
- Rules
[]Policy
Rule Args - A list of policy rules. See
rules
below.
- create
Time String - Policy creation time.
- policy
Description String - The policy description.
- policy
Name String - Policy Name.
- rules
List<Policy
Rule> - A list of policy rules. See
rules
below.
- create
Time string - Policy creation time.
- policy
Description string - The policy description.
- policy
Name string - Policy Name.
- rules
Policy
Rule[] - A list of policy rules. See
rules
below.
- create_
time str - Policy creation time.
- policy_
description str - The policy description.
- policy_
name str - Policy Name.
- rules
Sequence[Policy
Rule Args] - A list of policy rules. See
rules
below.
- create
Time String - Policy creation time.
- policy
Description String - The policy description.
- policy
Name String - Policy Name.
- rules List<Property Map>
- A list of policy rules. See
rules
below.
Supporting Types
PolicyRule, PolicyRuleArgs
- Rule
Type string - Rule Type.
- Archive
Days int - This parameter is required only when the value of RuleType is **TRANSITION. The minimum value is 30, and the Retention-ArchiveDays needs to be greater than or equal to 60.
- Backup
Type string - This parameter is required only when the RuleType value is **BACKUP. Backup Type.
- Keep
Latest intSnapshots - This parameter is required only when RuleType is set to BACKUP.
- Replication
Region stringId - Only when the RuleType value is.
- Retention int
- Retention time, in days.
- Retention
Rules List<Pulumi.Ali Cloud. Hbr. Inputs. Policy Rule Retention Rule> - This parameter is required only when the value of RuleType is TRANSITION. See
retention_rules
below. - Rule
Id string - Rule ID.
- Schedule string
- This parameter is required only if you set the RuleType parameter to BACKUP. This parameter specifies the backup schedule settings. Format:
I|{startTime}|{interval}
. The system runs the first backup job at a point in time that is specified in the {startTime} parameter and the subsequent backup jobs at an interval that is specified in the {interval} parameter. The system does not run a backup job before the specified point in time. Each backup job, except the first one, starts only after the previous backup job is complete. For example,I|1631685600|P1D
specifies that the system runs the first backup job at 14:00:00 on September 15, 2021 and the subsequent backup jobs once a day. * startTime: the time at which the system starts to run a backup job. The time must follow the UNIX time format. Unit: seconds. * interval: the interval at which the system runs a backup job. The interval must follow the ISO 8601 standard. For example, PT1H specifies an interval of one hour. P1D specifies an interval of one day. - Vault
Id string - Vault ID.
- Rule
Type string - Rule Type.
- Archive
Days int - This parameter is required only when the value of RuleType is **TRANSITION. The minimum value is 30, and the Retention-ArchiveDays needs to be greater than or equal to 60.
- Backup
Type string - This parameter is required only when the RuleType value is **BACKUP. Backup Type.
- Keep
Latest intSnapshots - This parameter is required only when RuleType is set to BACKUP.
- Replication
Region stringId - Only when the RuleType value is.
- Retention int
- Retention time, in days.
- Retention
Rules []PolicyRule Retention Rule - This parameter is required only when the value of RuleType is TRANSITION. See
retention_rules
below. - Rule
Id string - Rule ID.
- Schedule string
- This parameter is required only if you set the RuleType parameter to BACKUP. This parameter specifies the backup schedule settings. Format:
I|{startTime}|{interval}
. The system runs the first backup job at a point in time that is specified in the {startTime} parameter and the subsequent backup jobs at an interval that is specified in the {interval} parameter. The system does not run a backup job before the specified point in time. Each backup job, except the first one, starts only after the previous backup job is complete. For example,I|1631685600|P1D
specifies that the system runs the first backup job at 14:00:00 on September 15, 2021 and the subsequent backup jobs once a day. * startTime: the time at which the system starts to run a backup job. The time must follow the UNIX time format. Unit: seconds. * interval: the interval at which the system runs a backup job. The interval must follow the ISO 8601 standard. For example, PT1H specifies an interval of one hour. P1D specifies an interval of one day. - Vault
Id string - Vault ID.
- rule
Type String - Rule Type.
- archive
Days Integer - This parameter is required only when the value of RuleType is **TRANSITION. The minimum value is 30, and the Retention-ArchiveDays needs to be greater than or equal to 60.
- backup
Type String - This parameter is required only when the RuleType value is **BACKUP. Backup Type.
- keep
Latest IntegerSnapshots - This parameter is required only when RuleType is set to BACKUP.
- replication
Region StringId - Only when the RuleType value is.
- retention Integer
- Retention time, in days.
- retention
Rules List<PolicyRule Retention Rule> - This parameter is required only when the value of RuleType is TRANSITION. See
retention_rules
below. - rule
Id String - Rule ID.
- schedule String
- This parameter is required only if you set the RuleType parameter to BACKUP. This parameter specifies the backup schedule settings. Format:
I|{startTime}|{interval}
. The system runs the first backup job at a point in time that is specified in the {startTime} parameter and the subsequent backup jobs at an interval that is specified in the {interval} parameter. The system does not run a backup job before the specified point in time. Each backup job, except the first one, starts only after the previous backup job is complete. For example,I|1631685600|P1D
specifies that the system runs the first backup job at 14:00:00 on September 15, 2021 and the subsequent backup jobs once a day. * startTime: the time at which the system starts to run a backup job. The time must follow the UNIX time format. Unit: seconds. * interval: the interval at which the system runs a backup job. The interval must follow the ISO 8601 standard. For example, PT1H specifies an interval of one hour. P1D specifies an interval of one day. - vault
Id String - Vault ID.
- rule
Type string - Rule Type.
- archive
Days number - This parameter is required only when the value of RuleType is **TRANSITION. The minimum value is 30, and the Retention-ArchiveDays needs to be greater than or equal to 60.
- backup
Type string - This parameter is required only when the RuleType value is **BACKUP. Backup Type.
- keep
Latest numberSnapshots - This parameter is required only when RuleType is set to BACKUP.
- replication
Region stringId - Only when the RuleType value is.
- retention number
- Retention time, in days.
- retention
Rules PolicyRule Retention Rule[] - This parameter is required only when the value of RuleType is TRANSITION. See
retention_rules
below. - rule
Id string - Rule ID.
- schedule string
- This parameter is required only if you set the RuleType parameter to BACKUP. This parameter specifies the backup schedule settings. Format:
I|{startTime}|{interval}
. The system runs the first backup job at a point in time that is specified in the {startTime} parameter and the subsequent backup jobs at an interval that is specified in the {interval} parameter. The system does not run a backup job before the specified point in time. Each backup job, except the first one, starts only after the previous backup job is complete. For example,I|1631685600|P1D
specifies that the system runs the first backup job at 14:00:00 on September 15, 2021 and the subsequent backup jobs once a day. * startTime: the time at which the system starts to run a backup job. The time must follow the UNIX time format. Unit: seconds. * interval: the interval at which the system runs a backup job. The interval must follow the ISO 8601 standard. For example, PT1H specifies an interval of one hour. P1D specifies an interval of one day. - vault
Id string - Vault ID.
- rule_
type str - Rule Type.
- archive_
days int - This parameter is required only when the value of RuleType is **TRANSITION. The minimum value is 30, and the Retention-ArchiveDays needs to be greater than or equal to 60.
- backup_
type str - This parameter is required only when the RuleType value is **BACKUP. Backup Type.
- keep_
latest_ intsnapshots - This parameter is required only when RuleType is set to BACKUP.
- replication_
region_ strid - Only when the RuleType value is.
- retention int
- Retention time, in days.
- retention_
rules Sequence[PolicyRule Retention Rule] - This parameter is required only when the value of RuleType is TRANSITION. See
retention_rules
below. - rule_
id str - Rule ID.
- schedule str
- This parameter is required only if you set the RuleType parameter to BACKUP. This parameter specifies the backup schedule settings. Format:
I|{startTime}|{interval}
. The system runs the first backup job at a point in time that is specified in the {startTime} parameter and the subsequent backup jobs at an interval that is specified in the {interval} parameter. The system does not run a backup job before the specified point in time. Each backup job, except the first one, starts only after the previous backup job is complete. For example,I|1631685600|P1D
specifies that the system runs the first backup job at 14:00:00 on September 15, 2021 and the subsequent backup jobs once a day. * startTime: the time at which the system starts to run a backup job. The time must follow the UNIX time format. Unit: seconds. * interval: the interval at which the system runs a backup job. The interval must follow the ISO 8601 standard. For example, PT1H specifies an interval of one hour. P1D specifies an interval of one day. - vault_
id str - Vault ID.
- rule
Type String - Rule Type.
- archive
Days Number - This parameter is required only when the value of RuleType is **TRANSITION. The minimum value is 30, and the Retention-ArchiveDays needs to be greater than or equal to 60.
- backup
Type String - This parameter is required only when the RuleType value is **BACKUP. Backup Type.
- keep
Latest NumberSnapshots - This parameter is required only when RuleType is set to BACKUP.
- replication
Region StringId - Only when the RuleType value is.
- retention Number
- Retention time, in days.
- retention
Rules List<Property Map> - This parameter is required only when the value of RuleType is TRANSITION. See
retention_rules
below. - rule
Id String - Rule ID.
- schedule String
- This parameter is required only if you set the RuleType parameter to BACKUP. This parameter specifies the backup schedule settings. Format:
I|{startTime}|{interval}
. The system runs the first backup job at a point in time that is specified in the {startTime} parameter and the subsequent backup jobs at an interval that is specified in the {interval} parameter. The system does not run a backup job before the specified point in time. Each backup job, except the first one, starts only after the previous backup job is complete. For example,I|1631685600|P1D
specifies that the system runs the first backup job at 14:00:00 on September 15, 2021 and the subsequent backup jobs once a day. * startTime: the time at which the system starts to run a backup job. The time must follow the UNIX time format. Unit: seconds. * interval: the interval at which the system runs a backup job. The interval must follow the ISO 8601 standard. For example, PT1H specifies an interval of one hour. P1D specifies an interval of one day. - vault
Id String - Vault ID.
PolicyRuleRetentionRule, PolicyRuleRetentionRuleArgs
- Advanced
Retention stringType - Retention int
- Advanced
Retention stringType - Retention int
- advanced
Retention StringType - retention Integer
- advanced
Retention stringType - retention number
- advanced_
retention_ strtype - retention int
- advanced
Retention StringType - retention Number
Import
HBR Policy can be imported using the id, e.g.
$ pulumi import alicloud:hbr/policy:Policy example <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.