UNPKG

@pulumi/aws

Version:

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

144 lines (143 loc) 6.97 kB
import * as pulumi from "@pulumi/pulumi"; /** * Manages a Cloud Control API Resource. The configuration and lifecycle handling of these resources is proxied through Cloud Control API handlers to the backend service. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.cloudcontrol.Resource("example", { * typeName: "AWS::ECS::Cluster", * desiredState: JSON.stringify({ * ClusterName: "example", * Tags: [{ * Key: "CostCenter", * Value: "IT", * }], * }), * }); * ``` */ 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; /** * JSON string matching the CloudFormation resource type schema with desired configuration. */ readonly desiredState: pulumi.Output<string>; /** * JSON string matching the CloudFormation resource type schema with current configuration. Underlying attributes can be referenced via the `jsondecode()` function, for example, `jsondecode(data.aws_cloudcontrolapi_resource.example.properties)["example"]`. */ readonly properties: 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>; /** * Amazon Resource Name (ARN) of the IAM Role to assume for operations. */ readonly roleArn: pulumi.Output<string | undefined>; /** * JSON string of the CloudFormation resource type schema which is used for plan time validation where possible. Automatically fetched if not provided. In large scale environments with multiple resources using the same `typeName`, it is recommended to fetch the schema once via the `aws.cloudformation.CloudFormationType` data source and use this argument to reduce `DescribeType` API operation throttling. This value is marked sensitive only to prevent large plan differences from showing. */ readonly schema: pulumi.Output<string>; /** * CloudFormation resource type name. For example, `AWS::EC2::VPC`. * * The following arguments are optional: */ readonly typeName: pulumi.Output<string>; /** * Identifier of the CloudFormation resource type version. */ readonly typeVersionId: pulumi.Output<string | undefined>; /** * 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 { /** * JSON string matching the CloudFormation resource type schema with desired configuration. */ desiredState?: pulumi.Input<string>; /** * JSON string matching the CloudFormation resource type schema with current configuration. Underlying attributes can be referenced via the `jsondecode()` function, for example, `jsondecode(data.aws_cloudcontrolapi_resource.example.properties)["example"]`. */ properties?: 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>; /** * Amazon Resource Name (ARN) of the IAM Role to assume for operations. */ roleArn?: pulumi.Input<string>; /** * JSON string of the CloudFormation resource type schema which is used for plan time validation where possible. Automatically fetched if not provided. In large scale environments with multiple resources using the same `typeName`, it is recommended to fetch the schema once via the `aws.cloudformation.CloudFormationType` data source and use this argument to reduce `DescribeType` API operation throttling. This value is marked sensitive only to prevent large plan differences from showing. */ schema?: pulumi.Input<string>; /** * CloudFormation resource type name. For example, `AWS::EC2::VPC`. * * The following arguments are optional: */ typeName?: pulumi.Input<string>; /** * Identifier of the CloudFormation resource type version. */ typeVersionId?: pulumi.Input<string>; } /** * The set of arguments for constructing a Resource resource. */ export interface ResourceArgs { /** * JSON string matching the CloudFormation resource type schema with desired configuration. */ desiredState: 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>; /** * Amazon Resource Name (ARN) of the IAM Role to assume for operations. */ roleArn?: pulumi.Input<string>; /** * JSON string of the CloudFormation resource type schema which is used for plan time validation where possible. Automatically fetched if not provided. In large scale environments with multiple resources using the same `typeName`, it is recommended to fetch the schema once via the `aws.cloudformation.CloudFormationType` data source and use this argument to reduce `DescribeType` API operation throttling. This value is marked sensitive only to prevent large plan differences from showing. */ schema?: pulumi.Input<string>; /** * CloudFormation resource type name. For example, `AWS::EC2::VPC`. * * The following arguments are optional: */ typeName: pulumi.Input<string>; /** * Identifier of the CloudFormation resource type version. */ typeVersionId?: pulumi.Input<string>; }