UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

113 lines (112 loc) 4.24 kB
import * as pulumi from "@pulumi/pulumi"; /** * Resource for managing an AWS Resource Groups Resource. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.ec2.DedicatedHost("example", { * instanceFamily: "t3", * availabilityZone: "us-east-1a", * hostRecovery: "off", * autoPlacement: "on", * }); * const exampleGroup = new aws.resourcegroups.Group("example", {name: "example"}); * const exampleResource = new aws.resourcegroups.Resource("example", { * groupArn: exampleGroup.arn, * resourceArn: example.arn, * }); * ``` * * ## Import * * Using `pulumi import`, import an AWS Resource Groups Resource using `group_arn` and `resource_arn`, separated by a comma (`,`). For example: * * ```sh * $ pulumi import aws:resourcegroups/resource:Resource example arn:aws:resource-groups:us-west-2:012345678901:group/example,arn:aws:lambda:us-west-2:012345678901:function:example * ``` */ export declare class Resource extends pulumi.CustomResource { /** * Get an existing Resource 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?: ResourceState, opts?: pulumi.CustomResourceOptions): Resource; /** * Returns true if the given object is an instance of Resource. 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 Resource; /** * Name or ARN of the resource group to add resources to. */ readonly groupArn: 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>; /** * ARN of the resource to be added to the group. */ readonly resourceArn: pulumi.Output<string>; /** * The resource type of a resource, such as `AWS::EC2::Instance`. */ readonly resourceType: pulumi.Output<string>; /** * Create a Resource 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: ResourceArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Resource resources. */ export interface ResourceState { /** * Name or ARN of the resource group to add resources to. */ groupArn?: 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>; /** * ARN of the resource to be added to the group. */ resourceArn?: pulumi.Input<string>; /** * The resource type of a resource, such as `AWS::EC2::Instance`. */ resourceType?: pulumi.Input<string>; } /** * The set of arguments for constructing a Resource resource. */ export interface ResourceArgs { /** * Name or ARN of the resource group to add resources to. */ groupArn: 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>; /** * ARN of the resource to be added to the group. */ resourceArn: pulumi.Input<string>; }