UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

176 lines (175 loc) 7.65 kB
import * as cdk from "../../core"; import * as constructs from "constructs"; import * as cfn_parse from "../../core/lib/helpers-internal"; /** * The `AWS::DSQL::Cluster` resource specifies an cluster. You can use this resource to create, modify, and manage clusters. * * This resource supports both single-Region clusters and multi-Region clusters through the `MultiRegionProperties` parameter. * * > Creating multi-Region clusters requires additional IAM permissions beyond those needed for single-Region clusters. > - The witness Region specified in `multiRegionProperties.witnessRegion` cannot be the same as the cluster's Region. * * *Required permissions* * * - **dsql:CreateCluster** - Required to create a cluster. * * Resources: `arn:aws:dsql:region:account-id:cluster/*` * - **dsql:TagResource** - Permission to add tags to a resource. * * Resources: `arn:aws:dsql:region:account-id:cluster/*` * - **dsql:PutMultiRegionProperties** - Permission to configure multi-Region properties for a cluster. * * Resources: `arn:aws:dsql:region:account-id:cluster/*` * - **dsql:AddPeerCluster** - When specifying `multiRegionProperties.clusters` , permission to add peer clusters. * * Resources: * * - Local cluster: `arn:aws:dsql:region:account-id:cluster/*` * - Each peer cluster: exact ARN of each specified peer cluster * - **dsql:PutWitnessRegion** - When specifying `multiRegionProperties.witnessRegion` , permission to set a witness Region. This permission is checked both in the cluster Region and in the witness Region. * * Resources: `arn:aws:dsql:region:account-id:cluster/*` * * Condition Keys: `dsql:WitnessRegion` (matching the specified witness region) * * @cloudformationResource AWS::DSQL::Cluster * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dsql-cluster.html */ export declare class CfnCluster extends cdk.CfnResource implements cdk.IInspectable, cdk.ITaggableV2 { /** * The CloudFormation resource type name for this resource class. */ static readonly CFN_RESOURCE_TYPE_NAME: string; /** * Build a CfnCluster from CloudFormation properties * * A factory method that creates a new instance of this class from an object * containing the CloudFormation properties of this resource. * Used in the @aws-cdk/cloudformation-include module. * * @internal */ static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnCluster; /** * The timestamp when the cluster was created, in ISO 8601 format. * * @cloudformationAttribute CreationTime */ readonly attrCreationTime: string; /** * The unique identifier assigned to the cluster upon creation. * * @cloudformationAttribute Identifier */ readonly attrIdentifier: string; /** * The Amazon Resource Name (ARN) of the cluster. Used for IAM permissions and resource identification. * * @cloudformationAttribute ResourceArn */ readonly attrResourceArn: string; /** * The current status of the cluster. Possible values include: CREATING, ACTIVE, DELETING, FAILED. * * The cluster can have two additional status values when working with multi-Region clusters: * * `PENDING_SETUP` —Indicates the cluster is being configured * * `PENDING_DELETE` —Indicates the cluster is being deleted * * *Note:* These status values only appear for multi-Region cluster operations. * * @cloudformationAttribute Status */ readonly attrStatus: string; /** * The VPC Endpoint Service name for the cluster. This can be used to create a VPC endpoint to connect to the cluster from within a VPC. * * @cloudformationAttribute VpcEndpointServiceName */ readonly attrVpcEndpointServiceName: string; /** * Tag Manager which manages the tags for this resource */ readonly cdkTagManager: cdk.TagManager; /** * Whether deletion protection is enabled on this cluster. */ deletionProtectionEnabled?: boolean | cdk.IResolvable; /** * Defines the structure for multi-Region cluster configurations, containing the witness Region and peered cluster settings. */ multiRegionProperties?: cdk.IResolvable | CfnCluster.MultiRegionPropertiesProperty; /** * A map of key and value pairs this cluster is tagged with. */ tags?: Array<cdk.CfnTag>; /** * @param scope Scope in which this resource is defined * @param id Construct identifier for this resource (unique in its scope) * @param props Resource properties */ constructor(scope: constructs.Construct, id: string, props?: CfnClusterProps); protected get cfnProperties(): Record<string, any>; /** * Examines the CloudFormation resource and discloses attributes * * @param inspector tree inspector to collect and process attributes */ inspect(inspector: cdk.TreeInspector): void; protected renderProperties(props: Record<string, any>): Record<string, any>; } export declare namespace CfnCluster { /** * Defines the structure for multi-Region cluster configurations, containing the witness Region and peered cluster settings. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dsql-cluster-multiregionproperties.html */ interface MultiRegionPropertiesProperty { /** * The set of peered clusters that form the multi-Region cluster configuration. * * Each peered cluster represents a database instance in a different Region. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dsql-cluster-multiregionproperties.html#cfn-dsql-cluster-multiregionproperties-clusters */ readonly clusters?: Array<string>; /** * The Region that serves as the witness Region for a multi-Region cluster. * * The witness Region helps maintain cluster consistency and quorum. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dsql-cluster-multiregionproperties.html#cfn-dsql-cluster-multiregionproperties-witnessregion */ readonly witnessRegion?: string; } } /** * Properties for defining a `CfnCluster` * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dsql-cluster.html */ export interface CfnClusterProps { /** * Whether deletion protection is enabled on this cluster. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dsql-cluster.html#cfn-dsql-cluster-deletionprotectionenabled */ readonly deletionProtectionEnabled?: boolean | cdk.IResolvable; /** * Defines the structure for multi-Region cluster configurations, containing the witness Region and peered cluster settings. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dsql-cluster.html#cfn-dsql-cluster-multiregionproperties */ readonly multiRegionProperties?: cdk.IResolvable | CfnCluster.MultiRegionPropertiesProperty; /** * A map of key and value pairs this cluster is tagged with. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dsql-cluster.html#cfn-dsql-cluster-tags */ readonly tags?: Array<cdk.CfnTag>; }