@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
113 lines (112 loc) • 3.97 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Provides a resource to manage ebs auto snapshot policy attachment
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as volcengine from "@pulumi/volcengine";
* import * as volcengine from "@volcengine/pulumi";
*
* const fooZones = volcengine.ecs.getZones({});
* const fooVolume = new volcengine.ebs.Volume("fooVolume", {
* volumeName: "acc-test-volume",
* volumeType: "ESSD_PL0",
* description: "acc-test",
* kind: "data",
* size: 500,
* zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
* volumeChargeType: "PostPaid",
* projectName: "default",
* });
* const fooAutoSnapshotPolicy = new volcengine.ebs.AutoSnapshotPolicy("fooAutoSnapshotPolicy", {
* autoSnapshotPolicyName: "acc-test-auto-snapshot-policy",
* timePoints: [
* "1",
* "5",
* "9",
* ],
* retentionDays: -1,
* repeatWeekdays: [
* "2",
* "6",
* ],
* projectName: "default",
* tags: [{
* key: "k1",
* value: "v1",
* }],
* });
* const fooAutoSnapshotPolicyAttachment = new volcengine.ebs.AutoSnapshotPolicyAttachment("fooAutoSnapshotPolicyAttachment", {
* autoSnapshotPolicyId: fooAutoSnapshotPolicy.id,
* volumeId: fooVolume.id,
* });
* ```
*
* ## Import
*
* EbsAutoSnapshotPolicyAttachment can be imported using the auto_snapshot_policy_id:volume_id, e.g.
*
* ```sh
* $ pulumi import volcengine:ebs/autoSnapshotPolicyAttachment:AutoSnapshotPolicyAttachment default resource_id
* ```
*/
export declare class AutoSnapshotPolicyAttachment extends pulumi.CustomResource {
/**
* Get an existing AutoSnapshotPolicyAttachment resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AutoSnapshotPolicyAttachmentState, opts?: pulumi.CustomResourceOptions): AutoSnapshotPolicyAttachment;
/**
* Returns true if the given object is an instance of AutoSnapshotPolicyAttachment. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is AutoSnapshotPolicyAttachment;
/**
* The id of the auto snapshot policy.
*/
readonly autoSnapshotPolicyId: pulumi.Output<string>;
/**
* The id of the volume.
*/
readonly volumeId: pulumi.Output<string>;
/**
* Create a AutoSnapshotPolicyAttachment resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: AutoSnapshotPolicyAttachmentArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering AutoSnapshotPolicyAttachment resources.
*/
export interface AutoSnapshotPolicyAttachmentState {
/**
* The id of the auto snapshot policy.
*/
autoSnapshotPolicyId?: pulumi.Input<string>;
/**
* The id of the volume.
*/
volumeId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a AutoSnapshotPolicyAttachment resource.
*/
export interface AutoSnapshotPolicyAttachmentArgs {
/**
* The id of the auto snapshot policy.
*/
autoSnapshotPolicyId: pulumi.Input<string>;
/**
* The id of the volume.
*/
volumeId: pulumi.Input<string>;
}