import * as pulumi from "@pulumi/pulumi"; /** * Resource for managing an AWS OpenSearch Ingestion Resource Policy. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const current = aws.getCallerIdentity({}); * const examplePipeline = new aws.opensearchingest.Pipeline("example", { * pipelineName: "example", * pipelineConfigurationBody: current.then(current => `version: \"2\" * example-pipeline: * source: * http: * path: \"/example\" * sink: * - s3: * aws: * sts_role_arn: \"arn:aws:iam::${current.accountId}:role/Example\" * region: \"us-east-1\" * bucket: \"example\" * threshold: * event_collect_timeout: \"60s\" * codec: * ndjson: * `), * maxUnits: 1, * minUnits: 1, * }); * const example = new aws.opensearchingest.ResourcePolicy("example", { * resourceArn: examplePipeline.pipelineArn, * policy: pulumi.jsonStringify({ * Version: "2012-10-17", * Statement: [{ * Effect: "Allow", * Principal: { * AWS: current.then(current => `arn:aws:iam::${current.accountId}:root`), * }, * Action: "osis:CreatePipelineEndpoint", * Resource: examplePipeline.pipelineArn, * }], * }), * }); * ``` * * ## Import * * ### Identity Schema * * #### Required * * * `resourceArn` (String) ARN of the resource the policy is attached to. * * Using `pulumi import`, import OpenSearch Ingestion Resource Policy using the `resourceArn`. For example: * * ```sh * $ pulumi import aws:opensearchingest/resourcePolicy:ResourcePolicy example arn:aws:osis:us-east-1:123456789012:pipeline/example * ``` */ export declare class ResourcePolicy extends pulumi.CustomResource { /** * Get an existing ResourcePolicy 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, state?: ResourcePolicyState, opts?: pulumi.CustomResourceOptions): ResourcePolicy; /** * Returns true if the given object is an instance of ResourcePolicy. 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 ResourcePolicy; /** * JSON-formatted policy to attach to the resource. */ readonly policy: pulumi.Output; /** * 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; /** * ARN of the resource to attach the policy to. * * The following arguments are optional: */ readonly resourceArn: pulumi.Output; /** * Create a ResourcePolicy 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: ResourcePolicyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ResourcePolicy resources. */ export interface ResourcePolicyState { /** * JSON-formatted policy to attach to the resource. */ policy?: pulumi.Input; /** * 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; /** * ARN of the resource to attach the policy to. * * The following arguments are optional: */ resourceArn?: pulumi.Input; } /** * The set of arguments for constructing a ResourcePolicy resource. */ export interface ResourcePolicyArgs { /** * JSON-formatted policy to attach to the resource. */ policy: pulumi.Input; /** * 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; /** * ARN of the resource to attach the policy to. * * The following arguments are optional: */ resourceArn: pulumi.Input; } //# sourceMappingURL=resourcePolicy.d.ts.map