Documentation ¶
Index ¶
- func CfnDBClusterParameterGroup_CFN_RESOURCE_TYPE_NAME() *string
- func CfnDBClusterParameterGroup_IsCfnElement(x interface{}) *bool
- func CfnDBClusterParameterGroup_IsCfnResource(x interface{}) *bool
- func CfnDBClusterParameterGroup_IsConstruct(x interface{}) *bool
- func CfnDBCluster_CFN_RESOURCE_TYPE_NAME() *string
- func CfnDBCluster_IsCfnElement(x interface{}) *bool
- func CfnDBCluster_IsCfnResource(x interface{}) *bool
- func CfnDBCluster_IsConstruct(x interface{}) *bool
- func CfnDBInstance_CFN_RESOURCE_TYPE_NAME() *string
- func CfnDBInstance_IsCfnElement(x interface{}) *bool
- func CfnDBInstance_IsCfnResource(x interface{}) *bool
- func CfnDBInstance_IsConstruct(x interface{}) *bool
- func CfnDBSubnetGroup_CFN_RESOURCE_TYPE_NAME() *string
- func CfnDBSubnetGroup_IsCfnElement(x interface{}) *bool
- func CfnDBSubnetGroup_IsCfnResource(x interface{}) *bool
- func CfnDBSubnetGroup_IsConstruct(x interface{}) *bool
- func ClusterParameterGroup_IsConstruct(x interface{}) *bool
- func ClusterParameterGroup_IsOwnedResource(construct constructs.IConstruct) *bool
- func ClusterParameterGroup_IsResource(construct constructs.IConstruct) *bool
- func DatabaseCluster_DEFAULT_NUM_INSTANCES() *float64
- func DatabaseCluster_DEFAULT_PORT() *float64
- func DatabaseCluster_IsConstruct(x interface{}) *bool
- func DatabaseCluster_IsOwnedResource(construct constructs.IConstruct) *bool
- func DatabaseCluster_IsResource(construct constructs.IConstruct) *bool
- func DatabaseInstance_IsConstruct(x interface{}) *bool
- func DatabaseInstance_IsOwnedResource(construct constructs.IConstruct) *bool
- func DatabaseInstance_IsResource(construct constructs.IConstruct) *bool
- func DatabaseSecret_FromSecretAttributes(scope constructs.Construct, id *string, ...) awssecretsmanager.ISecret
- func DatabaseSecret_FromSecretCompleteArn(scope constructs.Construct, id *string, secretCompleteArn *string) awssecretsmanager.ISecret
- func DatabaseSecret_FromSecretNameV2(scope constructs.Construct, id *string, secretName *string) awssecretsmanager.ISecret
- func DatabaseSecret_FromSecretPartialArn(scope constructs.Construct, id *string, secretPartialArn *string) awssecretsmanager.ISecret
- func DatabaseSecret_IsConstruct(x interface{}) *bool
- func DatabaseSecret_IsOwnedResource(construct constructs.IConstruct) *bool
- func DatabaseSecret_IsResource(construct constructs.IConstruct) *bool
- func DatabaseSecret_IsSecret(x interface{}) *bool
- func NewCfnDBClusterParameterGroup_Override(c CfnDBClusterParameterGroup, scope constructs.Construct, id *string, ...)
- func NewCfnDBCluster_Override(c CfnDBCluster, scope constructs.Construct, id *string, ...)
- func NewCfnDBInstance_Override(c CfnDBInstance, scope constructs.Construct, id *string, ...)
- func NewCfnDBSubnetGroup_Override(c CfnDBSubnetGroup, scope constructs.Construct, id *string, ...)
- func NewClusterParameterGroup_Override(c ClusterParameterGroup, scope constructs.Construct, id *string, ...)
- func NewDatabaseCluster_Override(d DatabaseCluster, scope constructs.Construct, id *string, ...)
- func NewDatabaseInstance_Override(d DatabaseInstance, scope constructs.Construct, id *string, ...)
- func NewDatabaseSecret_Override(d DatabaseSecret, scope constructs.Construct, id *string, ...)
- func NewEndpoint_Override(e Endpoint, address *string, port *float64)
- type BackupProps
- type CfnDBCluster
- type CfnDBClusterParameterGroup
- type CfnDBClusterParameterGroupProps
- type CfnDBClusterProps
- type CfnDBInstance
- type CfnDBInstanceProps
- type CfnDBSubnetGroup
- type CfnDBSubnetGroupProps
- type ClusterParameterGroup
- type ClusterParameterGroupProps
- type DatabaseCluster
- type DatabaseClusterAttributes
- type DatabaseClusterProps
- type DatabaseInstance
- type DatabaseInstanceAttributes
- type DatabaseInstanceProps
- type DatabaseSecret
- type DatabaseSecretProps
- type Endpoint
- type IClusterParameterGroup
- type IDatabaseCluster
- type IDatabaseInstance
- type Login
- type RotationMultiUserOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CfnDBClusterParameterGroup_CFN_RESOURCE_TYPE_NAME ¶
func CfnDBClusterParameterGroup_CFN_RESOURCE_TYPE_NAME() *string
func CfnDBClusterParameterGroup_IsCfnElement ¶
func CfnDBClusterParameterGroup_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element.
func CfnDBClusterParameterGroup_IsCfnResource ¶
func CfnDBClusterParameterGroup_IsCfnResource(x interface{}) *bool
Check whether the given object is a CfnResource.
func CfnDBClusterParameterGroup_IsConstruct ¶
func CfnDBClusterParameterGroup_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func CfnDBCluster_CFN_RESOURCE_TYPE_NAME ¶
func CfnDBCluster_CFN_RESOURCE_TYPE_NAME() *string
func CfnDBCluster_IsCfnElement ¶
func CfnDBCluster_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element.
func CfnDBCluster_IsCfnResource ¶
func CfnDBCluster_IsCfnResource(x interface{}) *bool
Check whether the given object is a CfnResource.
func CfnDBCluster_IsConstruct ¶
func CfnDBCluster_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func CfnDBInstance_CFN_RESOURCE_TYPE_NAME ¶
func CfnDBInstance_CFN_RESOURCE_TYPE_NAME() *string
func CfnDBInstance_IsCfnElement ¶
func CfnDBInstance_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element.
func CfnDBInstance_IsCfnResource ¶
func CfnDBInstance_IsCfnResource(x interface{}) *bool
Check whether the given object is a CfnResource.
func CfnDBInstance_IsConstruct ¶
func CfnDBInstance_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func CfnDBSubnetGroup_CFN_RESOURCE_TYPE_NAME ¶
func CfnDBSubnetGroup_CFN_RESOURCE_TYPE_NAME() *string
func CfnDBSubnetGroup_IsCfnElement ¶
func CfnDBSubnetGroup_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element.
func CfnDBSubnetGroup_IsCfnResource ¶
func CfnDBSubnetGroup_IsCfnResource(x interface{}) *bool
Check whether the given object is a CfnResource.
func CfnDBSubnetGroup_IsConstruct ¶
func CfnDBSubnetGroup_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func ClusterParameterGroup_IsConstruct ¶
func ClusterParameterGroup_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func ClusterParameterGroup_IsOwnedResource ¶ added in v2.32.0
func ClusterParameterGroup_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
func ClusterParameterGroup_IsResource ¶
func ClusterParameterGroup_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
func DatabaseCluster_DEFAULT_NUM_INSTANCES ¶
func DatabaseCluster_DEFAULT_NUM_INSTANCES() *float64
func DatabaseCluster_DEFAULT_PORT ¶
func DatabaseCluster_DEFAULT_PORT() *float64
func DatabaseCluster_IsConstruct ¶
func DatabaseCluster_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func DatabaseCluster_IsOwnedResource ¶ added in v2.32.0
func DatabaseCluster_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
func DatabaseCluster_IsResource ¶
func DatabaseCluster_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
func DatabaseInstance_IsConstruct ¶
func DatabaseInstance_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func DatabaseInstance_IsOwnedResource ¶ added in v2.32.0
func DatabaseInstance_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
func DatabaseInstance_IsResource ¶
func DatabaseInstance_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
func DatabaseSecret_FromSecretAttributes ¶
func DatabaseSecret_FromSecretAttributes(scope constructs.Construct, id *string, attrs *awssecretsmanager.SecretAttributes) awssecretsmanager.ISecret
Import an existing secret into the Stack.
func DatabaseSecret_FromSecretCompleteArn ¶
func DatabaseSecret_FromSecretCompleteArn(scope constructs.Construct, id *string, secretCompleteArn *string) awssecretsmanager.ISecret
Imports a secret by complete ARN.
The complete ARN is the ARN with the Secrets Manager-supplied suffix.
func DatabaseSecret_FromSecretNameV2 ¶
func DatabaseSecret_FromSecretNameV2(scope constructs.Construct, id *string, secretName *string) awssecretsmanager.ISecret
Imports a secret by secret name.
A secret with this name must exist in the same account & region. Replaces the deprecated `fromSecretName`. Please note this method returns ISecret that only contains partial ARN and could lead to AccessDeniedException when you pass the partial ARN to CLI or SDK to get the secret value. If your secret name ends with a hyphen and 6 characters, you should always use fromSecretCompleteArn() to avoid potential AccessDeniedException. See: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen
func DatabaseSecret_FromSecretPartialArn ¶
func DatabaseSecret_FromSecretPartialArn(scope constructs.Construct, id *string, secretPartialArn *string) awssecretsmanager.ISecret
Imports a secret by partial ARN.
The partial ARN is the ARN without the Secrets Manager-supplied suffix.
func DatabaseSecret_IsConstruct ¶
func DatabaseSecret_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func DatabaseSecret_IsOwnedResource ¶ added in v2.32.0
func DatabaseSecret_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
func DatabaseSecret_IsResource ¶
func DatabaseSecret_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
func DatabaseSecret_IsSecret ¶ added in v2.29.0
func DatabaseSecret_IsSecret(x interface{}) *bool
Return whether the given object is a Secret.
func NewCfnDBClusterParameterGroup_Override ¶
func NewCfnDBClusterParameterGroup_Override(c CfnDBClusterParameterGroup, scope constructs.Construct, id *string, props *CfnDBClusterParameterGroupProps)
func NewCfnDBCluster_Override ¶
func NewCfnDBCluster_Override(c CfnDBCluster, scope constructs.Construct, id *string, props *CfnDBClusterProps)
func NewCfnDBInstance_Override ¶
func NewCfnDBInstance_Override(c CfnDBInstance, scope constructs.Construct, id *string, props *CfnDBInstanceProps)
func NewCfnDBSubnetGroup_Override ¶
func NewCfnDBSubnetGroup_Override(c CfnDBSubnetGroup, scope constructs.Construct, id *string, props *CfnDBSubnetGroupProps)
func NewClusterParameterGroup_Override ¶
func NewClusterParameterGroup_Override(c ClusterParameterGroup, scope constructs.Construct, id *string, props *ClusterParameterGroupProps)
func NewDatabaseCluster_Override ¶
func NewDatabaseCluster_Override(d DatabaseCluster, scope constructs.Construct, id *string, props *DatabaseClusterProps)
func NewDatabaseInstance_Override ¶
func NewDatabaseInstance_Override(d DatabaseInstance, scope constructs.Construct, id *string, props *DatabaseInstanceProps)
func NewDatabaseSecret_Override ¶
func NewDatabaseSecret_Override(d DatabaseSecret, scope constructs.Construct, id *string, props *DatabaseSecretProps)
func NewEndpoint_Override ¶
Constructs an Endpoint instance.
Types ¶
type BackupProps ¶
type BackupProps struct { // How many days to retain the backup. Retention awscdk.Duration `field:"required" json:"retention" yaml:"retention"` // A daily time range in 24-hours UTC format in which backups preferably execute. // // Must be at least 30 minutes long. // // Example: '01:00-02:00'. // Default: - a 30-minute window selected at random from an 8-hour block of // time for each AWS Region. To see the time blocks available, see // https://docs.aws.amazon.com/documentdb/latest/developerguide/backup-restore.db-cluster-snapshots.html#backup-restore.backup-window // PreferredWindow *string `field:"optional" json:"preferredWindow" yaml:"preferredWindow"` }
Backup configuration for DocumentDB databases.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import cdk "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" backupProps := &BackupProps{ Retention: cdk.Duration_Minutes(jsii.Number(30)), // the properties below are optional PreferredWindow: jsii.String("preferredWindow"), }
Default: - The retention period for automated backups is 1 day. The preferred backup window will be a 30-minute window selected at random from an 8-hour block of time for each AWS Region.
type CfnDBCluster ¶
type CfnDBCluster interface { awscdk.CfnResource awscdk.IInspectable awscdk.ITaggable // The resource id for the cluster; // // for example: `cluster-ABCD1234EFGH5678IJKL90MNOP` . The cluster ID uniquely identifies the cluster and is used in things like IAM authentication policies. AttrClusterResourceId() *string // The connection endpoint for the cluster, such as `sample-cluster.cluster-cozrlsfrcjoc.us-east-1.docdb.amazonaws.com` . AttrEndpoint() *string AttrId() *string // The port number on which the cluster accepts connections. // // For example: `27017` . AttrPort() *string // The reader endpoint for the cluster. // // For example: `sample-cluster.cluster-ro-cozrlsfrcjoc.us-east-1.docdb.amazonaws.com` . AttrReadEndpoint() *string // A list of Amazon EC2 Availability Zones that instances in the cluster can be created in. AvailabilityZones() *[]*string SetAvailabilityZones(val *[]*string) // The number of days for which automated backups are retained. // // You must specify a minimum value of 1. BackupRetentionPeriod() *float64 SetBackupRetentionPeriod(val *float64) // Options for this resource, such as condition, update policy etc. CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} // AWS resource type. CfnResourceType() *string CopyTagsToSnapshot() interface{} SetCopyTagsToSnapshot(val interface{}) // Returns: the stack trace of the point where this Resource was created from, sourced // from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most // node +internal+ entries filtered. CreationStack() *[]*string // The cluster identifier. // // This parameter is stored as a lowercase string. DbClusterIdentifier() *string SetDbClusterIdentifier(val *string) // The name of the cluster parameter group to associate with this cluster. DbClusterParameterGroupName() *string SetDbClusterParameterGroupName(val *string) // A subnet group to associate with this cluster. DbSubnetGroupName() *string SetDbSubnetGroupName(val *string) // Protects clusters from being accidentally deleted. DeletionProtection() interface{} SetDeletionProtection(val interface{}) // The list of log types that need to be enabled for exporting to Amazon CloudWatch Logs. EnableCloudwatchLogsExports() *[]*string SetEnableCloudwatchLogsExports(val *[]*string) // The version number of the database engine to use. EngineVersion() *string SetEngineVersion(val *string) // The AWS KMS key identifier for an encrypted cluster. KmsKeyId() *string SetKmsKeyId(val *string) // The logical ID for this CloudFormation stack element. // // The logical ID of the element // is calculated from the path of the resource node in the construct tree. // // To override this value, use `overrideLogicalId(newLogicalId)`. // // Returns: the logical ID as a stringified token. This value will only get // resolved during synthesis. LogicalId() *string // The name of the master user for the cluster. MasterUsername() *string SetMasterUsername(val *string) // The password for the master database user. MasterUserPassword() *string SetMasterUserPassword(val *string) // The tree node. Node() constructs.Node // Specifies the port that the database engine is listening on. Port() *float64 SetPort(val *float64) // The daily time range during which automated backups are created if automated backups are enabled using the `BackupRetentionPeriod` parameter. PreferredBackupWindow() *string SetPreferredBackupWindow(val *string) // The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC). PreferredMaintenanceWindow() *string SetPreferredMaintenanceWindow(val *string) // Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. // // If, by any chance, the intrinsic reference of a resource is not a string, you could // coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`. Ref() *string // The date and time to restore the cluster to. RestoreToTime() *string SetRestoreToTime(val *string) // The type of restore to be performed. // // You can specify one of the following values:. RestoreType() *string SetRestoreType(val *string) // The identifier for the snapshot or cluster snapshot to restore from. SnapshotIdentifier() *string SetSnapshotIdentifier(val *string) // The identifier of the source cluster from which to restore. SourceDbClusterIdentifier() *string SetSourceDbClusterIdentifier(val *string) // The stack in which this element is defined. // // CfnElements must be defined within a stack scope (directly or indirectly). Stack() awscdk.Stack // Specifies whether the cluster is encrypted. StorageEncrypted() interface{} SetStorageEncrypted(val interface{}) // Tag Manager which manages the tags for this resource. Tags() awscdk.TagManager // The tags to be assigned to the cluster. TagsRaw() *[]*awscdk.CfnTag SetTagsRaw(val *[]*awscdk.CfnTag) // Deprecated. // Deprecated: use `updatedProperties` // // Return properties modified after initiation // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperites() *map[string]interface{} // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperties() *map[string]interface{} // A value that is set to `true` to restore the cluster to the latest restorable backup time, and `false` otherwise. UseLatestRestorableTime() interface{} SetUseLatestRestorableTime(val interface{}) // A list of EC2 VPC security groups to associate with this cluster. VpcSecurityGroupIds() *[]*string SetVpcSecurityGroupIds(val *[]*string) // Syntactic sugar for `addOverride(path, undefined)`. AddDeletionOverride(path *string) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // // This can be used for resources across stacks (or nested stack) boundaries // and the dependency will automatically be transferred to the relevant scope. AddDependency(target awscdk.CfnResource) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // Deprecated: use addDependency. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "Properties." (i.e. `Properties.TopicName`). // // If the override is nested, separate each nested level using a dot (.) in the path parameter. // If there is an array as part of the nesting, specify the index in the path. // // To include a literal `.` in the property name, prefix with a `\`. In most // programming languages you will need to write this as `"\\."` because the // `\` itself will need to be escaped. // // For example, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will not be processed or translated // in any way. Pass raw JSON values in here with the correct capitalization // for CloudFormation. If you pass CDK classes or structs, they will be // rendered with lowercased key names, and CloudFormation will reject the // template. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. AddPropertyOverride(propertyPath *string, value interface{}) // Sets the deletion policy of the resource based on the removal policy specified. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some // cases, a snapshot can be taken of the resource prior to deletion // (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy // can be found in the following link:. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options // ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // Returns a token for an runtime attribute of this resource. // // Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility // in case there is no generated attribute. GetAtt(attributeName *string, typeHint awscdk.ResolutionTypeHint) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Retrieves an array of resources this resource depends on. // // This assembles dependencies on resources across stacks (including nested stacks) // automatically. ObtainDependencies() *[]interface{} // Get a shallow copy of dependencies between this resource and other resources in the same stack. ObtainResourceDependencies() *[]awscdk.CfnResource // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) // Indicates that this resource no longer depends on another resource. // // This can be used for resources across stacks (including nested stacks) // and the dependency will automatically be removed from the relevant scope. RemoveDependency(target awscdk.CfnResource) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Replaces one dependency with another. ReplaceDependency(target awscdk.CfnResource, newTarget awscdk.CfnResource) // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. ShouldSynthesize() *bool // Returns a string representation of this construct. // // Returns: a string representation of this resource. ToString() *string ValidateProperties(_properties interface{}) }
The `AWS::DocDB::DBCluster` Amazon DocumentDB (with MongoDB compatibility) resource describes a DBCluster.
Amazon DocumentDB is a fully managed, MongoDB-compatible document database engine. For more information, see [DBCluster](https://docs.aws.amazon.com/documentdb/latest/developerguide/API_DBCluster.html) in the *Amazon DocumentDB Developer Guide* .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnDBCluster := awscdk.Aws_docdb.NewCfnDBCluster(this, jsii.String("MyCfnDBCluster"), &CfnDBClusterProps{ AvailabilityZones: []*string{ jsii.String("availabilityZones"), }, BackupRetentionPeriod: jsii.Number(123), CopyTagsToSnapshot: jsii.Boolean(false), DbClusterIdentifier: jsii.String("dbClusterIdentifier"), DbClusterParameterGroupName: jsii.String("dbClusterParameterGroupName"), DbSubnetGroupName: jsii.String("dbSubnetGroupName"), DeletionProtection: jsii.Boolean(false), EnableCloudwatchLogsExports: []*string{ jsii.String("enableCloudwatchLogsExports"), }, EngineVersion: jsii.String("engineVersion"), KmsKeyId: jsii.String("kmsKeyId"), MasterUsername: jsii.String("masterUsername"), MasterUserPassword: jsii.String("masterUserPassword"), Port: jsii.Number(123), PreferredBackupWindow: jsii.String("preferredBackupWindow"), PreferredMaintenanceWindow: jsii.String("preferredMaintenanceWindow"), RestoreToTime: jsii.String("restoreToTime"), RestoreType: jsii.String("restoreType"), SnapshotIdentifier: jsii.String("snapshotIdentifier"), SourceDbClusterIdentifier: jsii.String("sourceDbClusterIdentifier"), StorageEncrypted: jsii.Boolean(false), Tags: []cfnTag{ &cfnTag{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, UseLatestRestorableTime: jsii.Boolean(false), VpcSecurityGroupIds: []*string{ jsii.String("vpcSecurityGroupIds"), }, })
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html
func NewCfnDBCluster ¶
func NewCfnDBCluster(scope constructs.Construct, id *string, props *CfnDBClusterProps) CfnDBCluster
type CfnDBClusterParameterGroup ¶
type CfnDBClusterParameterGroup interface { awscdk.CfnResource awscdk.IInspectable awscdk.ITaggable AttrId() *string // Options for this resource, such as condition, update policy etc. CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} // AWS resource type. CfnResourceType() *string // Returns: the stack trace of the point where this Resource was created from, sourced // from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most // node +internal+ entries filtered. CreationStack() *[]*string // The description for the cluster parameter group. Description() *string SetDescription(val *string) // The cluster parameter group family name. Family() *string SetFamily(val *string) // The logical ID for this CloudFormation stack element. // // The logical ID of the element // is calculated from the path of the resource node in the construct tree. // // To override this value, use `overrideLogicalId(newLogicalId)`. // // Returns: the logical ID as a stringified token. This value will only get // resolved during synthesis. LogicalId() *string // The name of the DB cluster parameter group. Name() *string SetName(val *string) // The tree node. Node() constructs.Node // Provides a list of parameters for the cluster parameter group. Parameters() interface{} SetParameters(val interface{}) // Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. // // If, by any chance, the intrinsic reference of a resource is not a string, you could // coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`. Ref() *string // The stack in which this element is defined. // // CfnElements must be defined within a stack scope (directly or indirectly). Stack() awscdk.Stack // Tag Manager which manages the tags for this resource. Tags() awscdk.TagManager // The tags to be assigned to the cluster parameter group. TagsRaw() *[]*awscdk.CfnTag SetTagsRaw(val *[]*awscdk.CfnTag) // Deprecated. // Deprecated: use `updatedProperties` // // Return properties modified after initiation // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperites() *map[string]interface{} // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperties() *map[string]interface{} // Syntactic sugar for `addOverride(path, undefined)`. AddDeletionOverride(path *string) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // // This can be used for resources across stacks (or nested stack) boundaries // and the dependency will automatically be transferred to the relevant scope. AddDependency(target awscdk.CfnResource) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // Deprecated: use addDependency. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "Properties." (i.e. `Properties.TopicName`). // // If the override is nested, separate each nested level using a dot (.) in the path parameter. // If there is an array as part of the nesting, specify the index in the path. // // To include a literal `.` in the property name, prefix with a `\`. In most // programming languages you will need to write this as `"\\."` because the // `\` itself will need to be escaped. // // For example, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will not be processed or translated // in any way. Pass raw JSON values in here with the correct capitalization // for CloudFormation. If you pass CDK classes or structs, they will be // rendered with lowercased key names, and CloudFormation will reject the // template. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. AddPropertyOverride(propertyPath *string, value interface{}) // Sets the deletion policy of the resource based on the removal policy specified. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some // cases, a snapshot can be taken of the resource prior to deletion // (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy // can be found in the following link:. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options // ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // Returns a token for an runtime attribute of this resource. // // Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility // in case there is no generated attribute. GetAtt(attributeName *string, typeHint awscdk.ResolutionTypeHint) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Retrieves an array of resources this resource depends on. // // This assembles dependencies on resources across stacks (including nested stacks) // automatically. ObtainDependencies() *[]interface{} // Get a shallow copy of dependencies between this resource and other resources in the same stack. ObtainResourceDependencies() *[]awscdk.CfnResource // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) // Indicates that this resource no longer depends on another resource. // // This can be used for resources across stacks (including nested stacks) // and the dependency will automatically be removed from the relevant scope. RemoveDependency(target awscdk.CfnResource) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Replaces one dependency with another. ReplaceDependency(target awscdk.CfnResource, newTarget awscdk.CfnResource) // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. ShouldSynthesize() *bool // Returns a string representation of this construct. // // Returns: a string representation of this resource. ToString() *string ValidateProperties(_properties interface{}) }
The `AWS::DocDB::DBClusterParameterGroup` Amazon DocumentDB (with MongoDB compatibility) resource describes a DBClusterParameterGroup.
For more information, see [DBClusterParameterGroup](https://docs.aws.amazon.com/documentdb/latest/developerguide/API_DBClusterParameterGroup.html) in the *Amazon DocumentDB Developer Guide* .
Parameters in a cluster parameter group apply to all of the instances in a cluster.
A cluster parameter group is initially created with the default parameters for the database engine used by instances in the cluster. To provide custom values for any of the parameters, you must modify the group after you create it. After you create a DB cluster parameter group, you must associate it with your cluster. For the new cluster parameter group and associated settings to take effect, you must then reboot the DB instances in the cluster without failover.
> After you create a cluster parameter group, you should wait at least 5 minutes before creating your first cluster that uses that cluster parameter group as the default parameter group. This allows Amazon DocumentDB to fully complete the create action before the cluster parameter group is used as the default for a new cluster. This step is especially important for parameters that are critical when creating the default database for a cluster, such as the character set for the default database defined by the `character_set_database` parameter.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" var parameters interface{} cfnDBClusterParameterGroup := awscdk.Aws_docdb.NewCfnDBClusterParameterGroup(this, jsii.String("MyCfnDBClusterParameterGroup"), &CfnDBClusterParameterGroupProps{ Description: jsii.String("description"), Family: jsii.String("family"), Parameters: parameters, // the properties below are optional Name: jsii.String("name"), Tags: []cfnTag{ &cfnTag{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, })
func NewCfnDBClusterParameterGroup ¶
func NewCfnDBClusterParameterGroup(scope constructs.Construct, id *string, props *CfnDBClusterParameterGroupProps) CfnDBClusterParameterGroup
type CfnDBClusterParameterGroupProps ¶
type CfnDBClusterParameterGroupProps struct { // The description for the cluster parameter group. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbclusterparametergroup.html#cfn-docdb-dbclusterparametergroup-description // Description *string `field:"required" json:"description" yaml:"description"` // The cluster parameter group family name. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbclusterparametergroup.html#cfn-docdb-dbclusterparametergroup-family // Family *string `field:"required" json:"family" yaml:"family"` // Provides a list of parameters for the cluster parameter group. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbclusterparametergroup.html#cfn-docdb-dbclusterparametergroup-parameters // Parameters interface{} `field:"required" json:"parameters" yaml:"parameters"` // The name of the DB cluster parameter group. // // Constraints: // // - Must not match the name of an existing `DBClusterParameterGroup` . // // > This value is stored as a lowercase string. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbclusterparametergroup.html#cfn-docdb-dbclusterparametergroup-name // Name *string `field:"optional" json:"name" yaml:"name"` // The tags to be assigned to the cluster parameter group. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbclusterparametergroup.html#cfn-docdb-dbclusterparametergroup-tags // Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"` }
Properties for defining a `CfnDBClusterParameterGroup`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" var parameters interface{} cfnDBClusterParameterGroupProps := &CfnDBClusterParameterGroupProps{ Description: jsii.String("description"), Family: jsii.String("family"), Parameters: parameters, // the properties below are optional Name: jsii.String("name"), Tags: []cfnTag{ &cfnTag{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, }
type CfnDBClusterProps ¶
type CfnDBClusterProps struct { // A list of Amazon EC2 Availability Zones that instances in the cluster can be created in. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-availabilityzones // AvailabilityZones *[]*string `field:"optional" json:"availabilityZones" yaml:"availabilityZones"` // The number of days for which automated backups are retained. You must specify a minimum value of 1. // // Default: 1 // // Constraints: // // - Must be a value from 1 to 35. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-backupretentionperiod // BackupRetentionPeriod *float64 `field:"optional" json:"backupRetentionPeriod" yaml:"backupRetentionPeriod"` // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-copytagstosnapshot // CopyTagsToSnapshot interface{} `field:"optional" json:"copyTagsToSnapshot" yaml:"copyTagsToSnapshot"` // The cluster identifier. This parameter is stored as a lowercase string. // // Constraints: // // - Must contain from 1 to 63 letters, numbers, or hyphens. // - The first character must be a letter. // - Cannot end with a hyphen or contain two consecutive hyphens. // // Example: `my-cluster`. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-dbclusteridentifier // DbClusterIdentifier *string `field:"optional" json:"dbClusterIdentifier" yaml:"dbClusterIdentifier"` // The name of the cluster parameter group to associate with this cluster. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-dbclusterparametergroupname // DbClusterParameterGroupName *string `field:"optional" json:"dbClusterParameterGroupName" yaml:"dbClusterParameterGroupName"` // A subnet group to associate with this cluster. // // Constraints: Must match the name of an existing `DBSubnetGroup` . Must not be default. // // Example: `mySubnetgroup`. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-dbsubnetgroupname // DbSubnetGroupName *string `field:"optional" json:"dbSubnetGroupName" yaml:"dbSubnetGroupName"` // Protects clusters from being accidentally deleted. // // If enabled, the cluster cannot be deleted unless it is modified and `DeletionProtection` is disabled. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-deletionprotection // DeletionProtection interface{} `field:"optional" json:"deletionProtection" yaml:"deletionProtection"` // The list of log types that need to be enabled for exporting to Amazon CloudWatch Logs. // // You can enable audit logs or profiler logs. For more information, see [Auditing Amazon DocumentDB Events](https://docs.aws.amazon.com/documentdb/latest/developerguide/event-auditing.html) and [Profiling Amazon DocumentDB Operations](https://docs.aws.amazon.com/documentdb/latest/developerguide/profiling.html) . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-enablecloudwatchlogsexports // EnableCloudwatchLogsExports *[]*string `field:"optional" json:"enableCloudwatchLogsExports" yaml:"enableCloudwatchLogsExports"` // The version number of the database engine to use. // // The `--engine-version` will default to the latest major engine version. For production workloads, we recommend explicitly declaring this parameter with the intended major engine version. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-engineversion // EngineVersion *string `field:"optional" json:"engineVersion" yaml:"engineVersion"` // The AWS KMS key identifier for an encrypted cluster. // // The AWS KMS key identifier is the Amazon Resource Name (ARN) for the AWS KMS encryption key. If you are creating a cluster using the same AWS account that owns the AWS KMS encryption key that is used to encrypt the new cluster, you can use the AWS KMS key alias instead of the ARN for the AWS KMS encryption key. // // If an encryption key is not specified in `KmsKeyId` : // // - If the `StorageEncrypted` parameter is `true` , Amazon DocumentDB uses your default encryption key. // // AWS KMS creates the default encryption key for your AWS account . Your AWS account has a different default encryption key for each AWS Regions . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-kmskeyid // KmsKeyId *string `field:"optional" json:"kmsKeyId" yaml:"kmsKeyId"` // The name of the master user for the cluster. // // Constraints: // // - Must be from 1 to 63 letters or numbers. // - The first character must be a letter. // - Cannot be a reserved word for the chosen database engine. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-masterusername // MasterUsername *string `field:"optional" json:"masterUsername" yaml:"masterUsername"` // The password for the master database user. // // This password can contain any printable ASCII character except forward slash (/), double quote ("), or the "at" symbol (@). // // Constraints: Must contain from 8 to 100 characters. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-masteruserpassword // MasterUserPassword *string `field:"optional" json:"masterUserPassword" yaml:"masterUserPassword"` // Specifies the port that the database engine is listening on. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-port // Port *float64 `field:"optional" json:"port" yaml:"port"` // The daily time range during which automated backups are created if automated backups are enabled using the `BackupRetentionPeriod` parameter. // // The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region . // // Constraints: // // - Must be in the format `hh24:mi-hh24:mi` . // - Must be in Universal Coordinated Time (UTC). // - Must not conflict with the preferred maintenance window. // - Must be at least 30 minutes. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-preferredbackupwindow // PreferredBackupWindow *string `field:"optional" json:"preferredBackupWindow" yaml:"preferredBackupWindow"` // The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC). // // Format: `ddd:hh24:mi-ddd:hh24:mi` // // The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region , occurring on a random day of the week. // // Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun // // Constraints: Minimum 30-minute window. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-preferredmaintenancewindow // PreferredMaintenanceWindow *string `field:"optional" json:"preferredMaintenanceWindow" yaml:"preferredMaintenanceWindow"` // The date and time to restore the cluster to. // // Valid values: A time in Universal Coordinated Time (UTC) format. // // Constraints: // // - Must be before the latest restorable time for the instance. // - Must be specified if the `UseLatestRestorableTime` parameter is not provided. // - Cannot be specified if the `UseLatestRestorableTime` parameter is `true` . // - Cannot be specified if the `RestoreType` parameter is `copy-on-write` . // // Example: `2015-03-07T23:45:00Z`. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-restoretotime // RestoreToTime *string `field:"optional" json:"restoreToTime" yaml:"restoreToTime"` // The type of restore to be performed. You can specify one of the following values:. // // - `full-copy` - The new DB cluster is restored as a full copy of the source DB cluster. // - `copy-on-write` - The new DB cluster is restored as a clone of the source DB cluster. // // Constraints: You can't specify `copy-on-write` if the engine version of the source DB cluster is earlier than 1.11. // // If you don't specify a `RestoreType` value, then the new DB cluster is restored as a full copy of the source DB cluster. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-restoretype // RestoreType *string `field:"optional" json:"restoreType" yaml:"restoreType"` // The identifier for the snapshot or cluster snapshot to restore from. // // You can use either the name or the Amazon Resource Name (ARN) to specify a cluster snapshot. However, you can use only the ARN to specify a snapshot. // // Constraints: // // - Must match the identifier of an existing snapshot. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-snapshotidentifier // SnapshotIdentifier *string `field:"optional" json:"snapshotIdentifier" yaml:"snapshotIdentifier"` // The identifier of the source cluster from which to restore. // // Constraints: // // - Must match the identifier of an existing `DBCluster` . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-sourcedbclusteridentifier // SourceDbClusterIdentifier *string `field:"optional" json:"sourceDbClusterIdentifier" yaml:"sourceDbClusterIdentifier"` // Specifies whether the cluster is encrypted. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-storageencrypted // StorageEncrypted interface{} `field:"optional" json:"storageEncrypted" yaml:"storageEncrypted"` // The tags to be assigned to the cluster. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-tags // Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"` // A value that is set to `true` to restore the cluster to the latest restorable backup time, and `false` otherwise. // // Default: `false` // // Constraints: Cannot be specified if the `RestoreToTime` parameter is provided. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-uselatestrestorabletime // UseLatestRestorableTime interface{} `field:"optional" json:"useLatestRestorableTime" yaml:"useLatestRestorableTime"` // A list of EC2 VPC security groups to associate with this cluster. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-vpcsecuritygroupids // VpcSecurityGroupIds *[]*string `field:"optional" json:"vpcSecurityGroupIds" yaml:"vpcSecurityGroupIds"` }
Properties for defining a `CfnDBCluster`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnDBClusterProps := &CfnDBClusterProps{ AvailabilityZones: []*string{ jsii.String("availabilityZones"), }, BackupRetentionPeriod: jsii.Number(123), CopyTagsToSnapshot: jsii.Boolean(false), DbClusterIdentifier: jsii.String("dbClusterIdentifier"), DbClusterParameterGroupName: jsii.String("dbClusterParameterGroupName"), DbSubnetGroupName: jsii.String("dbSubnetGroupName"), DeletionProtection: jsii.Boolean(false), EnableCloudwatchLogsExports: []*string{ jsii.String("enableCloudwatchLogsExports"), }, EngineVersion: jsii.String("engineVersion"), KmsKeyId: jsii.String("kmsKeyId"), MasterUsername: jsii.String("masterUsername"), MasterUserPassword: jsii.String("masterUserPassword"), Port: jsii.Number(123), PreferredBackupWindow: jsii.String("preferredBackupWindow"), PreferredMaintenanceWindow: jsii.String("preferredMaintenanceWindow"), RestoreToTime: jsii.String("restoreToTime"), RestoreType: jsii.String("restoreType"), SnapshotIdentifier: jsii.String("snapshotIdentifier"), SourceDbClusterIdentifier: jsii.String("sourceDbClusterIdentifier"), StorageEncrypted: jsii.Boolean(false), Tags: []cfnTag{ &cfnTag{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, UseLatestRestorableTime: jsii.Boolean(false), VpcSecurityGroupIds: []*string{ jsii.String("vpcSecurityGroupIds"), }, }
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html
type CfnDBInstance ¶
type CfnDBInstance interface { awscdk.CfnResource awscdk.IInspectable awscdk.ITaggable // The connection endpoint for the instance. // // For example: `sample-cluster.cluster-abcdefghijkl.us-east-1.docdb.amazonaws.com` . AttrEndpoint() *string AttrId() *string // The port number on which the database accepts connections, such as `27017` . AttrPort() *string // This parameter does not apply to Amazon DocumentDB. AutoMinorVersionUpgrade() interface{} SetAutoMinorVersionUpgrade(val interface{}) // The Amazon EC2 Availability Zone that the instance is created in. AvailabilityZone() *string SetAvailabilityZone(val *string) // Options for this resource, such as condition, update policy etc. CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} // AWS resource type. CfnResourceType() *string // Returns: the stack trace of the point where this Resource was created from, sourced // from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most // node +internal+ entries filtered. CreationStack() *[]*string // The identifier of the cluster that the instance will belong to. DbClusterIdentifier() *string SetDbClusterIdentifier(val *string) // The compute and memory capacity of the instance;. DbInstanceClass() *string SetDbInstanceClass(val *string) // The instance identifier. // // This parameter is stored as a lowercase string. DbInstanceIdentifier() *string SetDbInstanceIdentifier(val *string) // A value that indicates whether to enable Performance Insights for the DB Instance. EnablePerformanceInsights() interface{} SetEnablePerformanceInsights(val interface{}) // The logical ID for this CloudFormation stack element. // // The logical ID of the element // is calculated from the path of the resource node in the construct tree. // // To override this value, use `overrideLogicalId(newLogicalId)`. // // Returns: the logical ID as a stringified token. This value will only get // resolved during synthesis. LogicalId() *string // The tree node. Node() constructs.Node // The time range each week during which system maintenance can occur, in Universal Coordinated Time (UTC). PreferredMaintenanceWindow() *string SetPreferredMaintenanceWindow(val *string) // Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. // // If, by any chance, the intrinsic reference of a resource is not a string, you could // coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`. Ref() *string // The stack in which this element is defined. // // CfnElements must be defined within a stack scope (directly or indirectly). Stack() awscdk.Stack // Tag Manager which manages the tags for this resource. Tags() awscdk.TagManager // The tags to be assigned to the instance. TagsRaw() *[]*awscdk.CfnTag SetTagsRaw(val *[]*awscdk.CfnTag) // Deprecated. // Deprecated: use `updatedProperties` // // Return properties modified after initiation // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperites() *map[string]interface{} // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperties() *map[string]interface{} // Syntactic sugar for `addOverride(path, undefined)`. AddDeletionOverride(path *string) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // // This can be used for resources across stacks (or nested stack) boundaries // and the dependency will automatically be transferred to the relevant scope. AddDependency(target awscdk.CfnResource) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // Deprecated: use addDependency. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "Properties." (i.e. `Properties.TopicName`). // // If the override is nested, separate each nested level using a dot (.) in the path parameter. // If there is an array as part of the nesting, specify the index in the path. // // To include a literal `.` in the property name, prefix with a `\`. In most // programming languages you will need to write this as `"\\."` because the // `\` itself will need to be escaped. // // For example, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will not be processed or translated // in any way. Pass raw JSON values in here with the correct capitalization // for CloudFormation. If you pass CDK classes or structs, they will be // rendered with lowercased key names, and CloudFormation will reject the // template. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. AddPropertyOverride(propertyPath *string, value interface{}) // Sets the deletion policy of the resource based on the removal policy specified. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some // cases, a snapshot can be taken of the resource prior to deletion // (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy // can be found in the following link:. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options // ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // Returns a token for an runtime attribute of this resource. // // Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility // in case there is no generated attribute. GetAtt(attributeName *string, typeHint awscdk.ResolutionTypeHint) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Retrieves an array of resources this resource depends on. // // This assembles dependencies on resources across stacks (including nested stacks) // automatically. ObtainDependencies() *[]interface{} // Get a shallow copy of dependencies between this resource and other resources in the same stack. ObtainResourceDependencies() *[]awscdk.CfnResource // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) // Indicates that this resource no longer depends on another resource. // // This can be used for resources across stacks (including nested stacks) // and the dependency will automatically be removed from the relevant scope. RemoveDependency(target awscdk.CfnResource) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Replaces one dependency with another. ReplaceDependency(target awscdk.CfnResource, newTarget awscdk.CfnResource) // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. ShouldSynthesize() *bool // Returns a string representation of this construct. // // Returns: a string representation of this resource. ToString() *string ValidateProperties(_properties interface{}) }
The `AWS::DocDB::DBInstance` Amazon DocumentDB (with MongoDB compatibility) resource describes a DBInstance.
For more information, see [DBInstance](https://docs.aws.amazon.com/documentdb/latest/developerguide/API_DBInstance.html) in the *Amazon DocumentDB Developer Guide* .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnDBInstance := awscdk.Aws_docdb.NewCfnDBInstance(this, jsii.String("MyCfnDBInstance"), &CfnDBInstanceProps{ DbClusterIdentifier: jsii.String("dbClusterIdentifier"), DbInstanceClass: jsii.String("dbInstanceClass"), // the properties below are optional AutoMinorVersionUpgrade: jsii.Boolean(false), AvailabilityZone: jsii.String("availabilityZone"), DbInstanceIdentifier: jsii.String("dbInstanceIdentifier"), EnablePerformanceInsights: jsii.Boolean(false), PreferredMaintenanceWindow: jsii.String("preferredMaintenanceWindow"), Tags: []cfnTag{ &cfnTag{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, })
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbinstance.html
func NewCfnDBInstance ¶
func NewCfnDBInstance(scope constructs.Construct, id *string, props *CfnDBInstanceProps) CfnDBInstance
type CfnDBInstanceProps ¶
type CfnDBInstanceProps struct { // The identifier of the cluster that the instance will belong to. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbinstance.html#cfn-docdb-dbinstance-dbclusteridentifier // DbClusterIdentifier *string `field:"required" json:"dbClusterIdentifier" yaml:"dbClusterIdentifier"` // The compute and memory capacity of the instance; // // for example, `db.m4.large` . If you change the class of an instance there can be some interruption in the cluster's service. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbinstance.html#cfn-docdb-dbinstance-dbinstanceclass // DbInstanceClass *string `field:"required" json:"dbInstanceClass" yaml:"dbInstanceClass"` // This parameter does not apply to Amazon DocumentDB. // // Amazon DocumentDB does not perform minor version upgrades regardless of the value set. // // Default: `false`. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbinstance.html#cfn-docdb-dbinstance-autominorversionupgrade // AutoMinorVersionUpgrade interface{} `field:"optional" json:"autoMinorVersionUpgrade" yaml:"autoMinorVersionUpgrade"` // The Amazon EC2 Availability Zone that the instance is created in. // // Default: A random, system-chosen Availability Zone in the endpoint's AWS Region . // // Example: `us-east-1d`. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbinstance.html#cfn-docdb-dbinstance-availabilityzone // AvailabilityZone *string `field:"optional" json:"availabilityZone" yaml:"availabilityZone"` // The instance identifier. This parameter is stored as a lowercase string. // // Constraints: // // - Must contain from 1 to 63 letters, numbers, or hyphens. // - The first character must be a letter. // - Cannot end with a hyphen or contain two consecutive hyphens. // // Example: `mydbinstance`. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbinstance.html#cfn-docdb-dbinstance-dbinstanceidentifier // DbInstanceIdentifier *string `field:"optional" json:"dbInstanceIdentifier" yaml:"dbInstanceIdentifier"` // A value that indicates whether to enable Performance Insights for the DB Instance. // // For more information, see [Using Amazon Performance Insights](https://docs.aws.amazon.com/documentdb/latest/developerguide/performance-insights.html) . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbinstance.html#cfn-docdb-dbinstance-enableperformanceinsights // EnablePerformanceInsights interface{} `field:"optional" json:"enablePerformanceInsights" yaml:"enablePerformanceInsights"` // The time range each week during which system maintenance can occur, in Universal Coordinated Time (UTC). // // Format: `ddd:hh24:mi-ddd:hh24:mi` // // The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region , occurring on a random day of the week. // // Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun // // Constraints: Minimum 30-minute window. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbinstance.html#cfn-docdb-dbinstance-preferredmaintenancewindow // PreferredMaintenanceWindow *string `field:"optional" json:"preferredMaintenanceWindow" yaml:"preferredMaintenanceWindow"` // The tags to be assigned to the instance. // // You can assign up to 10 tags to an instance. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbinstance.html#cfn-docdb-dbinstance-tags // Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"` }
Properties for defining a `CfnDBInstance`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnDBInstanceProps := &CfnDBInstanceProps{ DbClusterIdentifier: jsii.String("dbClusterIdentifier"), DbInstanceClass: jsii.String("dbInstanceClass"), // the properties below are optional AutoMinorVersionUpgrade: jsii.Boolean(false), AvailabilityZone: jsii.String("availabilityZone"), DbInstanceIdentifier: jsii.String("dbInstanceIdentifier"), EnablePerformanceInsights: jsii.Boolean(false), PreferredMaintenanceWindow: jsii.String("preferredMaintenanceWindow"), Tags: []cfnTag{ &cfnTag{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, }
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbinstance.html
type CfnDBSubnetGroup ¶
type CfnDBSubnetGroup interface { awscdk.CfnResource awscdk.IInspectable awscdk.ITaggable AttrId() *string // Options for this resource, such as condition, update policy etc. CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} // AWS resource type. CfnResourceType() *string // Returns: the stack trace of the point where this Resource was created from, sourced // from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most // node +internal+ entries filtered. CreationStack() *[]*string // The description for the subnet group. DbSubnetGroupDescription() *string SetDbSubnetGroupDescription(val *string) // The name for the subnet group. // // This value is stored as a lowercase string. DbSubnetGroupName() *string SetDbSubnetGroupName(val *string) // The logical ID for this CloudFormation stack element. // // The logical ID of the element // is calculated from the path of the resource node in the construct tree. // // To override this value, use `overrideLogicalId(newLogicalId)`. // // Returns: the logical ID as a stringified token. This value will only get // resolved during synthesis. LogicalId() *string // The tree node. Node() constructs.Node // Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. // // If, by any chance, the intrinsic reference of a resource is not a string, you could // coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`. Ref() *string // The stack in which this element is defined. // // CfnElements must be defined within a stack scope (directly or indirectly). Stack() awscdk.Stack // The Amazon EC2 subnet IDs for the subnet group. SubnetIds() *[]*string SetSubnetIds(val *[]*string) // Tag Manager which manages the tags for this resource. Tags() awscdk.TagManager // The tags to be assigned to the subnet group. TagsRaw() *[]*awscdk.CfnTag SetTagsRaw(val *[]*awscdk.CfnTag) // Deprecated. // Deprecated: use `updatedProperties` // // Return properties modified after initiation // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperites() *map[string]interface{} // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperties() *map[string]interface{} // Syntactic sugar for `addOverride(path, undefined)`. AddDeletionOverride(path *string) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // // This can be used for resources across stacks (or nested stack) boundaries // and the dependency will automatically be transferred to the relevant scope. AddDependency(target awscdk.CfnResource) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // Deprecated: use addDependency. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "Properties." (i.e. `Properties.TopicName`). // // If the override is nested, separate each nested level using a dot (.) in the path parameter. // If there is an array as part of the nesting, specify the index in the path. // // To include a literal `.` in the property name, prefix with a `\`. In most // programming languages you will need to write this as `"\\."` because the // `\` itself will need to be escaped. // // For example, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will not be processed or translated // in any way. Pass raw JSON values in here with the correct capitalization // for CloudFormation. If you pass CDK classes or structs, they will be // rendered with lowercased key names, and CloudFormation will reject the // template. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. AddPropertyOverride(propertyPath *string, value interface{}) // Sets the deletion policy of the resource based on the removal policy specified. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some // cases, a snapshot can be taken of the resource prior to deletion // (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy // can be found in the following link:. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options // ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // Returns a token for an runtime attribute of this resource. // // Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility // in case there is no generated attribute. GetAtt(attributeName *string, typeHint awscdk.ResolutionTypeHint) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Retrieves an array of resources this resource depends on. // // This assembles dependencies on resources across stacks (including nested stacks) // automatically. ObtainDependencies() *[]interface{} // Get a shallow copy of dependencies between this resource and other resources in the same stack. ObtainResourceDependencies() *[]awscdk.CfnResource // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) // Indicates that this resource no longer depends on another resource. // // This can be used for resources across stacks (including nested stacks) // and the dependency will automatically be removed from the relevant scope. RemoveDependency(target awscdk.CfnResource) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Replaces one dependency with another. ReplaceDependency(target awscdk.CfnResource, newTarget awscdk.CfnResource) // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. ShouldSynthesize() *bool // Returns a string representation of this construct. // // Returns: a string representation of this resource. ToString() *string ValidateProperties(_properties interface{}) }
The `AWS::DocDB::DBSubnetGroup` Amazon DocumentDB (with MongoDB compatibility) resource describes a DBSubnetGroup.
subnet groups must contain at least one subnet in at least two Availability Zones in the AWS Region . For more information, see [DBSubnetGroup](https://docs.aws.amazon.com/documentdb/latest/developerguide/API_DBSubnetGroup.html) in the *Amazon DocumentDB Developer Guide* .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnDBSubnetGroup := awscdk.Aws_docdb.NewCfnDBSubnetGroup(this, jsii.String("MyCfnDBSubnetGroup"), &CfnDBSubnetGroupProps{ DbSubnetGroupDescription: jsii.String("dbSubnetGroupDescription"), SubnetIds: []*string{ jsii.String("subnetIds"), }, // the properties below are optional DbSubnetGroupName: jsii.String("dbSubnetGroupName"), Tags: []cfnTag{ &cfnTag{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, })
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbsubnetgroup.html
func NewCfnDBSubnetGroup ¶
func NewCfnDBSubnetGroup(scope constructs.Construct, id *string, props *CfnDBSubnetGroupProps) CfnDBSubnetGroup
type CfnDBSubnetGroupProps ¶
type CfnDBSubnetGroupProps struct { // The description for the subnet group. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbsubnetgroup.html#cfn-docdb-dbsubnetgroup-dbsubnetgroupdescription // DbSubnetGroupDescription *string `field:"required" json:"dbSubnetGroupDescription" yaml:"dbSubnetGroupDescription"` // The Amazon EC2 subnet IDs for the subnet group. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbsubnetgroup.html#cfn-docdb-dbsubnetgroup-subnetids // SubnetIds *[]*string `field:"required" json:"subnetIds" yaml:"subnetIds"` // The name for the subnet group. This value is stored as a lowercase string. // // Constraints: Must contain no more than 255 letters, numbers, periods, underscores, spaces, or hyphens. Must not be default. // // Example: `mySubnetgroup`. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbsubnetgroup.html#cfn-docdb-dbsubnetgroup-dbsubnetgroupname // DbSubnetGroupName *string `field:"optional" json:"dbSubnetGroupName" yaml:"dbSubnetGroupName"` // The tags to be assigned to the subnet group. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbsubnetgroup.html#cfn-docdb-dbsubnetgroup-tags // Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"` }
Properties for defining a `CfnDBSubnetGroup`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnDBSubnetGroupProps := &CfnDBSubnetGroupProps{ DbSubnetGroupDescription: jsii.String("dbSubnetGroupDescription"), SubnetIds: []*string{ jsii.String("subnetIds"), }, // the properties below are optional DbSubnetGroupName: jsii.String("dbSubnetGroupName"), Tags: []cfnTag{ &cfnTag{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, }
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbsubnetgroup.html
type ClusterParameterGroup ¶
type ClusterParameterGroup interface { awscdk.Resource IClusterParameterGroup // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. Env() *awscdk.ResourceEnvironment // The tree node. Node() constructs.Node // The name of the parameter group. ParameterGroupName() *string // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. PhysicalName() *string // The stack in which this resource is defined. Stack() awscdk.Stack // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). ApplyRemovalPolicy(policy awscdk.RemovalPolicy) GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. GetResourceNameAttribute(nameAttr *string) *string // Returns a string representation of this construct. ToString() *string }
A cluster parameter group.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" clusterParameterGroup := awscdk.Aws_docdb.NewClusterParameterGroup(this, jsii.String("MyClusterParameterGroup"), &ClusterParameterGroupProps{ Family: jsii.String("family"), Parameters: map[string]*string{ "parametersKey": jsii.String("parameters"), }, // the properties below are optional DbClusterParameterGroupName: jsii.String("dbClusterParameterGroupName"), Description: jsii.String("description"), })
func NewClusterParameterGroup ¶
func NewClusterParameterGroup(scope constructs.Construct, id *string, props *ClusterParameterGroupProps) ClusterParameterGroup
type ClusterParameterGroupProps ¶
type ClusterParameterGroupProps struct { // Database family of this parameter group. Family *string `field:"required" json:"family" yaml:"family"` // The parameters in this parameter group. Parameters *map[string]*string `field:"required" json:"parameters" yaml:"parameters"` // The name of the cluster parameter group. // Default: A CDK generated name for the cluster parameter group. // DbClusterParameterGroupName *string `field:"optional" json:"dbClusterParameterGroupName" yaml:"dbClusterParameterGroupName"` // Description for this parameter group. // Default: a CDK generated description. // Description *string `field:"optional" json:"description" yaml:"description"` }
Properties for a cluster parameter group.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" clusterParameterGroupProps := &ClusterParameterGroupProps{ Family: jsii.String("family"), Parameters: map[string]*string{ "parametersKey": jsii.String("parameters"), }, // the properties below are optional DbClusterParameterGroupName: jsii.String("dbClusterParameterGroupName"), Description: jsii.String("description"), }
type DatabaseCluster ¶
type DatabaseCluster interface { awscdk.Resource IDatabaseCluster // The endpoint to use for read/write operations. ClusterEndpoint() Endpoint // Identifier of the cluster. ClusterIdentifier() *string // Endpoint to use for load-balanced read-only operations. ClusterReadEndpoint() Endpoint // The resource id for the cluster; // // for example: cluster-ABCD1234EFGH5678IJKL90MNOP. The cluster ID uniquely // identifies the cluster and is used in things like IAM authentication policies. ClusterResourceIdentifier() *string // The connections object to implement IConnectable. Connections() awsec2.Connections // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. Env() *awscdk.ResourceEnvironment // Endpoints which address each individual replica. InstanceEndpoints() *[]Endpoint // Identifiers of the replicas. InstanceIdentifiers() *[]*string // The tree node. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. PhysicalName() *string // The secret attached to this cluster. Secret() awssecretsmanager.ISecret // Security group identifier of this database. SecurityGroupId() *string // The stack in which this resource is defined. Stack() awscdk.Stack // Adds the multi user rotation to this cluster. AddRotationMultiUser(id *string, options *RotationMultiUserOptions) awssecretsmanager.SecretRotation // Adds the single user rotation of the master password to this cluster. AddRotationSingleUser(automaticallyAfter awscdk.Duration) awssecretsmanager.SecretRotation // Adds security groups to this cluster. AddSecurityGroups(securityGroups ...awsec2.ISecurityGroup) // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Renders the secret attachment target specifications. AsSecretAttachmentTarget() *awssecretsmanager.SecretAttachmentTargetProps GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. GetResourceNameAttribute(nameAttr *string) *string // Returns a string representation of this construct. ToString() *string }
Create a clustered database with a given number of instances.
Example:
var vpc vpc cluster := docdb.NewDatabaseCluster(this, jsii.String("Database"), &DatabaseClusterProps{ MasterUser: &Login{ Username: jsii.String("myuser"), }, InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_MEMORY5, ec2.InstanceSize_LARGE), VpcSubnets: &SubnetSelection{ SubnetType: ec2.SubnetType_PUBLIC, }, Vpc: Vpc, DeletionProtection: jsii.Boolean(true), })
func NewDatabaseCluster ¶
func NewDatabaseCluster(scope constructs.Construct, id *string, props *DatabaseClusterProps) DatabaseCluster
type DatabaseClusterAttributes ¶
type DatabaseClusterAttributes struct { // Identifier for the cluster. ClusterIdentifier *string `field:"required" json:"clusterIdentifier" yaml:"clusterIdentifier"` // Cluster endpoint address. // Default: - no cluster endpoint address. // ClusterEndpointAddress *string `field:"optional" json:"clusterEndpointAddress" yaml:"clusterEndpointAddress"` // Endpoint addresses of individual instances. // Default: - no instance endpoint addresses. // InstanceEndpointAddresses *[]*string `field:"optional" json:"instanceEndpointAddresses" yaml:"instanceEndpointAddresses"` // Identifier for the instances. // Default: - no instance identifiers. // InstanceIdentifiers *[]*string `field:"optional" json:"instanceIdentifiers" yaml:"instanceIdentifiers"` // The database port. // Default: - none. // Port *float64 `field:"optional" json:"port" yaml:"port"` // Reader endpoint address. // Default: - no reader endpoint address. // ReaderEndpointAddress *string `field:"optional" json:"readerEndpointAddress" yaml:"readerEndpointAddress"` // The security group of the database cluster. // Default: - no security groups. // SecurityGroup awsec2.ISecurityGroup `field:"optional" json:"securityGroup" yaml:"securityGroup"` }
Properties that describe an existing cluster instance.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var securityGroup securityGroup databaseClusterAttributes := &DatabaseClusterAttributes{ ClusterIdentifier: jsii.String("clusterIdentifier"), // the properties below are optional ClusterEndpointAddress: jsii.String("clusterEndpointAddress"), InstanceEndpointAddresses: []*string{ jsii.String("instanceEndpointAddresses"), }, InstanceIdentifiers: []*string{ jsii.String("instanceIdentifiers"), }, Port: jsii.Number(123), ReaderEndpointAddress: jsii.String("readerEndpointAddress"), SecurityGroup: securityGroup, }
type DatabaseClusterProps ¶
type DatabaseClusterProps struct { // What type of instance to start for the replicas. InstanceType awsec2.InstanceType `field:"required" json:"instanceType" yaml:"instanceType"` // Username and password for the administrative user. MasterUser *Login `field:"required" json:"masterUser" yaml:"masterUser"` // What subnets to run the DocumentDB instances in. // // Must be at least 2 subnets in two different AZs. Vpc awsec2.IVpc `field:"required" json:"vpc" yaml:"vpc"` // Backup settings. // See: https://docs.aws.amazon.com/documentdb/latest/developerguide/backup-restore.db-cluster-snapshots.html#backup-restore.backup-window // // Default: - Backup retention period for automated backups is 1 day. // Backup preferred window is set to a 30-minute window selected at random from an // 8-hour block of time for each AWS Region, occurring on a random day of the week. // Backup *BackupProps `field:"optional" json:"backup" yaml:"backup"` // The number of days log events are kept in CloudWatch Logs. // // When updating // this property, unsetting it doesn't remove the log retention policy. To // remove the retention policy, set the value to `Infinity`. // Default: - logs never expire. // CloudWatchLogsRetention awslogs.RetentionDays `field:"optional" json:"cloudWatchLogsRetention" yaml:"cloudWatchLogsRetention"` // The IAM role for the Lambda function associated with the custom resource that sets the retention policy. // Default: - a new role is created. // CloudWatchLogsRetentionRole awsiam.IRole `field:"optional" json:"cloudWatchLogsRetentionRole" yaml:"cloudWatchLogsRetentionRole"` // An optional identifier for the cluster. // Default: - A name is automatically generated. // DbClusterName *string `field:"optional" json:"dbClusterName" yaml:"dbClusterName"` // Specifies whether this cluster can be deleted. // // If deletionProtection is // enabled, the cluster cannot be deleted unless it is modified and // deletionProtection is disabled. deletionProtection protects clusters from // being accidentally deleted. // Default: - false. // DeletionProtection *bool `field:"optional" json:"deletionProtection" yaml:"deletionProtection"` // A value that indicates whether to enable Performance Insights for the instances in the DB Cluster. // Default: - false. // EnablePerformanceInsights *bool `field:"optional" json:"enablePerformanceInsights" yaml:"enablePerformanceInsights"` // What version of the database to start. // Default: - The default engine version. // EngineVersion *string `field:"optional" json:"engineVersion" yaml:"engineVersion"` // Whether the audit logs should be exported to CloudWatch. // // Note that you also have to configure the audit log export in the Cluster's Parameter Group. // See: https://docs.aws.amazon.com/documentdb/latest/developerguide/event-auditing.html#event-auditing-enabling-auditing // // Default: false. // ExportAuditLogsToCloudWatch *bool `field:"optional" json:"exportAuditLogsToCloudWatch" yaml:"exportAuditLogsToCloudWatch"` // Whether the profiler logs should be exported to CloudWatch. // // Note that you also have to configure the profiler log export in the Cluster's Parameter Group. // See: https://docs.aws.amazon.com/documentdb/latest/developerguide/profiling.html#profiling.enable-profiling // // Default: false. // ExportProfilerLogsToCloudWatch *bool `field:"optional" json:"exportProfilerLogsToCloudWatch" yaml:"exportProfilerLogsToCloudWatch"` // Base identifier for instances. // // Every replica is named by appending the replica number to this string, 1-based. // Default: - `dbClusterName` is used with the word "Instance" appended. If `dbClusterName` is not provided, the // identifier is automatically generated. // InstanceIdentifierBase *string `field:"optional" json:"instanceIdentifierBase" yaml:"instanceIdentifierBase"` // Number of DocDB compute instances. // Default: 1. // Instances *float64 `field:"optional" json:"instances" yaml:"instances"` // The KMS key for storage encryption. // Default: - default master key. // KmsKey awskms.IKey `field:"optional" json:"kmsKey" yaml:"kmsKey"` // The DB parameter group to associate with the instance. // Default: no parameter group. // ParameterGroup IClusterParameterGroup `field:"optional" json:"parameterGroup" yaml:"parameterGroup"` // The port the DocumentDB cluster will listen on. // Default: DatabaseCluster.DEFAULT_PORT // Port *float64 `field:"optional" json:"port" yaml:"port"` // A weekly time range in which maintenance should preferably execute. // // Must be at least 30 minutes long. // // Example: 'tue:04:17-tue:04:47'. // See: https://docs.aws.amazon.com/documentdb/latest/developerguide/db-instance-maintain.html#maintenance-window // // Default: - 30-minute window selected at random from an 8-hour block of time for // each AWS Region, occurring on a random day of the week. // PreferredMaintenanceWindow *string `field:"optional" json:"preferredMaintenanceWindow" yaml:"preferredMaintenanceWindow"` // The removal policy to apply when the cluster and its instances are removed or replaced during a stack update, or when the stack is deleted. // // This // removal policy also applies to the implicit security group created for the // cluster if one is not supplied as a parameter. // Default: - Retain cluster. // RemovalPolicy awscdk.RemovalPolicy `field:"optional" json:"removalPolicy" yaml:"removalPolicy"` // Security group. // Default: a new security group is created. // SecurityGroup awsec2.ISecurityGroup `field:"optional" json:"securityGroup" yaml:"securityGroup"` // Whether to enable storage encryption. // Default: true. // StorageEncrypted *bool `field:"optional" json:"storageEncrypted" yaml:"storageEncrypted"` // Where to place the instances within the VPC. // Default: private subnets. // VpcSubnets *awsec2.SubnetSelection `field:"optional" json:"vpcSubnets" yaml:"vpcSubnets"` }
Properties for a new database cluster.
Example:
var vpc vpc cluster := docdb.NewDatabaseCluster(this, jsii.String("Database"), &DatabaseClusterProps{ MasterUser: &Login{ Username: jsii.String("myuser"), }, InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_MEMORY5, ec2.InstanceSize_LARGE), VpcSubnets: &SubnetSelection{ SubnetType: ec2.SubnetType_PUBLIC, }, Vpc: Vpc, DeletionProtection: jsii.Boolean(true), })
type DatabaseInstance ¶
type DatabaseInstance interface { awscdk.Resource IDatabaseInstance // The instance's database cluster. Cluster() IDatabaseCluster // The instance endpoint address. DbInstanceEndpointAddress() *string // The instance endpoint port. DbInstanceEndpointPort() *string // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. Env() *awscdk.ResourceEnvironment // The instance arn. InstanceArn() *string // The instance endpoint. InstanceEndpoint() Endpoint // The instance identifier. InstanceIdentifier() *string // The tree node. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. PhysicalName() *string // The stack in which this resource is defined. Stack() awscdk.Stack // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). ApplyRemovalPolicy(policy awscdk.RemovalPolicy) GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. GetResourceNameAttribute(nameAttr *string) *string // Returns a string representation of this construct. ToString() *string }
A database instance.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import cdk "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var databaseCluster databaseCluster var instanceType instanceType databaseInstance := awscdk.Aws_docdb.NewDatabaseInstance(this, jsii.String("MyDatabaseInstance"), &DatabaseInstanceProps{ Cluster: databaseCluster, InstanceType: instanceType, // the properties below are optional AutoMinorVersionUpgrade: jsii.Boolean(false), AvailabilityZone: jsii.String("availabilityZone"), DbInstanceName: jsii.String("dbInstanceName"), EnablePerformanceInsights: jsii.Boolean(false), PreferredMaintenanceWindow: jsii.String("preferredMaintenanceWindow"), RemovalPolicy: cdk.RemovalPolicy_DESTROY, })
func NewDatabaseInstance ¶
func NewDatabaseInstance(scope constructs.Construct, id *string, props *DatabaseInstanceProps) DatabaseInstance
type DatabaseInstanceAttributes ¶
type DatabaseInstanceAttributes struct { // The endpoint address. InstanceEndpointAddress *string `field:"required" json:"instanceEndpointAddress" yaml:"instanceEndpointAddress"` // The instance identifier. InstanceIdentifier *string `field:"required" json:"instanceIdentifier" yaml:"instanceIdentifier"` // The database port. Port *float64 `field:"required" json:"port" yaml:"port"` }
Properties that describe an existing instance.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" databaseInstanceAttributes := &DatabaseInstanceAttributes{ InstanceEndpointAddress: jsii.String("instanceEndpointAddress"), InstanceIdentifier: jsii.String("instanceIdentifier"), Port: jsii.Number(123), }
type DatabaseInstanceProps ¶
type DatabaseInstanceProps struct { // The DocumentDB database cluster the instance should launch into. Cluster IDatabaseCluster `field:"required" json:"cluster" yaml:"cluster"` // The name of the compute and memory capacity classes. InstanceType awsec2.InstanceType `field:"required" json:"instanceType" yaml:"instanceType"` // Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window. // Default: true. // AutoMinorVersionUpgrade *bool `field:"optional" json:"autoMinorVersionUpgrade" yaml:"autoMinorVersionUpgrade"` // The name of the Availability Zone where the DB instance will be located. // Default: - no preference. // AvailabilityZone *string `field:"optional" json:"availabilityZone" yaml:"availabilityZone"` // A name for the DB instance. // // If you specify a name, AWS CloudFormation // converts it to lowercase. // Default: - a CloudFormation generated name. // DbInstanceName *string `field:"optional" json:"dbInstanceName" yaml:"dbInstanceName"` // A value that indicates whether to enable Performance Insights for the DB Instance. // Default: - false. // EnablePerformanceInsights *bool `field:"optional" json:"enablePerformanceInsights" yaml:"enablePerformanceInsights"` // The weekly time range (in UTC) during which system maintenance can occur. // // Format: `ddd:hh24:mi-ddd:hh24:mi` // Constraint: Minimum 30-minute window. // Default: - a 30-minute window selected at random from an 8-hour block of // time for each AWS Region, occurring on a random day of the week. To see // the time blocks available, see https://docs.aws.amazon.com/documentdb/latest/developerguide/db-instance-maintain.html#maintenance-window // PreferredMaintenanceWindow *string `field:"optional" json:"preferredMaintenanceWindow" yaml:"preferredMaintenanceWindow"` // The CloudFormation policy to apply when the instance is removed from the stack or replaced during an update. // Default: RemovalPolicy.Retain // RemovalPolicy awscdk.RemovalPolicy `field:"optional" json:"removalPolicy" yaml:"removalPolicy"` }
Construction properties for a DatabaseInstanceNew.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import cdk "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var databaseCluster databaseCluster var instanceType instanceType databaseInstanceProps := &DatabaseInstanceProps{ Cluster: databaseCluster, InstanceType: instanceType, // the properties below are optional AutoMinorVersionUpgrade: jsii.Boolean(false), AvailabilityZone: jsii.String("availabilityZone"), DbInstanceName: jsii.String("dbInstanceName"), EnablePerformanceInsights: jsii.Boolean(false), PreferredMaintenanceWindow: jsii.String("preferredMaintenanceWindow"), RemovalPolicy: cdk.RemovalPolicy_DESTROY, }
type DatabaseSecret ¶
type DatabaseSecret interface { awssecretsmanager.Secret // Provides an identifier for this secret for use in IAM policies. // // If there is a full ARN, this is just the ARN; // if we have a partial ARN -- due to either importing by secret name or partial ARN -- // then we need to add a suffix to capture the full ARN's format. ArnForPolicies() *string AutoCreatePolicy() *bool // The customer-managed encryption key that is used to encrypt this secret, if any. // // When not specified, the default // KMS key for the account and region is being used. EncryptionKey() awskms.IKey // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. Env() *awscdk.ResourceEnvironment // The string of the characters that are excluded in this secret when it is generated. ExcludeCharacters() *string // The tree node. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. PhysicalName() *string // The ARN of the secret in AWS Secrets Manager. // // Will return the full ARN if available, otherwise a partial arn. // For secrets imported by the deprecated `fromSecretName`, it will return the `secretName`. SecretArn() *string // The full ARN of the secret in AWS Secrets Manager, which is the ARN including the Secrets Manager-supplied 6-character suffix. // // This is equal to `secretArn` in most cases, but is undefined when a full ARN is not available (e.g., secrets imported by name). SecretFullArn() *string // The name of the secret. // // For "owned" secrets, this will be the full resource name (secret name + suffix), unless the // '@aws-cdk/aws-secretsmanager:parseOwnedSecretName' feature flag is set. SecretName() *string // Retrieve the value of the stored secret as a `SecretValue`. SecretValue() awscdk.SecretValue // The stack in which this resource is defined. Stack() awscdk.Stack // Adds a replica region for the secret. AddReplicaRegion(region *string, encryptionKey awskms.IKey) // Adds a rotation schedule to the secret. AddRotationSchedule(id *string, options *awssecretsmanager.RotationScheduleOptions) awssecretsmanager.RotationSchedule // Adds a statement to the IAM resource policy associated with this secret. // // If this secret was created in this stack, a resource policy will be // automatically created upon the first call to `addToResourcePolicy`. If // the secret is imported, then this is a no-op. AddToResourcePolicy(statement awsiam.PolicyStatement) *awsiam.AddToResourcePolicyResult // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Attach a target to this secret. // // Returns: An attached secret. Attach(target awssecretsmanager.ISecretAttachmentTarget) awssecretsmanager.ISecret // Denies the `DeleteSecret` action to all principals within the current account. DenyAccountRootDelete() GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. GetResourceNameAttribute(nameAttr *string) *string // Grants reading the secret value to some role. GrantRead(grantee awsiam.IGrantable, versionStages *[]*string) awsiam.Grant // Grants writing and updating the secret value to some role. GrantWrite(grantee awsiam.IGrantable) awsiam.Grant // Interpret the secret as a JSON object and return a field's value from it as a `SecretValue`. SecretValueFromJson(jsonField *string) awscdk.SecretValue // Returns a string representation of this construct. ToString() *string }
A database secret.
Example:
var cluster databaseCluster myUserSecret := docdb.NewDatabaseSecret(this, jsii.String("MyUserSecret"), &DatabaseSecretProps{ Username: jsii.String("myuser"), MasterSecret: cluster.Secret, }) myUserSecretAttached := myUserSecret.attach(cluster) // Adds DB connections information in the secret cluster.AddRotationMultiUser(jsii.String("MyUser"), &RotationMultiUserOptions{ // Add rotation using the multi user scheme Secret: myUserSecretAttached, })
func NewDatabaseSecret ¶
func NewDatabaseSecret(scope constructs.Construct, id *string, props *DatabaseSecretProps) DatabaseSecret
type DatabaseSecretProps ¶
type DatabaseSecretProps struct { // The username. Username *string `field:"required" json:"username" yaml:"username"` // The KMS key to use to encrypt the secret. // Default: default master key. // EncryptionKey awskms.IKey `field:"optional" json:"encryptionKey" yaml:"encryptionKey"` // Characters to not include in the generated password. // Default: "\"@/". // ExcludeCharacters *string `field:"optional" json:"excludeCharacters" yaml:"excludeCharacters"` // The master secret which will be used to rotate this secret. // Default: - no master secret information will be included. // MasterSecret awssecretsmanager.ISecret `field:"optional" json:"masterSecret" yaml:"masterSecret"` // The physical name of the secret. // Default: Secretsmanager will generate a physical name for the secret. // SecretName *string `field:"optional" json:"secretName" yaml:"secretName"` }
Construction properties for a DatabaseSecret.
Example:
var cluster databaseCluster myUserSecret := docdb.NewDatabaseSecret(this, jsii.String("MyUserSecret"), &DatabaseSecretProps{ Username: jsii.String("myuser"), MasterSecret: cluster.Secret, }) myUserSecretAttached := myUserSecret.attach(cluster) // Adds DB connections information in the secret cluster.AddRotationMultiUser(jsii.String("MyUser"), &RotationMultiUserOptions{ // Add rotation using the multi user scheme Secret: myUserSecretAttached, })
type Endpoint ¶
type Endpoint interface { // The hostname of the endpoint. Hostname() *string // The port number of the endpoint. // // This can potentially be a CDK token. If you need to embed the port in a string (e.g. instance user data script), // use `Endpoint.portAsString`. Port() *float64 // The combination of “HOSTNAME:PORT“ for this endpoint. SocketAddress() *string // Returns the port number as a string representation that can be used for embedding within other strings. // // This is intended to deal with CDK's token system. Numeric CDK tokens are not expanded when their string // representation is embedded in a string. This function returns the port either as an unresolved string token or // as a resolved string representation of the port value. // // Returns: An (un)resolved string representation of the endpoint's port number. PortAsString() *string }
Connection endpoint of a database cluster or instance.
Consists of a combination of hostname and port.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" endpoint := awscdk.Aws_docdb.NewEndpoint(jsii.String("address"), jsii.Number(123))
func NewEndpoint ¶
Constructs an Endpoint instance.
type IClusterParameterGroup ¶
type IClusterParameterGroup interface { awscdk.IResource // The name of this parameter group. ParameterGroupName() *string }
A parameter group.
func ClusterParameterGroup_FromParameterGroupName ¶
func ClusterParameterGroup_FromParameterGroupName(scope constructs.Construct, id *string, parameterGroupName *string) IClusterParameterGroup
Imports a parameter group.
type IDatabaseCluster ¶
type IDatabaseCluster interface { awsec2.IConnectable awscdk.IResource awssecretsmanager.ISecretAttachmentTarget // The endpoint to use for read/write operations. ClusterEndpoint() Endpoint // Identifier of the cluster. ClusterIdentifier() *string // Endpoint to use for load-balanced read-only operations. ClusterReadEndpoint() Endpoint // Endpoints which address each individual replica. InstanceEndpoints() *[]Endpoint // Identifiers of the replicas. InstanceIdentifiers() *[]*string // The security group for this database cluster. SecurityGroupId() *string }
Create a clustered database with a given number of instances.
func DatabaseCluster_FromDatabaseClusterAttributes ¶
func DatabaseCluster_FromDatabaseClusterAttributes(scope constructs.Construct, id *string, attrs *DatabaseClusterAttributes) IDatabaseCluster
Import an existing DatabaseCluster from properties.
type IDatabaseInstance ¶
type IDatabaseInstance interface { awscdk.IResource // The instance endpoint address. DbInstanceEndpointAddress() *string // The instance endpoint port. DbInstanceEndpointPort() *string // The instance arn. InstanceArn() *string // The instance endpoint. InstanceEndpoint() Endpoint // The instance identifier. InstanceIdentifier() *string }
A database instance.
func DatabaseInstance_FromDatabaseInstanceAttributes ¶
func DatabaseInstance_FromDatabaseInstanceAttributes(scope constructs.Construct, id *string, attrs *DatabaseInstanceAttributes) IDatabaseInstance
Import an existing database instance.
type Login ¶
type Login struct { // Username. Username *string `field:"required" json:"username" yaml:"username"` // Specifies characters to not include in generated passwords. // Default: "\"@/". // ExcludeCharacters *string `field:"optional" json:"excludeCharacters" yaml:"excludeCharacters"` // KMS encryption key to encrypt the generated secret. // Default: default master key. // KmsKey awskms.IKey `field:"optional" json:"kmsKey" yaml:"kmsKey"` // Password. // // Do not put passwords in your CDK code directly. // Default: a Secrets Manager generated password. // Password awscdk.SecretValue `field:"optional" json:"password" yaml:"password"` // The physical name of the secret, that will be generated. // Default: Secretsmanager will generate a physical name for the secret. // SecretName *string `field:"optional" json:"secretName" yaml:"secretName"` }
Login credentials for a database cluster.
Example:
var vpc vpc cluster := docdb.NewDatabaseCluster(this, jsii.String("Database"), &DatabaseClusterProps{ MasterUser: &Login{ Username: jsii.String("myuser"), }, InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_MEMORY5, ec2.InstanceSize_LARGE), VpcSubnets: &SubnetSelection{ SubnetType: ec2.SubnetType_PUBLIC, }, Vpc: Vpc, DeletionProtection: jsii.Boolean(true), })
type RotationMultiUserOptions ¶
type RotationMultiUserOptions struct { // The secret to rotate. // // It must be a JSON string with the following format: // “` // { // "engine": <required: must be set to 'mongo'>, // "host": <required: instance host name>, // "username": <required: username>, // "password": <required: password>, // "dbname": <optional: database name>, // "port": <optional: if not specified, default port 27017 will be used>, // "masterarn": <required: the arn of the master secret which will be used to create users/change passwords> // "ssl": <optional: if not specified, defaults to false. This must be true if being used for DocumentDB rotations // where the cluster has TLS enabled> // } // “`. Secret awssecretsmanager.ISecret `field:"required" json:"secret" yaml:"secret"` // Specifies the number of days after the previous rotation before Secrets Manager triggers the next automatic rotation. // Default: Duration.days(30) // AutomaticallyAfter awscdk.Duration `field:"optional" json:"automaticallyAfter" yaml:"automaticallyAfter"` }
Options to add the multi user rotation.
Example:
import secretsmanager "github.com/aws/aws-cdk-go/awscdk" var myImportedSecret secret var cluster databaseCluster cluster.AddRotationMultiUser(jsii.String("MyUser"), &RotationMultiUserOptions{ Secret: myImportedSecret, })
Source Files ¶
- BackupProps.go
- CfnDBCluster.go
- CfnDBClusterParameterGroup.go
- CfnDBClusterParameterGroupProps.go
- CfnDBClusterParameterGroup__checks.go
- CfnDBClusterProps.go
- CfnDBCluster__checks.go
- CfnDBInstance.go
- CfnDBInstanceProps.go
- CfnDBInstance__checks.go
- CfnDBSubnetGroup.go
- CfnDBSubnetGroupProps.go
- CfnDBSubnetGroup__checks.go
- ClusterParameterGroup.go
- ClusterParameterGroupProps.go
- ClusterParameterGroup__checks.go
- DatabaseCluster.go
- DatabaseClusterAttributes.go
- DatabaseClusterProps.go
- DatabaseCluster__checks.go
- DatabaseInstance.go
- DatabaseInstanceAttributes.go
- DatabaseInstanceProps.go
- DatabaseInstance__checks.go
- DatabaseSecret.go
- DatabaseSecretProps.go
- DatabaseSecret__checks.go
- Endpoint.go
- Endpoint__checks.go
- IClusterParameterGroup.go
- IDatabaseCluster.go
- IDatabaseCluster__checks.go
- IDatabaseInstance.go
- Login.go
- RotationMultiUserOptions.go
- main.go