@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
150 lines (149 loc) • 5.3 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Resource for managing an AWS OpenSearch Serverless Lifecycle Policy. See AWS documentation for [lifecycle policies](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-lifecycle.html).
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.opensearch.ServerlessLifecyclePolicy("example", {
* name: "example",
* type: "retention",
* policy: JSON.stringify({
* Rules: [
* {
* ResourceType: "index",
* Resource: ["index/autoparts-inventory/*"],
* MinIndexRetention: "81d",
* },
* {
* ResourceType: "index",
* Resource: ["index/sales/orders*"],
* NoMinIndexRetention: true,
* },
* ],
* }),
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import OpenSearch Serverless Lifecycle Policy using the `name` and `type` arguments separated by a slash (`/`). For example:
*
* ```sh
* $ pulumi import aws:opensearch/serverlessLifecyclePolicy:ServerlessLifecyclePolicy example example/retention
* ```
*/
export declare class ServerlessLifecyclePolicy extends pulumi.CustomResource {
/**
* Get an existing ServerlessLifecyclePolicy 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?: ServerlessLifecyclePolicyState, opts?: pulumi.CustomResourceOptions): ServerlessLifecyclePolicy;
/**
* Returns true if the given object is an instance of ServerlessLifecyclePolicy. 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 ServerlessLifecyclePolicy;
/**
* Description of the policy.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Name of the policy.
*/
readonly name: pulumi.Output<string>;
/**
* JSON policy document to use as the content for the new policy.
*/
readonly policy: pulumi.Output<string>;
/**
* Version of the policy.
*/
readonly policyVersion: pulumi.Output<string>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
readonly region: pulumi.Output<string>;
/**
* Type of lifecycle policy. Must be `retention`.
*
* The following arguments are optional:
*/
readonly type: pulumi.Output<string>;
/**
* Create a ServerlessLifecyclePolicy 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: ServerlessLifecyclePolicyArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering ServerlessLifecyclePolicy resources.
*/
export interface ServerlessLifecyclePolicyState {
/**
* Description of the policy.
*/
description?: pulumi.Input<string>;
/**
* Name of the policy.
*/
name?: pulumi.Input<string>;
/**
* JSON policy document to use as the content for the new policy.
*/
policy?: pulumi.Input<string>;
/**
* Version of the policy.
*/
policyVersion?: pulumi.Input<string>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* Type of lifecycle policy. Must be `retention`.
*
* The following arguments are optional:
*/
type?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a ServerlessLifecyclePolicy resource.
*/
export interface ServerlessLifecyclePolicyArgs {
/**
* Description of the policy.
*/
description?: pulumi.Input<string>;
/**
* Name of the policy.
*/
name?: pulumi.Input<string>;
/**
* JSON policy document to use as the content for the new policy.
*/
policy: pulumi.Input<string>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* Type of lifecycle policy. Must be `retention`.
*
* The following arguments are optional:
*/
type: pulumi.Input<string>;
}